|
-
April 1st, 2002, 09:04 PM
#1
Commenting code..
So this isn't sec related...but i expect a lot of you have opinions...
what are your strategies for commenting code...i find my strategy sucks...i never seem to "have the time" to do it...but gah...what a pain in the butt to go back without comments...do you comment at all...do you do it on the fly or after you've completed a module/procedure/whatever...
I used to be With IT. But then they changed what IT was. Now what I'm with isn't IT, and what's IT seems scary and weird." - Abe Simpson
-
April 1st, 2002, 09:05 PM
#2
I put in non-specific comments in my code.... Just saying this is this, thta is that and if you change this or that then this will happen to that... I hope someone gets that
-
April 1st, 2002, 09:10 PM
#3
sure i get it...in a non-specific kind of way....
I used to be With IT. But then they changed what IT was. Now what I'm with isn't IT, and what's IT seems scary and weird." - Abe Simpson
-
April 1st, 2002, 09:12 PM
#4
all my code is javadoc friendly
-
April 1st, 2002, 09:14 PM
#5
Senior Member
I always try to make my functions small and easy to understand when reading the code... But I still add comments at the start of each function explaining what they do and through out the function what is happening... I don't comment normal if-sentences but often things as loops. Things which might not be to easy to understand. My main function/program (whatever u wanna call it) is then just a listing of all other functions (of course)... I explain most of my code by using logical var-names etc....
zion1459
Visit: http://www.cpc-net.org
\"Software is like sex: it\'s better when it\'s free.\" -Linus Torvalds
-
April 1st, 2002, 09:42 PM
#6
I've generally got a comment for each function, rarely I'll have two or three if the function does something complex.
-Shkuey
Living life one line of error free code at a time.
-
April 1st, 2002, 09:54 PM
#7
Member
-
April 1st, 2002, 09:54 PM
#8
I put comments as I go, to explain what certain tags or variables are for/do what. But if I get into a coding spurt, I tend to leave them out.....
It usually depends what/who I am coding for.....
-
April 1st, 2002, 10:47 PM
#9
i comment as i go. my basic rule of thumb is that if i cant immeadiatly understand what a loop or whatever is doing add a comment. also i always have a comment before each function, and comments at the end of nested loops/if statements to keep it as clear as possible.
- 8-
There are 10 types of people in this world: those who understand binary, and those who dont.
-
April 1st, 2002, 11:04 PM
#10
Well, I always talk to myself and make comments when I am coding. Maybe thats the reason my office mate won't let me start up a compiler any more
\"Ignorance is bliss....
but only for your enemy\"
-- souleman
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|