3 ms·
One of the best ideas I saw here on HN was someone saying that they will mentor their employees to add comments to their code exactly under one condition: you a
by thr0waway1239 10y ago
One of the best ideas I saw here on HN was someone saying that they will mentor their employees to add comments to their code exactly under one condition: you add a comment above it explaining why the comment below needs to exist.
That's a pretty interesting way to enforce some discipline in the commenting process, basically by adding some necessary friction into it (while also keeping it generally simple).
Curious if there are people who have tried this approach or a similar system, and how it worked out?
- jhugg 10y agoUgh. Why the comment hate on HN? Reading code, it’s pretty astoundingly rare that I look at code without comments and think, man, this code is so self-explanatory! Conversly some of the best code I’ve ever read has comments that clearly explain what is expected, why the code works this way, and what other parts of the system use it.
- xyzzy4 10y agoMaybe it has to do with the language? If you read code in an easy language like Java, it's usually self-explanatory.