Was this list copied from a coding standard you guys use? If so, this could use some expansion. In my experience, all this rule is going to get you is lots of worthless comments like:
What I posted is the literal text of our coding standard, so yes, this is what we use.
As far the example you give: it didn't say "add loads of useless comments". ;) I agree that those kinds of comments shouldn't be added and I indeed sometimes have interns remove comments that are too much like that. Comments should be about context and intent, not just describe what you can read in C++. Good comments is a topic by itself, I plan on writing a blogpost about that. In practice however, my experience is that even good programmers often don't write enough comments so I'd rather emphasise writing more comments than writing less comments. Not useless comments though. ;)
5 comments
NOOOOO
Was this list copied from a coding standard you guys use? If so, this could use some expansion. In my experience, all this rule is going to get you is lots of worthless comments like:
What I posted is the literal text of our coding standard, so yes, this is what we use.
As far the example you give: it didn't say "add loads of useless comments". ;) I agree that those kinds of comments shouldn't be added and I indeed sometimes have interns remove comments that are too much like that. Comments should be about context and intent, not just describe what you can read in C++. Good comments is a topic by itself, I plan on writing a blogpost about that. In practice however, my experience is that even good programmers often don't write enough comments so I'd rather emphasise writing more comments than writing less comments. Not useless comments though. ;)
I'd suggest using the thought detector to check for useless commenting, but it's doing important work watching for gotos. :)
Noooooooooo :D