Don’t look at rust code
I don’t get why every language seems to have its own coding style when you’d think they’d be completely interchangeable depending on user/org/project maintainer preference
Why? It’s fine?
It IS fine, I though the comic was referring snake_case as disgusting. I was uncomfortable too at first but I got used to it
I used to be a PascalCase guy myself, but that changed recently when I had to use React (coming from embbeded C)
I am working with a C embedded framework that uses snake_case, and switching between the two, I realized that it is a lot easier to find information with snake_case for me.
I felt that. I have a colleague whose coding style is different to mine and whenever they work on code that I originally wrote, I have to resist the temptation to modify things to camelCase.
Linters make these kind of things easier. Then you get mad at the tool rather than your coworker.
Does Prettier count as a linter?
I always thought linters were more to find bad practice and possible errors than control the code style
Some linters can do both. Getting one set up as an automated job whenever code is pushed to the repo is on my TODO list…
That does sound nice to me too. I’ve found prettier with format on save works pretty well but that means you have to set it up in every editor
for a second I thought I read
publ;c
Nah, it’s actually
publ;c
This is why I spend a good amount of time setting up linters on new repos before even starting to make the application. It saves a ton of time in peer reviews because no one has to think about formatting. Some people may not like the rules chosen but official direction from the boss is “get over it”. There are 0 comments on PRs about formatting which only ever annoys people and is a waste of good dev time.
On my current team, when we were trying to choose a style, my only input was “any style that can be checked/applied with a git commit hook.”
I get some people prefer reading code in a particular format. Let them configure their editor to apply it, but let’s keep the version history in one unavoidably consistent style. Pretty please.
I don’t get it
deleted by creator
Ah well… Guess I’m lucky that it doesn’t bother me.
I use different languages with different style guides and my IDE autoformats everything properly with the click of a button.
I work on a proprietary language that translates everything to uppercase before compiling. So having a specific case is useless. The standard functions all have wacky cases. Some from the same module may use CamelCase, while it’s brother use snake_case.
… I just use Rust’s style. Simple, easy.
Wait, is this implying the software devs are hard coding all of the customer data? 🤮