Article Preview
Buy Now
FEATURE
Comments on Comments
Exploring the benefits of better commenting
Issue: 7.2 (January/February 2009)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 26,940
Starting Page Number: 18
Article Number: 7209
Related Link(s): None
Excerpt of article text...
One of my first puzzlements when learning to program in BASIC a couple decades ago was the bizarrely-named
REM
command.REM
apparently allowed you to add a "remark" about the code -- any text following the wordREM
was ignored when the code was executed. This seemed useless to me except for vanity: almost all BASIC programs back in those days began with a few comments that listed the name of the program, the author, and the copyright. Other than that, what good were comments?I've come a long way since those heady days, but I still struggle with comments. Comments are like flossing -- a healthy habit most people don't do often enough.
We all know that comments can be helpful. If you've ever seen a well-commented program you know that the comments help make what's going on more clear. If you've ever looked at non-commented code -- even of one of your own projects -- and been bewildered, you know the pain of not having good comments.
...End of Excerpt. Please purchase the magazine to read the full article.