|
Re: Quotes from the Chief Engineer and I
Quote:
Originally Posted by King Nerd III
I think it really depends on who's going to be reading it. I usually comment as much as I can for teaching examples. But for personal projects I usually write the code and then go back and comment. If what I did doesn't make sense to me I will probably try to rewrite it in a less confusing manner, but if that isn't possible I'll comment it. I try to do this because if it doesn't make sense to me, the author, then it won't make sense to anyone!
|
Express your solution in a diagram or notation of some sort (UML or simple flow diagrams and so on) first. When you start coding, comment first and fill in the code afterwards. If your style is good, the code is readable and the comments explain the algorithm. Little else is really necessary no matter the audience.
__________________
Fast, cheap or working - pick any two!
|