Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
retoor812216h@antigermgerm exactly this.
But in general, i think (in at least python world) it's a bit old fashioned, we have black and shed now, perfect auto formatters. Everything more than those formatters do, i consider bs. -
BordedDev163313hDeath to the semicolon! But otherwise it's whatever the auto formatter picks - I prefer the consistency in the codebase than anything else
Sometimes I'll do more than that, but that's generally leaning on refactoring rather than styling
Also, hungarian notation is annoying, plz avoid -
jestdotty750411hwrite like crap, press auto format, is my new motto and I like it
I don't care as long as it's consistent per repo
before I would nitpick and format everything my way but you kind of get lost in the trees and forget the forest so I am quite happy to be rid of that mindset. it was unhealthy and unnecessarily stressful, waste of time, dopamine, etc -
TrayKnots72811hCoding standards are okay.
I like when they are tightly coupled with the language.
There is nothing wrong with for (i in list) do_thing;
Except for one thing, most people aren't used to it. They tell you, mistakes will be made. Like people would just add another line and expect it to be in the loop. And that only happens because no one is used to it.
So, I write some curly braces or use a functional .foreach method for it and everyone is happy.
But it is funny, code standards reinforce themselves. They are themselves the reason why they are required. But, they just have to be better than coding wild wild west, and that is a low bar. -
int322233h@TrayKnots Yep. I've had to work with so many wild west style repos, most of them JavaScript/TypeScript and it's cognitively taxing.
I think code standards are necessary, but not to an extent that it starts detracting from creativity and start looking like nit-picking.
Not necessarily for only legacy code, but trying to add a feature or fix a bug where there's a bunch of different developers' coding styles and zero standardisation, it makes things a lot harder to understand and will most possibly lead to burnout and the company will bleed good devs. -
CaptainRant394746mI think coding standards have their pros and cons.
pros:
- unified way of working, more maintainable (in theory), fewer headaches trying to figure someone's crap out
cons:
- Get out of the h'way, pal! jk
- when these standards are wrong/incorrect, then you are forced to stick to bad standards and if you dare say a word about it, especially if the company is used to it for 30+ years, you're the bad guy
- having to spend time learning these standards
- possibly adopting bad standards and then having to get used to proper standards again when joining good project
So, how do you devs perceive code standards?
Nazi shit or game-changer?
rant
code standards