Ask HN: What do you wish more programmers knew about?

3 points by cloogshicer ↗ HN
Mainly curious about things that annoy you when your coworkers do them, stuff that makes code hard to understand/reason about.

4 comments

[ 0.33 ms ] story [ 15.8 ms ] thread
I wish more of my colleagues used early returns. I regularly find myself four or five levels of indentation deep because of nested if statements when we could've bailed 30 lines ago and saved the cognitive load.
Yup, it's a shame that they're sometimes taught to be an anti-pattern.
Maintainability matters.

Sooner or later someone else - perhaps under duress - will have to do something with you code.

Assuming everything is obvious is a bad assumption to make.

Kludgy code. Cargo culting. Lack of commenting & docs.