To comment, or not to comment, that is the question. (Part 1 - Downside of commenting)
Yoonjae Jang
73

You suggest “Commenting is not for the actual coder” — I disagree. If you are reading your own code from more than six months ago, it’s extremely unlikely that you’ll remember exactly where your head was at at that time.

I personally use comments to plan the logic which I’m going to use. That way, as I add in the logic piece by piece, the comments are already in place.

In web development, comments in CSS or JavaScript ideally should show an example of the corresponding HTML which the code will apply to. This markup would not at all be obvious from the code itself.

Unfortunately, however, I know of no other web developers, apart from myself, who regularly use comments. So I have to struggle my way through everyone else’s “self-commenting code”.