News for hackers. Stuff that matters.
Re:Why was Pinball removed from Windows Vista? by jrajav on Tuesday December 18, 2012 @03:17PM (#4939358)
I don't think comments are any kind of substitute for clear, well-structured code. In your example, "Detect collision" still doesn't give me any kind of epiphany about the code. At best, it gives me a slight hint about where to go to get more information. Chances are I'm trying to fix a bug or change the behavior, so I still need to figure what $a, $b, $ab, $c, and d are and what their purpose is.

In other words, I have nothing against good comments, especially on obscure code, but I think they're only marginally useful even in those cases.

Re:Why was Pinball removed from Windows Vista? by randomdrake on Tuesday December 18, 2012 @03:18PM (#4939367)
Definitely. I wasn't trying to say that they were a substitute. I specifically said both could have worked. In the example they cited, they couldn't even find where to begin. A small comment could have done something about it.

When you can't have both clear code and commenting, you could at least try to do one every once in a while. How can that be a bad thing?