Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Install a style fixer in their ide :D
dindin2862yAt least the Enter key works. 🙂
acz09034122yMy unrequested advice: don't spend too much time and effort worrying about things that make no difference.
Sure, we all have our preferences. I, for example, hate to have to hit the Shift key, so I would love to never use caps or underscores and name all my variables something-like-this. But then I would be constrained to using only Lisp or Scheme for ever. No other languages I know of support dashes (= minus signs) in variable names. I also have very specific preferences regarding spaces and things like that.
But those are MY preferences, and like me, everyone else is entitled to have THEIR preferences, even if they differ from mine.
If you don't want to hate this job, just accept that when you work in a team, you just have to accept the team's style and try to be consistent with it.
acz09034122yBTW, I find it most frustrating that your period key is apparently broken.
Xirate3212yTeach him to ctrl-alt-L, problem fixed -.-'
Xirate3212y@halfflat Well, it makes it simpler to just add the next line to quickly check something if you have your braces ready, that's what I thought when they made me do that :v
We follow the PSR rules which recommend certain code styles
Ofcourse we have our githooks and IDE's to do the dirty work :)
some intern gets the code, wants to print a message before returning, goes behind your if()
presses enter, adds a print line.
and suddenly you have a
and suddenly you have a program that aborts in every case, without anyone noticing immediately.
eeee33212ySetup ktlint (https://ktlint.github.io/) on CI and have a laugh at your colleague.
The most important reason for proper and consistent formatting is that it helps reading the code. It's only humans who read code. The compiler just parses and interprets it and doesn't care about formatting. Humans care, because humans at some point will have to read the code to extend it or fix bugs in it.
irby2372yThis is tabs vs spaces but, like, next level pettiness
Still better than tabbing and aligning all the braces to the right of the screen.. o.O