Reply to comment

Program Code Spell Checking

I had noticed some references lately from Stroustrup (the inventor of c++) about not liking camel casing. He prefers underscores between words in variable names: myFunctionName vs my_function_name. The best reference I can find to this is from Stroustrup's C++ FAQ page.

I initially disagreed with him, having grown up first with BASIC, moving to Java and C++ later. However, while mocking up some C++ code in a Google Docs document I discovered something quite by accident: underscores work with spell checking!

I had always thought that spell checking program code was futile. However, a properly configured spell checker could be set up to ignore single character "words" and treat "_" characters as spaces. In fact, the spell checker built into Firefox is configured this way by default.

I'm now sold on doing personal development with underscores separating words in variable/function/class names, so that it will be possible to run a spell checker against my code, and increase the professional feel of it.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • Lines and paragraphs break automatically.
  • You may post PHP code. You should include <?php ?> tags.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Images can be added to this post.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.