4 ms·
Good commenting requires empathy. You need to imagine how people will interact with your code and write just enough to help them understand the things that are
by skylark 9y ago
Good commenting requires empathy.
You need to imagine how people will interact with your code and write just enough to help them understand the things that aren't already self evident.
I've found that the most clean, well maintained codebases I've worked with had VERY sparse comments, but the ones that did exist were critical to quickly understanding the "why."
- meagher 9y agoExactly! The best code I have ever read did complex things, but was easy to understand without much commenting at all.
- zer00eyz 9y ago> Good commenting requires empathy. I once found a comment that said something to the effect of: // If you are here reading this it means things are very bad for what ever reason. I am sorry for the mess that follows but at the time it was the best possible solution. Your fucked! Lets see who did this, oh look 3am checkin, by me, almost a year ago. It was bad (all of it) and my comment was true to forum I was in a situation as described.
- bbcbasic 9y agoThere is a hitchhikers guide to the galaxy quality about that comment! Nice one.