Eric Coleman
Gladiator
USA
811 Posts |
Posted - Sep 02 2004 : 8:53:12 PM
|
There should be a mix between both methods. It's very helpfull if variable names can be their own comment, i.e. descriptive variable names. However, you should still comment on the overall behavior of functions, subs, etc. I personally like to keep track of what the function does. Some of my functions can get rather complicated. Things like LengthOfVector is a self descriptive function, but something like CalculateQuantVectorField might not make as much sense if you haven't looked at the code in a long time. Another thing I like to do is document what other functions/events/etc call a particular piece of code. This is a tremendous help when you've forgot about the overall flow of a program. If you have Visio or something similar, that can help too, but having the functions document program flow really helps a lot. As an example, look at the one and only submission I made to planet source code.
|
|
|