Re:Portrait of a N00b
by cstejerean on Tuesday February 12, 2008 @03:34AM
(#113888)
I've yet to meet a "junior" programmer that overly comments code. OTOH I've met a couple of more senior level developers (15-20 years of experience) that absolutely can't live without documentation and comments even when the comments simply reiterate what the code is saying (still not to the level of narrative Steve was suggesting)
Re:Portrait of a N00b
by danohuiginn on Tuesday February 12, 2008 @11:45AM
(#114098)
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.
I began over-commenting in college when the professors asked for detailed comments but didn't exactly specify how much detail was enough. (Or, they tried to explain what comments were appropriate but failed miserably). Grade-wise, it was safer to have too many than too few.
Re:Portrait of a N00b
by pchristensen on Monday February 11, 2008 @04:01PM
(#113595)
I was wondering if I was the only one!
Maybe I'm not doing anything sufficiently tricky in my functions?