Proofreading Your Code Comments before Posting Them Online
You already spell check the text on your website(s)…right? Well, what about those code comments? Although few people are likely to ever see the comments, it's worth keeping this topic in mind in case you ever decide to publicize your code. Or if you share code samples with potential employers.
When writing code, comments are an important aspect since they guide others through the script and help them understand the purpose of the various components. Comments also benefit the original code author(s). The inner workings of a script may make perfect sense while it's being developed, but that will likely change with time.
Since few people typically see the comments, most of us probably don't spend much time proofreading them. It also doesn't help that spell check features, like the one in Adobe Dreamweaver, ignore comments. However, we may share our code with someone else and typos typically don't leave good impressions.
For example, while digging through code samples from a third-party solution for generating graphs and charts, the following comment cropped up and made me chuckle:
//AXES
Since the graph had nothing to do with weaponry, the comment should probably say "Axis". It doesn't help that this typo is scattered throughout the code samples. It even appears in some file and variable names. Yikes!
Conclusion
A little effort goes a long way toward reducing the amount of typos on your website. Especially if your business model involves releasing code publicly. And for those now scouring this blog for typos…I'm sure you'll find them. Feel free to point and laugh in the comments section. :-)
1 Comment
After spending a considerable amount of time with VBA and charts in Microsoft Excel, I've come to the realization that "Axes" is the plural form of "Axis". Sorry about that. At least I can stand by the rest of the post…I think. :-)
Leave a Comment