Hacker News new | ask | show | jobs
by crdoconnor 3192 days ago
>And the reason that "the code is self-documenting" is a bad smell is because in 3 months even the 'rock star' who wrote it won't remember without appropriate help

That simply means you're working with poor developers.

1 comments

So you've never written code and come back to it 6 months later said said to yourself, "why did I do this?"
Many years ago yes, but not recently.

If you're a supposed "rock star" senior developer doing this it means you're just a bad developer. If you're a junior doing it just means you have some maturing to do.

There are two kinds of that.

One is "wtf was I thinking", which comments won't help with.

The other is "where did the requirement come from", and that's (1) not a "cock-sure of themselves" sort of thing; and (2) best solved by putting a tracking number on the commit message, rather than traditional code comments.