Programmer's Language-Aware Spell Checker?
Jerry Asher writes "Not all of my coworkers are careful about spelling errors. Sometimes this causes real embarrassment as spelling errors creep into software interfaces. Does anyone know of spell checkers for programming languages? I don't want a text spell checker, I want a programming-language-aware spell checker. A spell checker that I can pass all of my code through and will flag spelling errors in function names, variable names, and comments, but will ignore language keywords, language constructs and expressions, and various programming styles (camel code, or underscores, or...). I want a spell checker that knows that void *functionSigniture(char *myRoutine) contains one spelling error. Does anyone have such a thing for Java or C++? Are there any Eclipse plugins that do this?"
If you want your software to be internationalizable, then you are going to need all your interface text in external text files anyway. Just spellcheck that. Your programmers really shouldn't be embeddeding any message text in the software itself, so you can just use grep to search for " marks :)
What you're wanting is something that is very difficult for a computer but very easy for a human being. You want to be able to discern which parts of your text file constitute machine-readable instructions (which have to be spelt the way the machine expects them when it's running the compiler/interpreter) and which parts constitute human-readable messages (which have to be spelt the way a human would expect).
The real point is, you shouldn't have user interface messages hard-coded right there into your program at all! It will make it much harder to produce a foreign-language version three years down the line when your company expand and open their first offshore branch. Instead, you should abstract all messages out into a separate file of their own, which can then be spell-checked separately; refer to them only by means of meaningful constants within the code (e.g. if message 6 happens to be "number too small" then use something like NUMTOOSML for 6). This will make the task of internationalisation much simpler -- it can be handed off to anyone who speaks both the current and target languages, not necessarily a programmer.
If your program really is one that you will never need to internationalise, then your users probably will be able to deal with the odd mis-spelt message.
Je fume. Tu fumes. Nous fûmes!
Such a spellchecker might be useful and might even be possible, but it would be much more valuable if QA caught spelling mistakes in the user interface (menu labels, error messages, etc). "An error has occured" is far to common.
OK I know this is a little off topic but why is it that Microsoft's spell checker guesses for what my English & German misspellings are, are far better than MacOS, Firefox on MacOS, and iSpell on OpenBSD?
Is this that hard of problem?
Nothing in the world is more dangerous than sincere ignorance and conscientious stupidity.