Software Development and Spelling in your Source Code - gHacks Tech News

Software Development and Spelling in your Source Code

For most developers, keeping your source code's comments, error messages, check in notes and even variable names free of spelling mistakes is not the most pressing concern.

As a developer and a dreadful speller, I'm one of the worst offenders and have been of the understanding it didn’t matter as the mistakes were kept safely under to hood and didn't affect how the code ran.

I've never had a single complaint from a snobby compiler or interpreter about my awful spelling.


/// <summary>
/// Defines the code used when emailing user invatations.
/// </summary>
public Guid? InvatationCode { get; set; }

Over the years however I've worked with gigabytes of public and private code written by other developers and when I see incorrect spelling in source code it instantly undermines the credibility and professionalism of the whole source.

The problem can get more serious when a contributor or original writer attempts to later correct the mistake as this can lead to mismatches and errors. Sometimes the spelling mistake can be hard to rectify, as is the case if there is a misspelling in an interface, database table or column name.
I have come to value and see the importance of taking the time to correct spelling and grammatical errors and realized nowadays a spell checker is an essential item in the developer's toolkit.

Some Integrated Development Environments like Xcode and Eclipse have spellcheckers built-in. However Xcode's checker doesn’t discriminate between words that should be checked (like comments) and syntax that should be ignored (like “*argv[]”). Eclipse is better at recognizing these differences although it does require you to provide your own dictionary.

Visual Studio 2010 has a number of third party spellcheckers that will keep you from getting red faced when you check in your code.

Spell Checker for Visual Studio by ComponentOne is the top of the line option but at 195$ for a license most developers opt for one of the free alternatives.

HTML Spell Checker is written by Mikhail Arkhipov, a Principal Architect at Microsoft and checks HTML as well as code comments. He uses the Microsoft Office dictionary and spell checking engine.

Another popular free option is Noah Richards's Spell Checker. It can check html, code comments as well as literal strings.

All of the above checkers are able to correct spelling in a number of languages. Now if we could just have a checker (and corrector) for dreadful code...

Summary
Software Development and Spelling in your Source Code
Article Name
Software Development and Spelling in your Source Code
Description
Why taking the time to correct spelling and grammatical errors is an essential item in the developer's toolkit.
Author

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. Siro said on April 25, 2011 at 5:16 am
    Reply

    eclipse has it for free, in case you develop using gwt.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.