News for hackers. Stuff that matters.
Re:Myths about code comments by j_baker on Friday January 01, 2010 @07:44PM (#1026516)
I don't necessarily agree with you, but I at least understand your point. Are coders who comment rarer than coders who don't? Probably so. Are coders who don't comment out of ideology more common than people who do comment out of ideology? I don't think so.

More often than not, if someone is under-commenting, it's probably just out of laziness. However, if someone is over-commenting (which is possible in my opinion), chances are that it's because they believe that what they are doing is correct. Personally, I think posts such as this would be better to programmers in the latter category. A similar post aimed at the lazy under commenter probably would have no effect simply because such a person has been told they need to comment more throughout their programming careers.

That said, it really wasn't my intent to tell people they shouldn't comment. Rather, I'm merely trying to get people to think more about the comments they make. And that's not a bad thing all things considered.

Re:Myths about code comments by tentonova on Friday January 01, 2010 @08:20PM (#1026540)
However, if someone is over-commenting (which is possible in my opinion), chances are that it's because they believe that what they are doing is correct.

I've yet to work with anyone outside of an undergraduate class that over-commented their code.

It takes effort to over-comment code, and those that do are invariably writing both poor code and poor comments.

A much more prevalent malaise is that of developers with an unduly high opinion of their code's readability grossly under-commenting their code. This increases the long-term maintenance overhead and sometimes leads to forced rewrites by follow-up maintainers (which may be the author himself).

Re:Myths about code comments by j_baker on Friday January 01, 2010 @11:39PM (#1026781)
You and I have different experiences then. I've seen people who comment everything and anything. And I know I'm not the only person who has seen this:

http://steve-yegge.blogspot.com/2008/02/portrait-of-n00b.htm...

Re:Myths about code comments by tentonova on Saturday January 02, 2010 @01:51AM (#1026898)
And since it's Steve Yegge, it must be right?

His "over-commented" example is clearly extreme hyperbole.

His under-commented counter-example is extremely poorly commented code which fails to explain the "why", ensuring that nobody can make sense of the code path without actually stopping to read the entire expression and possibly the expressions to which it refers.