News for hackers. Stuff that matters.
Re:Five Rules for Writing Good Code by aditya on Saturday November 28, 2009 @05:31PM (#965606)
If we see lots of comments interspersed in a method, it is a good sign that the code cannot be easily understood. Break it down into lots of little functions with descriptive names, and all of a sudden our code reads like a very clear and concise recipe, and we find that the comments become redundant. Most comments that live inside functions are parasitic organisms, treat them with suspicion.

Seriously? I've seen this a lot in the Ruby world and it works in a lot of cases but using it as a rule sounds Wrong.

Re:Five Rules for Writing Good Code by dbz on Saturday November 28, 2009 @05:35PM (#965611)
When I am commenting (for someone else) I always stick at least one comment in (or above the function) per function, that way everything is clear, even if the comment is describing where the function will be used. That rule is awful imho.