Ken Seehart wrote:
Will McGugan wrote:
Horst JENS wrote:
I think that either the comment should say "in 10 frames"
or the randint statement should be randint(1,10).
correction:
or the ranint statement should be randint(1,20)
Ack! Well spotted. Never hard code values in to comments!
Will
A former employee where I work once said that it's better not to comment
at all because all comments are fundamentally redundant and might become
inconsistent with the code. He proceeded to remove all comments.
Naturally, he was a perl programmer :-)
Ken
Well, inconsistent comments are the worst. But as a broad overall 'what
this area is supposed to do' bit, they're handy. When I'm tired, and
looking for a spot to update, I tend to skim the comments until I hit
the right area. I've been fooled by bad comments myself, tho, it happens
sometimes. Comments should never be too specific.
--Kamilche