Next: Readable code
Up: Prevention
Previous: Avoid automatic types
As you write your programs, make sure that you litter your code with many
comments. These comments can be extensive, describing in detail the intention
of a following code, or they can be short phrases, giving a
physical connection to a variable or line of code.
You will find that writing comments while you code, will help flesh out
ideas and further your understanding of the problems that you are attempting
to solve or algorithms that you are attempting to implement.
You will also find that well written comments will enable you to reinsert
yourself back into your code at some later point in time with little or no
difficulty. Comments will help you
understand what you were trying to do.
Without comments, you will be as foriegn to your own programs
as the next person even after only a short time has past.
If you have to fix a bug three months
after writing some particular code, reading your well written comments will
save valuable time.
Spencer Eugene Olson
2005-01-19