| Home | About | Concept | It's a Jungle | What you need to know | Services | Auth. Entry | Contact Us |
A modern trend that appears to be gaining momentum is that code should be written so clearly that comments are not required. It sounds wonderful, doesn't it. Who could possibly find fault with such a desirable goal? --Only those who understand what it really means.--
Proponents of the trend are correct when they say that an experienced programmer doesn't need comments to figure out what clearly written code does. Unfortunately the proponents fail to understand what it is that comments really do.
Proper comments don't describe what code does. They describe what code is supposed to do. These can and often are two very different things: the discrepancies are called bugs. In fact, debugging is nothing more than the process of making 'what code does' agree with 'what code is supposed to do.'
While it may be difficult to determine what some code does, it is impossible to read the mind of a programmer who is not present. As a result, fixing a bug in uncommented code requires repeating part of the initial design process, which is time consuming, expensive, and risky.
Reliable code that holds up over time requires both clearly written code and meaningful comments. Neither one is a substitute for the other.