Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I find very troubling amount of spelling mistakes I see everyday in our codebase, from which I will reproduce a very short but representative example:

ArgumnetCount
Timeount
Gor message from queue 

Unfortunately this is in no way limited to one person. There is a lot of non-native English speakers in our team who contribute to that, however I can also pinpoint some of the worst spelling mistakes to our Software Architect who is American, born and raised.

These are also to be found even in emails, presentations, documents, whatever piece of written information we have in a software development company.

I'd like to know how to find out if it is a serious issue or not?

I've always met these spelling mistakes with concern, but my own, personal, official policy is that we are not paid to spell things right, we are paid to get things done, so inside the company I never really criticized anyone about it. But I have raised this issue with some of my close friends, and never settled it for good.

share|improve this question
8  
4  
Voted to close as off-topic. This is not related to development, but to any domain where people write, from YouTube comments to content of the websites. Some people just don't care about their writing and spell-checking. They are happy to create their e-commerce large scale website which has three mistakes in its own title, written in big on the home page. And sadly, most users of this e-commerce website wouldn't care neither. –  MainMa Mar 2 '12 at 9:56
3  
@MainMa: writing in a programming language is sufficiently different from writing in a human language. When you write for YouTube comments, it is perfectly obvious that you write for human readers, but with source code, a common attitude is that as long as it compiles and works, everything is fine. –  tdammers Mar 2 '12 at 10:02
2  
@tdammers: when you write source code, or a question on Stack Exchange, or a book, or a YouTube comment, or a content of the home page of your e-commerce website, in every case you do it for people who would read it. Programming is not different, and your compiler doesn't care if you name your variable ArgumentCount or ArgumnetCount. –  MainMa Mar 2 '12 at 10:34
14  
Voting to reopen. Comments in code are very different from comments in other mediums and have to convey complex information in a succinct way. I disagree that they are all the same –  Tom Squires Mar 2 '12 at 11:56
show 9 more comments

14 Answers

up vote 13 down vote accepted

Spelling errors can mean one of two things:

  • The person who makes them is not proficient in English, and doesn't take the time to compensate by using appropriate tools (dictionaries, spell checkers, etc.)
  • The person who makes them is proficient in English, but doesn't care about spelling at all.

Either is a fairly bad sign, because it means the person in question doesn't have readability, maintainability and elegance high on their priority list; if the cause is a lack of English language proficience, it also means that the person lacks two essential skills - written English communication, and a general feeling for languages (if you can't express your thoughts clearly in English, chances are you can't express them well in a programming language either).

But why exactly are spelling errors bad, all else being equal? After all, the code works, and the compiler doesn't care at all how you name your identifiers, as long as they don't violate the syntax rules. The reason is that we write code not only for computers, but also and most of all, for humans. If that weren't the case, we'd still be using assembly. Source code is written once, but read hundreds of times during its lifecycle. Spelling errors make reading and understanding the source code harder - mild errors cause the reader to stumble for a fraction of a second, many of them can cause considerable delays; really bad errors can render source code completely unreadable. There is another issue, which is that most of the code you write will be referred to by other code, and that code more often than not is written by someone else. If you misspell your identifiers, someone else will have to remember (or look up) not only what the name is, but also how exactly it is misspelled. This takes time and breaks the programming flow; and since most code gets touched more than once in maintenance, each spelling error causes a whole lot of interruptions.

Consider how developer time equals salary equals expenses, I think it should be easy enough to make a case of this; after all, breaking the flow and getting back into it can take up to 15 minutes. This way, a severe spelling error can easily cost a few hundred dollars in further development and maintenance (but they're indirect costs, not directly visible in estimates and evaluations, so they often get ignored by management).

share|improve this answer
4  
I'd add that spelling mistakes can cause hard to debug problems where thisVaraible and thisVariable look almost the same and are 'technically' correct. –  Spencer Rathbun Mar 5 '12 at 19:15
2  
+1, but the statement: "if you can't express your thoughts clearly in English, chances are you can't express them well in a programming language either" is utter nonsense! –  Martin Ba Mar 6 '12 at 13:17
1  
@Martin: I have yet to find a world-class programmer with an atrocious writing style. All the top programmers I know of are also capable of writing concise, clearly-worded English; some of them (Knuth, Dijkstra) are even somewhat famous for their writing style. –  tdammers Mar 6 '12 at 15:58
3  
@tdammers: If they're English native speakers, I'd agree. But if you have a different mother tongue, you can have a pretty horrible grasp of English and still be a good programmer. That's what I meant with nonsense. I agree that Good Programmers are also able to Write Well -- in whatever natural language they're fluent in. (a bit of English obviously helps to find your way around the net, but you do not by any means need to be fluent or a good writer or have any grasp of grammar or style in English :-) –  Martin Ba Mar 6 '12 at 17:58
2  
Note how Dijkstra is not a native speaker... –  tdammers Mar 6 '12 at 21:02
show 1 more comment

The problem here is not the engrish itself but the lack of comment clarity. Perfect english isn't necessary, clear English is. Its trivial to run something through google to pick up the obvious errors.

For example its not clear from first glance if Gor message from queue means "got a message from the queue" or "GOR message from queue". You would need to read the code to understand the meaning of the comment (thus defeating the object of the comment).

You should ask to implement code reviews in your company. You can then "criticize" people in a constructive way while they do the same to you.

share|improve this answer
add comment

I actually doubt whether "Timeount" is a matter of not being a native speaker. People make tons of typos in their first language. I wouldn't qualify these particular examples as "Engrish".

Having said that, I understand that it's not about these particular examples. I agree with you in principle. I've come across actual troubles caused by this type of stuff ("if there's no column named attachements, create attachments").

Being a programmer is about being precise and careful with typos, commas, semicolons, dots, which is human-language-agnostic most of the time.

share|improve this answer
add comment

If this issue bothers you, most IDE now allow spell checking in comments so that dyslexics can at least look like they know how to spell. It sure helps me! It is therefore a trivial "fix" to have good spelling.

share|improve this answer
1  
If you down vote could you take the time to state why so that I can improve my answer? –  Sardathrion Mar 6 '12 at 11:07
1  
I didn't downvote, but you're not really answering his question. You're giving advice on how to avoid spelling mistakes. That's a perfectly valid comment, but not what OP asked for. –  Konrad Morawski Jul 14 '12 at 9:04
add comment

In source code, internal presentations and documents etc. small typos that don't alter the meaning or hamper understanding are not a porblem. Just fix them in the source yourself if you find them irritating.

Also, particularly in comments, the substance is more important than the form. No Engrish here:

String s = "Wikipedia"; /* Assigns the value "Wikipedia" to the variable s. */

The fact is that some people are naturally more careful writers than some others (whether this is due to education, or due to attitude, or due to intelligence or whatever, is not relevant). How much to spend effort to fix that is a business value question: do you get more value from fixing the typos, than you spend effort in fixing them? In case of internal stuff, the answer is usually no. Your customers aren't going to complain about typos in your source code comments (unless you're doing open source).

Intentional mis-typing and inappropriate comments are unprofessional and should be avoided, but the focus should be in things that matter (i.e. generate business value, if you work for business).

Publicly visible stuff must of course be carefully proof-read.

share|improve this answer
2  
Please tell me you typed "porblem" deliberately. :) –  pdr Mar 2 '12 at 11:01
2  
Admittedly I did. If you find it irritating, you can fix it ;) –  Joonas Pulakka Mar 2 '12 at 11:09
2  
Oh no. I found it outrageously amusing. –  pdr Mar 2 '12 at 11:12
4  
"Some people are more careful writers..." Yes, and the very same people are more careful programmers. I have yet to meet a good programmer who wasn't also careful in written communication. –  kevin cline Mar 5 '12 at 18:40
add comment

Correct spelled english is a must in code. I also have a large codebase full of gibberish in it and it's a nightmare to maintain.

Don't let this get out of hand. Try to educate everyone that the code maintainers are not mind readers.

share|improve this answer
1  
"Try to educate everyone" - I did and now they misspell/mistype stuff just to spite me. Gotta love it... –  MetalMikester Mar 2 '12 at 12:15
4  
@MetalMikester: it may be time to look for a more professional shop. –  kevin cline Mar 5 '12 at 18:37
add comment

Well, this is a many-sided cultural problem.

Speaking from a german perspective: we notice how our own language gets more and more influenced by english terms. This goes so far as national companies having english slogans or advertising. Some people, especially in management positions are meanwhile apparently unable to utter but one sentence in plain german. Their speech is full of buzz words and incomprehensible management slang. We say such persons are speaking "denglish".

Given this state of affairs and English being the "lingua franca" especially in software business, it is unavoidable that English itself is influenced by the vast number of non-native speakers. But for English native speakers this is still better than having to lern, say, Chinese in order to take part in the SW industry.

share|improve this answer
add comment

Spelling errors in public class names and methods are simply unprofessional. They cost time and money. They are painful in statically typed languages like Java, where the IDE can produce a menu of class and method names. They are intolerable in dynamically typed languages.

Even worse are spelling errors in database table names and column names.

In my experience, correct spelling is only slightly related to the coder's English proficiency. I have seen native English speakers produce code with essentially random spelling and word breaks, and have seen non-native English speakers who are careful to produce correct spellings. But correct spelling is highly related to the overall code quality. Capable programmers, no matter their English proficiency, care about the quality of their work, and are careful with naming.

share|improve this answer
add comment

It should be obvious that the compiler doesn't care about misspellings, as long as you're using the same spelling, e.g. when referencing a variable. The question then becomes whether misspellings have a negative impact on the ability of team members to maintain the code.

The only way I can see to do that would be to talk to the people doing the maintenance, and you could start by asking if anyone had a harder time following code that contained misspellings.

I don't think there's any way to remove subjectivity from this issue completely, but to reduce it, you could (manually or through a script) scan the source to get an estimated number of misspellings for a particular code module, and see if maintenance on the modules with a higher number of misspellings took more time on average than those modules with fewer misspellings.

Not all modules are made equal of course, so you could think about weighting your results with various metrics such as the cyclomatic complexity of the module.

share|improve this answer
    
Mike, the discrepancy of answers and the question is recent massive edit made to it. Until Rev 3, title of the question was What do you think about source code engrish? and the text was much in the line with it –  gnat Mar 5 '12 at 19:53
    
That makes sense @gnat; I've removed the extra paragraph from my answer. –  Mike Partridge Mar 5 '12 at 20:14
add comment

In my experience such basic spelling errors are troubling, and may be symptomatic of deeper problems. Every project I've worked on with "trivial" errors like that had real problems in design that somehow made it through the review process only to crop up during development, which is not when you want to find out that the critical functionality you really need isn't there.

I'd double-check the specs for the system (if they exist) and examine the overall design; I wouldn't be surprised if you found some holes.

share|improve this answer
add comment

The first time you waste time searching for the Timeout variable just to find out it was written as Timeount, you'll know another reason why spelling is important.

share|improve this answer
add comment

This is actually two separate, but related issues. It depends on where the misspellings are:

1) In source code. If you have an identifier like ArgumnetCount, that can create real problems when someone comes along and uses the correct spelling. So you should fix those mistakes whenever possible. If you need to preserve backwards API compatibility, you can do something like:

/**
 * @deprecated - use setArgumentCount()
 */
public void setArgumnetCount(int c) {
    setArgumentCount(c);
}

2) In human-readable text (emails, documentation, code comments). Writing those correctly is important, but I would say it's a lower priority, since the parsing software inside your head is a lot more forgiving. If you see a text with a few mistakes, that's still readable, then don't worry about it - it's not your problem. But if someone sends you some free-associative nonsense and expects you to use that nonsense as the blueprint for a multi-user web application, then you should send the author a polite note requesting clarification (something like: "You illiterate moron, how do you expect me to understand this shit?")

share|improve this answer
add comment

Is it colour or color? Whose version of English do you think is the correct one? One mans correct spelling is another mans excuse to start an winnable war.

If you want to start a war, pick your battles carefully and win them. In your case, don't worry about comments, worry less about internals and focus (almost) exclusively on API's

share|improve this answer
add comment

In the examples you provided, it's appears to me that the programmer has an understanding of the English language. The typos appear to be more closely related to negligence (perhaps out of laziness) than misunderstanding.

The only reason that I make this argument is that the words are only off by 1 or 2 characters and are on characters that are close together on the keyboard. I would like to think that most programmers would notice this and correct it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.