4 ms·
Comments, like anything to do with writing maintainable code, take a while to learn. You only really figure out which comments are useful when you come back to
by danohuiginn 19y ago
Comments, like anything to do with writing maintainable code, take a while to learn. You only really figure out which comments are useful when you come back to something you wrote a couple of years ago, and try to make sense of it.
So, new programmers are likely to write bad comments, more than they are likely to write bad code (because bad code is more obvious the day you write it, so the feedback comes faster).
How the comments are bad, though, is going to vary between programmers. Some will write too many, some too few, some will just write plain useless comments.
My disease was like Steve's - over-commenting. I put it down to my liberal-arts background, which meant I found it much easier to think in prose than in code. Accordingly, I would get my head round tricky problems by writing a comment about them first. I wonder if programmers from a straight CS background would tend to write fewer comments.