5
int32
17h

So, how do you devs perceive code standards?

Nazi shit or game-changer?

Comments
  • 6
    Depends how close the standards are from my own habits lmao
  • 3
    @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.
  • 7
    Anyone mandating spaces for indentation is literally hitler
  • 2
    @retoor I like python because it builds in sensible spacing conventions
  • 4
    Death 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
  • 2
    @BordedDev > 'Death to the semicolon!'

    Blasphemy!
  • 1
    @D-4got10-01 Don't make me type more than I need to! ;P
  • 2
    write 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
  • 1
    @BordedDev Fine. I do get being lazy.
  • 2
    Coding 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.
  • 1
    @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.
  • 0
    @int32

    Yea, when standards become morality. I know that. It's a problem.
  • 0
    I 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
Add Comment