in reply to Commenting One's Code In A GNU/GPL/OpenSource World

I think commenting code is important, but if I read between the lines and apply some of my own way of thinking I can agree with this post on the following merits: Ok so what about comments that *should* be in the code? The WHY you did that comment. I think these are far more valuable then explaining WHAT is being done. For example, in some resent code I was working on I had some trouble with rand not really being so rand so I looked up the function and read up and saw that I needed to add the srand function to get better results. I need to document the srand function call as to WHY I added it so that time isn't wasted on relearned by me or learning by someone else as to why the srand function is needed to correct a problem under a particular condition.

Commenting also adds to the learning process. When you comment WHY you did something you reinforce what you have learned and how you applied what you learned.

In short I agree with Revelation's argument if I interpet the type of commenting he wants to avoid correctly.
  • Comment on Re: Commenting One's Code In A GNU/GPL/OpenSource World