Bad comments are worse than no having comments at all. Given that writing In my experience, they’re not. Hence a paradox of bad comments. I often see comments stating blindingly obvious things i.e. comments of the
class Foo {
// constructor for Foo
Foo();
};
or: /* returns width */ int getWidth(); So why do people write such useless comments if they could get their job done My theory: guilt. It’s not that those programmers don’t know that useless comments are, well, Programmers know that writing good comments is important. However, writing On top of that, writing comments often has to be postponed until code has been Writing good comments is hard (which is why they’re rarely written) but |