by nollidge · 12y ago · 0 comments
But sometimes you really need a comment, not because something is named badly, but because, even with the right name, there's something not obvious about it.
EDIT: Comments are useful for explaining things like:
1. Non-obvious side effects
2. Code that's working around a bug in a 3rd party library
3. Code that calls into some non-intuitive 3rd party API
4. Citing your work (e.g. "adapted from stackoverflow.com/blah123")
5. Why you used pattern A instead of the more standard pattern B