The only thing I would add is that comments describe what the code did
at a single point in time and the code itself describes what it did.
I always appreciate a helpful comment, but I give preference to
renaming variables and extracting methods before adding comments.  One
helpful comment is referencing a bug number that can then be looked up
with details about a specific problem that was fixed in the code.  As
an analogy I think of Wikipedia.  Most comments are like articles
without references: they are likely true but the reader gets a false
sense of confidence since in reality it is just one person's
perspective (although that doesn't mean it's not helpful).  This is
where a comment with a bug ID is like an article with references :)

--matt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to