![]() |
|
|
#1 | ||
|
General Manager
Join Date: Oct 2000
Location: The Satellite of Love
|
If you could talk to yourself 4 years ago...
I'd tell myself to COMMENT YOUR DAMN CODE!!!
For the project I'm working on now, I'm going through one of my old, failed sport sims (programmed in Delphi). According to the timestamp of the files, it's been since lat December of 2000 since I work on this thing. Now, it's June of 2004 and I'm trying to figure out what all this code means. Not one comment. Nothing. It's Delphi, so it's not bad (it's inherently easy to read the code), but damn, if I had just thrown in some general comments, I could go right to the part I need. Instead, I have a file open that is a little over 1000 lines of code trying to find what I need and what all this code does. (actually not that bad, I've seen far worse) Not only that, but I'm seeing some seriously bad coding practices in this program as well. Makes me wonder, if only I knew back then what I know now, I wonder what I'd know now... ![]() Lesson learned. Comment my damn code. |
||
|
|
|
|
|
#2 | |
|
High School Varsity
Join Date: Oct 2000
Location: The Dawg Pound
|
Quote:
I think my head just exploded
__________________
Member of the Underground Browns. Cavs. Tribe. Buckeyes. Period. |
|
|
|
|
|
|
#3 |
|
The boy who cried Trout
Join Date: Oct 2000
Location: TX
|
I would say..."don't change anything, but remember to enjoy yourself."
|
|
|
|
|
|
#4 |
|
Grizzled Veteran
Join Date: Sep 2003
Location: Fresno, CA
|
Ahh I have been there. I now incessantly comment my code. I comment procedures, I comment variables, I comment the beginnings and ends of control structures, I comment changes logical shifts , I comment to explain algorithms.
Even worse than coming across uncommented code, is running across thoroughly commented code, and not having a clue what they mean. You read the comment, and say to yourself "OK...Now what the Hell does that mean?" or "OK I initialize that variable...why on earth would I do it there?". It just never gets better. I now just tell myself that when I type a comment I need to make sure it can be understood by a moron, because more than likely I will be the next one to read the code. Kerry <---Just a note from my daughter |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|