
In Charles Dickens' Hard Times, the severe Mr Gradgrind teaches children “Facts. […] nothing but Facts. Facts alone are wanted in life”. In a similar vein I would like to teach computer programmers “Spelling, nothing but spelling. Correctly spelt words alone are wanted in computer programs”.
I may well be a pedantic, mean spirited, weasel coder of a man but badly spelt words in software code drives me crazy. There is more to it then my love of order, rules and finding any old stick to beat other coders with. Spelling mistakes in code have the half life of plutonium. If some one spells a word wrong in an email it doesn’t matter. It’s sent, it’s read and it’s gone in an ephemeral puff of cyber smoke. If someone spells a variable name wrong in code it will lay around in that app like a bad smell for years. And if some creature of great evilness spells a database table wrongly – the universe will undergo its final heat death before anyone gets round to correcting it.
It’s more evil still then just poor use of the English language offending me on a daily basis. It’s a software maintenance nightmare. At a minimum the poor maintenance coder has too remember exactly which variant of the word “category” is been used this time. At its worst seemly innocent typos cause redundant code to proliferate like rampant triffids.
As a recent example I came across are these stored procedures
usp_GetPersonelDetails
usp_GetPersonnelDetails
OK – which one is the correct one to use? Either, both, neither? Which one can I delete to tidy up? Which one is the most recent version? Which one will cause the app to fall into a smoking heap if used? Aaahhhhhhhh!!!!!!
So as well as unit tests, regression tests and usability tests, I prescribe spelling tests to push back the ever encroaching waters of crappy code.
I may well be a pedantic, mean spirited, weasel coder of a man but badly spelt words in software code drives me crazy. There is more to it then my love of order, rules and finding any old stick to beat other coders with. Spelling mistakes in code have the half life of plutonium. If some one spells a word wrong in an email it doesn’t matter. It’s sent, it’s read and it’s gone in an ephemeral puff of cyber smoke. If someone spells a variable name wrong in code it will lay around in that app like a bad smell for years. And if some creature of great evilness spells a database table wrongly – the universe will undergo its final heat death before anyone gets round to correcting it.
It’s more evil still then just poor use of the English language offending me on a daily basis. It’s a software maintenance nightmare. At a minimum the poor maintenance coder has too remember exactly which variant of the word “category” is been used this time. At its worst seemly innocent typos cause redundant code to proliferate like rampant triffids.
As a recent example I came across are these stored procedures
usp_GetPersonelDetails
usp_GetPersonnelDetails
OK – which one is the correct one to use? Either, both, neither? Which one can I delete to tidy up? Which one is the most recent version? Which one will cause the app to fall into a smoking heap if used? Aaahhhhhhhh!!!!!!
So as well as unit tests, regression tests and usability tests, I prescribe spelling tests to push back the ever encroaching waters of crappy code.
No comments:
Post a Comment