Hacker News new | past | comments | ask | show | jobs | submit login

Hi Jacques, your Pivitol is showing :p

Commit messages are good, but the dogmatic anti-comment philosophy that Pivitol follows is overdone. Lots (I mean LOTS) of comments are redundant or can be fixed with better naming or organization. But comments shine when dealing with the "why" behind something. I would rather see a comment that says why a value is set to what it is than have to be a git historian.




Hi Seth :)

Yes, when there's no better alternative, or when it's idiomatic (Go linters) or situationally appropriate (Spring libraries are immaculately commented).

But I emphasise "no better alternative" because I have seen comment rot and it sucks badly. The English language is pretty vast and can be usefully ransacked for names. Keyboards are cheap and autocompletion plentiful, so go hog wild with variable names. There are idioms, patterns, well-understood conventions and so on that allow you to avoid noise.

When you need a why, then absolutely give the why. But usually the need for an explanation is that the code isn't clear on its face and you should exhaust that possibility first.

This concludes today's reading from the Book of Annoyingly Doctrinaire Ex-Labs Pivots. Go in peace.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: