5 ms·
In theory everything you've said is accurate. In practice it's usually really hard (if not impossible) to know exactly who "the reader" will be in six months. N
by knieveltech 16y ago
In theory everything you've said is accurate. In practice it's usually really hard (if not impossible) to know exactly who "the reader" will be in six months. Nothing says "prima dona" to me quite like encountering a few thousand lines of someone else's code that they couldn't even be bothered to document the major functions.
- dwc 16y agoI comment for "me in six months" and that works ok. Not perfect, but ok. Nothing says "unthinking clod" to me like a few thousand lines of code with comments where I'm told that i is a loop index.
- knieveltech 16y agoI don't think anyone is advocating for comments explaining that $i is a loop index.
- dwc 16y agoI don't think so either. But that's what comes out of Thou Shalt Comment. And yes, I have seen loop index comments. Haven't you? I think we'd both agree if we saw a good comment. I just want to focus on the 'good' part rather than the 'comment' part.
- knieveltech 16y agoOf course I've seen loop index comments, and redundant variable declaration comments, and all manner of bad commenting. Thing is, I'll take a bad comment over blank code any day. Crap comments warn me ahead of time that I'm dealing with a developer who's either too inexperienced to know how to comment well or too sloppy to do a good job at it and in either case I need to be paying closer attention to their code than I might otherwise.