Click here to Skip to main content
15,890,123 members

Survey Free Text Answers

Do you comment your code?

19 Jul 2010 to 26 Jul 2010 Some preach that good code requires no comments, while others preach that (good) comments can be as valuable as the code itself. On which part of the spectrum do you lie?

Text entry answers for sorted by frequency of occurrance.

(5) CListCtrl
(1) CListCtrlComments
(1) comment should be there to understand what is we have done in the program,so that other can also be able to understand the program easily.
(1) Comment to point out business requirements that may force logic that doesn't seem to make sense.
(1) commenting on future tasks or some ideas, traps "ToDo"
(1) edmatthe@yahoo.com
(1) espen@burud.net
(1) Generally if a comment is needed I try and rewrite the code to reflect what it's supposed to be doing. If I can't do that for any reason I add the fewest comments that I can get away with to amplify the code's meaning.
(1) Good code requires **nearly** no comments. That's a fact, no question of preference.
(1) Hungarian notation
(1) I am the only developer I know who has been accused of over commenting.
(1) I comment a lot more Stored Procedures than C# code
(1) I comment as if the next coder who looks at it is an axe murderer who knows where I live.
(1) I comment at random places. and don't follow any strict rules!
(1) I comment code to remind myself 3 months later what it does :-)
(1) i comment every function, routine, object, class, structure, method, event, and field. And Varaibles whose purpose may appear obscure
(1) I comment on YouTube
(1) I comment Source Control
(1) I comment to-do items and reminders for use during development
(1) I comment when I get Time
(1) I curse at it and even swear at it!
(1) I do just swearing in comments.
(1) I follow Style Cop rules for commenting
(1) I have no comment
(1) I keep a change Log as well - at top and at code
(1) I need comments a year from now when I revisit the code
(1) I randomly comment with various of the above reasons.
(1) I try to write self documenting code.
(1) if i had the time to :(
(1) If your code is obscure, it needs better naming and structure, not commenting.
(1) Keep A Change-Log/Narrative (external file)
(1) mark changes in existing code
(1) Summery (header only) for public interfaces and their implementation
(1) The bigger is the project, the more I comment.
(1) The longer I have been coding the more I comment!
(1) To add much needed humor to my code for the next maintainer.
(1) when fixing a defect indicating the defect ticket number
(1) When I remember
(1) Whenever I remember too
(1) 8998899
(1) All of the above, but not every time ;-)