113

While reviewing a co-worker's code, I came across some spelling mistakes in function names and also grammatical errors like doesUserHasPermission() instead of doesUserHavePermission() in function and variable names.

Should I point these out to him or am I being too pedantic by noticing these?

waldyrious
  • 107
  • 4
Rahul
  • 2,119
  • 2
  • 14
  • 23
  • 3
    I might be careful that the person actually wants help with their English, if it isn't their second language. Some people are content with knowing that they're not incapable of expressing structured thought, that they're just incapable of proper English. If English is their mother tongue, then yes, I think bad grammar is a problem. – Rei Miyasaka Dec 28 '10 at 11:12
  • 37
    Yes. Its really frustrating when you have an API with wrong spelling. It spreads like wildfire. So its better to correct it as soon as possible. –  Dec 28 '10 at 12:29
  • 10
    @Rei: whether English is their native language or not should be irrelevant in a professional environment; if it's not then too bad for them but it's no excuse, they should be held to the same standards. – Andreas Bonini Dec 28 '10 at 13:09
  • 4
    @Rei, many programming jobs I see advertised require proficiency in Native Languages for this very reason. Being able to discuss requirements, design, specification, and construction are all very important to the entire software product as a whole. – Stephen Furlani Dec 28 '10 at 13:47
  • 1
    @Kop, some people [migrate](http://en.wikipedia.org/wiki/Tiananmen_Square_protests_of_1989) for [reasons](http://articles.cnn.com/2010-08-30/justice/mexico.mayor.killed_1_drug-violence-tamaulipas-drug-war?_s=PM:CRIME) other than just taking a job in a new country. Since employers hire someone and perform on-the-job training in a programming language, then we should also strongly consider doing so for spoken languages. – Stephen Furlani Dec 28 '10 at 13:51
  • @Stephen As much as I agree, I'm not going to give up working with an otherwise talented programmer. Again, there's a difference between being incapable of communication and not fluent in English, even if the communication in question is being done in English. There are some people that have bad English because they're lazy or because they have no respect for social interaction, and there are some that have bad English because it's not their native tongue. The former is a symptom of more severe problems, whereas the latter is for the most part a nuisance of varying degree. – Rei Miyasaka Dec 28 '10 at 13:54
  • @kop Not to say that identifier names shouldn't be corrected if they're wrong (they're difficult to maintain), but that statement "too bad" would probably land you in a deep puddle of doodoo if you were a company hiring here in Canada. – Rei Miyasaka Dec 28 '10 at 14:02
  • 1
    @Rei, I also agree. I advocate providing ESL training (and visas where necessary) for talented individuals, just as you would send someone to a programming conference or other course for a programming language. – Stephen Furlani Dec 28 '10 at 14:18
  • 2
    @Jase, you spelled "it's" wrong. Twice. Considering the question was about grammar, you might have wanted to check that. – Stephen Furlani Dec 28 '10 at 14:25
  • 2
    I work in Costa Rica. It's a requirement that all programmers at my work speak English well. Sometimes someone will have enough experience that they can get a job without fluently speaking English but I can promise you that when they start misspelling words that they will be corrected. It's very important that proper grammar and spelling is used no matter what your primary language is for the code. – Brian Dec 28 '10 at 16:26
  • 11
    `HTTP-Referer` bothers me often. http://en.wikipedia.org/wiki/HTTP_referrer#Origin_of_the_term_referer – a paid nerd Dec 28 '10 at 19:26
  • @Rei Miyasaki: Requiring employees to be *completely* fluent in the native language is fine legally and indeed essential for most jobs. When we hire we throw out any applications that do not have near flawless English usage as such people would represent the company poorly in communications with clients. – Orbling Dec 28 '10 at 20:11
  • @Orbling Surely it depends on the job description; I highly doubt that "most" jobs require "completely fluent" English. Someone who spells "definitely" as "definately" can represent a company poorly; someone who has a foreign surname and spells "false" as "farse" should be cut some slack. – Rei Miyasaka Dec 29 '10 at 15:13
  • @Rei Miyasaka: Whether someone is of foreign birth of not gives them no lenience at all. I have been born and raised in London, alongside New York, probably the most multicultural city on the globe - the English ability of natives is frequently worse than those that are first generation immigrants, both have the same standard to meet. It should be more of a challenge for a non-native speaker, but then working in another language is like that. I would not attempt to work in a language I was not fluent in and would not expect a company to hire me to do that. – Orbling Dec 29 '10 at 15:24
  • @Orbling Again, it must depend on the job. I had a prof that had such a thick Chinese accent that no one bothered to even ask him to repeat himself except when he was explaining exam rules. People shouldn't teach unless they have good command of the language. On the other hand, ditching programmers because they have bad grammar, if it's for reasons other than carelessness or disrespect, would be somewhat perverse. Also, I live in Vancouver. This city (nor this country) would never even have formed if people were afraid to look for work because they don't speak English perfectly. – Rei Miyasaka Dec 29 '10 at 15:39
  • @Orbling, there is no such thing as being "completely fluent" in some language. Learning English is an ongoing, incremental process for both foreigners and native speakers, but natives have a head start. I have been speaking English daily for over 10 years now, I still learn new words and on occasion realise that I have learned something wrong. I personally would be grateful if someone pointed out a mistake and helped me learn something new; at the least it would have been a mistake that I could have caught and corrected myself - either way no feelings will be hurt. It takes tm to imprv langg. – Job Dec 29 '10 at 16:34
  • @Rei Miyasaki: Nor here, most western countries or at least cities are primarily composed of immigrants and their descendants. Though the days where you can get away without speaking the language are mostly long gone. Its not so bad if the job is so simple you can get away with it. Our profession is complex and intricate and the devil is often in the detail, so good language skills are a requisite not an option. – Orbling Dec 29 '10 at 16:35
  • @Job: LOL, it does that. You are right, "completely" was probably a poor choice of word. My intended meaning was "as fluent as an educated adult native speaker, who has a standard considered good academically". – Orbling Dec 29 '10 at 16:43
  • @Orbling I don't think it depends on the difficulty of the job; i.e. that people not fluent in English are incapable of doing difficult or "intricate" work in an English environment. It depends on the *communicational nature* of the work. It's perfectly possible to convey well-formed, concise ideas even with imperfect English. The question is whether or not it's impractical to do so, as it's impractical in the case of teaching. Again, being incapable of expressing organized thoughts and ideas with precision is a totally different matter from being incapable of doing so with correct syntax. – Rei Miyasaka Dec 29 '10 at 17:23
  • @Rei Miyasaki: Possible, but not desirable, due to being open to misinterpretation. As programmers, we all know the importance of syntax. – Orbling Dec 29 '10 at 17:28
  • @Orbling Sure, but in my experience I've had way more problems with programmers that are flat out idiots than programmers that have bad English. I'd rather saturate my workplace with the latter, as programmers that are neither stupid nor have bad English are in short supply, be it in web development or tech support or cutting-edge theoretical R&D or any other field. Which brings me back to my point: I'm not going to give up working with an otherwise talented programmer. – Rei Miyasaka Dec 29 '10 at 17:39
  • @Rei Miyasaki: Considering the current economic climate, I have found that programmers who are both highly capable and have near flawless English are overly abundant. Not *giving up* is one thing, not *starting to* is another. – Orbling Dec 29 '10 at 17:41
  • @Orbling I don't see how they differ in this case. Am I supposed to immediately try to un-know everything about a person's programming aptitude as soon as I notice that their English kind of sucks? Also, demand for developers is actually rising, at least in the UK: http://www.itjobswatch.co.uk/jobs/uk/software%20developer.do – Rei Miyasaka Dec 29 '10 at 17:50
  • @Rei Miyasaka: Rising, yes, though I am at a loss as to why employers have any trouble finding suitable candidates. There are a multitude of unsuitable candidates to wade through granted. I don't think we need to forget qualities in a candidate. But an employer needs a *required* list, as well as a *desired* list, good English should be on the *required* list. No absence on the *required* list should go through. – Orbling Dec 29 '10 at 18:01
  • Lots of reasons. Locality, and specialization come to mind. Also, I thought we were discussing *why* good English should or shouldn't be on the list of required traits, not that anything not on the required list shouldn't go through. – Rei Miyasaka Dec 29 '10 at 18:14
  • Ughhh, TinyMCE has *terrible* English all over -- both in the code as well as in the documentation. It borders on unusable. Check this out: http://tinymce.moxiecode.com/wiki.php/API3:method.tinymce.dom.Selection.isCollapsed `Returns true/false if the selection range is collapsed or not. Collapsed means if it's a caret or a larger selection.` – Rei Miyasaka Dec 30 '10 at 23:45
  • @IAdapter "Id" -> "I'd", "its" -> "it's". – Hugo Oct 02 '11 at 20:02
  • @Rahul As your question is about correcting grammar, I must point out you should delete the space before the final question mark. :) – Hugo Oct 02 '11 at 20:05
  • Pretty pretty please always do so! – Peter Ajtai Oct 23 '11 at 00:48
  • I wish this Q weren't closed. The reason, Qs "seeking career or education advice are off topic", seems silly. The majority of Q on StackExchange seek career or education advice! Anyway, I don't see anything in this Q that is specific to career or education. It's a reasonable Q about whether mistakes in spelling, grammar, etc. should be pointed out in code reviews. I think the closure indicates the users that voted for it personally don't like that kind of comment in reviews for some reason. I think grammar comments should be given to help the writer and make code maintainable. – Mr. Lance E Sloan Aug 08 '16 at 14:57
  • `doesUserHasPermission()` this is clearly a lolcatz joke. – Att Righ Jan 07 '20 at 21:47

15 Answers15

214

Code with spelling and grammar errors is unmaintainable.

  • People won't remember the bad grammar, so they'll try to call the function as it should have been written, and that's how bugs happen.

  • You can't grep for something in the code if you don't know how it's spelled.

  • Most people who make grammar/spellings do so inconsistently, so they'll introduce many bugs with mismatched naming. This is particularly problematic in languages that don't require variables to be explicitly declared before use, because you can introduce a new spelling and your code won't come to a grinding halt to let you know you screwed up.

Correcting these problems is not pedantic, nor is it necessitated primarily by others' opinions of one's intelligence, literacy, etc (though that's a big side-effect); it is about writing quality, maintainable code.

HedgeMage
  • 4,313
  • 1
  • 22
  • 28
  • 7
    +1 Sometimes sparing someones feelings is important, but when it's a code review ... if you catch it, it's fair game to comment. My company uses crucible for code reviews, which allows all reviews to see that it was caught and allows the reviewer to mark it not as a defect, but as style. – opello Dec 28 '10 at 06:26
  • 21
    +1 - Once spelling and grammatical errors make their way into an API, they are nigh impossible to get out again. I spent the better part of three years having to write "Avtivity" instead of "Activity", and it always physically *hurt* to do so. – John Bode Dec 28 '10 at 15:40
  • 1
    Languages that don't require variables to be declared before use, while convenient, should not be used for code that has to be reliable enough for production operation. – John R. Strohm Dec 28 '10 at 18:20
  • @John Bode, you couldn't find&replace that one word? Ouch. – Stephen Furlani Dec 28 '10 at 18:52
  • 1
    Unmaintainable like the `creat()` function? – Jé Queue Dec 28 '10 at 19:04
  • It's so true. Unlike some teachers in high school, the real world DOES take off for spelling. ALWAYS. – Matt DiTrolio Dec 28 '10 at 20:06
  • 9
    For better or worse, good programming practice often comes down to something very like pedantry. Plus, I'd like to find the person who misspelled `Referrer` in the original HTTP spec and kick him in the ankle. Of course, it was probably Berners-Lee and so I'd feel guilty afterward... – Michael Lorton Dec 28 '10 at 20:17
  • 2
    @Stephan Furlani: that's the point I was trying to make; it was part of an API that we didn't own. We couldn't fix it on our end, and the process for getting it fixed was ugly and lengthy enough that nobody wanted to mess with it. – John Bode Dec 28 '10 at 21:01
  • 2
    @John Bode, I think you should have created a wrapper function :) C# has a neat trick for that (I forgot its name though). – Job Dec 29 '10 at 16:40
  • Code with typo unmaintainable? No, just fix the typo. Hard to maintain: yes, nobody wants to fix a typo. Also, a typo bug must often be corrected at several places, which may be hard, e.g. the name of a database table or column. Conclusion: code is often hard to maintain / unmaintainable, even without simple typo's. – Roland Feb 12 '16 at 09:57
  • I have had this dilemma for a while to point out grammar mistakes or not. While this is helpful, its also important to give constructive feedback and help one improve. Does anyone have a good resource on helping engineers get better at English/grammar - a toned down version of the language as a course with contents more relevant to programmers? – vaidik Jun 06 '17 at 19:12
  • "You can't grep for something in the code if you don't know how it's spelled". Either because you know how to spell it correctly, but you don't know which incorrect spelling is used in the code. Or because you don't know how to spell it. – gnasher729 Jan 24 '20 at 23:31
39

Yes definitely. It's easier to remember the name if it's grammatically correct. Trying to remember the name and grammar mistakes is another thing entirely.

Jason Baker
  • 9,625
  • 8
  • 44
  • 67
28

Don't point them out as defects in a formal code review. Instead, mark up a listing and talk with him/her PRIVATELY about them. Be as diplomatic as possible about it, just "Hey, something I noticed, and I've run into people who REALLY look down on this kind of thing, they think it makes the programmer look careless and sloppy."

If this is code a customer is going to see, it absolutely MUST be corrected. Like it or not, it DOES reflect on your company's reputation.

For the example you gave, I suspect it started out as UserHasPermission, and someone else told him that local practice was doesUserBlahBlah() rather than UserBlahBlah(), and he just overlooked the grammar change.

John R. Strohm
  • 18,043
  • 5
  • 46
  • 56
  • 13
    Saying it's about others' perceptions makes it seem unimportant. Tell the truth -- they are making the code harder to maintain and build on. – HedgeMage Dec 28 '10 at 05:19
  • 5
    @HedgeMage: My personal experience with things like this is that some people are EXTREMELY touchy about things they perceive as criticism of themselves. Worse, there can be really ugly political repercussions, if the person you appear to be criticizing is beloved by management. (Yes, I have the scars to prove this.) AND I have seen organizations that literally didn't care abou this kind of thing, as long as the code worked, for some definition of "worked". My personal feeling is that you have a better chance of getting it fixed, with minimal other headaches, if you go gently. – John R. Strohm Dec 28 '10 at 05:31
  • 13
    @John I can certainly see that a bad work situation can force someone to have to walk on eggshells like that -- but it *is* a bad situation if that's an issue in the first place. Someone with so fragile an ego (and a workplace culture that allows their shenanigans) isn't good for business to begin with. – HedgeMage Dec 28 '10 at 05:37
  • 6
    Most mature programmers accept criticism well. After all, thats what peer reviews are for (and we all do code reviews, don't we?) It is quite OK to critique the spelling and grammar of comments, function names, etc. It ALL reflects not only on the author but on their whole organisation. – quickly_now Dec 28 '10 at 05:56
  • 6
    I gotta agree with HedgeMage here, if you can't point out mistakes like this during a code review (particularly when they're objectively wrong, like the example in the question) then you've got bigger problems... – Dean Harding Dec 28 '10 at 05:59
  • Agree with John. In my experience or most people (programmers or otherwise) tolerance for criticism is inversely proportional to their seniority and directly proportional to seniority of the person who is doing the criticism. – Gaurav Dec 28 '10 at 06:02
  • 1
    @Dean if done during a code review the developer quite likely might believe their reviewer was grasping at straws to find something wrong, if the reviewer would use valuable time to talk about spelling. – Nicole Dec 28 '10 at 07:02
  • 2
    @Renesis: if the quibble was about local variable names, then yes, it *may* be overkill. If it is about function names or properties, or anything public, then it should absolutely be corrected in a code review. Code reviews are designed not only for code correctness, but also for maintainability and consistency. – Wonko the Sane Dec 28 '10 at 14:40
  • @Renesis - Someone would only perceive this as grasping at straws if it would only be pointed out when nothing else was found. When it is expected regardless of the presence of other feedback, then it won't be perceived as grasping. – MIA Dec 28 '10 at 19:36
  • 1
    Personally, I'd be a bit put off by this approach. A grammatical mistake is a minor issue that's easily corrected and pretty difficult to argue. It's one of the easier things to critique. Save this approach for the major critiques of the person's code. – Jason Baker Dec 28 '10 at 23:02
  • 2
    Isn't the point of code review to find out every little bit that could be wrong? When there's a major architectural issue, or when I just can't figure out what a function does (or how or why it does it), that's when I go talk to the developer as the code needs a major change... – configurator Dec 28 '10 at 23:59
  • Also, a review with nothing wrong but minor changes is marked as 'accepted' - a rejected review is only one where I've talked to the developer and we both agree that a major change is in order. – configurator Dec 29 '10 at 00:02
  • Where I am, it’s not accepted nor rejected, it just stays in review. You add a comment, then it’s fixed (or the developer adds a comment why it is actually right), and then it is accepted. – gnasher729 Jan 24 '20 at 09:01
11

Change it yourself.

Hopefully you're in an environment where code "ownership" is not an issue. If you have access to the project in source control, just go in and fix it yourself. If you see a particular coworker making the same type of grammar or spelling errors consistently, you might want to point it out, but that will depend on your relationship, whether the person is a native English speaker, and their general receptiveness. But whether you ever decide to do that or not, just quietly go and make the fix. I do this all the time, if I see a typo, especially in a method signature or public property, I just fix it. Occasionally I can't even resist the temptation to fix a typo in a comment, but that's just me :)

Marcie
  • 3,009
  • 2
  • 19
  • 21
  • 6
    And then you find that you've just broken a third guy's code. You need to get these sorts of things fixed ASAP, not just when you can get to it after the first guy's checked everything in. – David Thornley Dec 28 '10 at 15:14
  • 1
    If you're worried that a fix to any piece of code might break "someone else's" code, and you have no way of telling, then you have bigger problems than spelling. – Cornel Masson Sep 30 '15 at 11:56
  • @CornelMasson: Not really. This is a key part of designing an API. – Lightness Races in Orbit Jan 04 '16 at 01:48
6

I guess its worth mentioning here that the HTTP referrer header in the HTTP protocol was misspelt as "referer" (and we have to live with it/we have learnt to live with it .) :)

Lightness Races in Orbit
  • 8,755
  • 3
  • 41
  • 45
Bunny Rabbit
  • 238
  • 1
  • 6
6

I'm a developer whose native language isn't English, it's Dutch actually, and wouldn't mind at all if someone would point me a grammar or spelling mistake. In that way I can constantly keep improving my English. And it is certainly not difficult to correct all the mistakes in all of your source code. A simple Perl script can easily be written to loop thru all files in a folder. Perhaps even it can be done with sed? I don't know.

So I would certainly point out grammar or spelling mistakes in someone else's code, but only if I'm absolutely sure wether it is correct what I'm saying.

4

I agree with other answers saying that code with grammar mistakes is unmaintainable.

I also want to add a few things:

  • Code is often written by people who don't speak English very well and/or English is not their native language. If there is a grammar mistake in a code you review, this does not mean that your coworker made this error. Maybe it was just a copy-paste from a website.
  • If English is not a native language of your coworker, it may be a good, or a very bad idea to tell her/him about this mistake. Being from France, I always welcome remarks about the errors I make in English, because it's the only way I can avoid them in future; on the other hand, I know several people who feel really hurt if you tell them about grammar mistakes they make.
  • Like John R. Strohm said, do never do it publicly. Most of the people will be really annoyed by this.
Arseni Mourzenko
  • 134,780
  • 31
  • 343
  • 513
  • 12
    "Maybe it was just a copy-paste from a website." Then the person copying it should have caught the problem and fixed it. Copying it verbatim and leaving errors is as bad or worse than writing it themselves and creating the errors. "I know several people who feel really hurt if you tell them about grammar mistakes they make." In business we all should behave as adults and coworkers who are pulling together to accomplish a common goal. The person bringing up the issue needs to use tact, and the person receiving the criticism needs to accept it and grow from it. – the Tin Man Dec 28 '10 at 07:21
  • 3
    I agree 100% that as professionals, we should behave as adults, and to not take this personally. But it absolutely needs to be pointed out and corrected. Yes, tact should be used, and it should be approached as needed, depending upon the individual. But if you are in an environment where it is encouraged to avoid the issue altogether, maybe it is time to leave. This would point to a poisoned environment. – Mark Freedman Dec 28 '10 at 13:50
  • Any spelling error can be checked by a simple google search – JoelFan Dec 28 '10 at 20:56
  • If someone feels hurt when you point out grammar mistakes to them, they should be hurt. If they have dyslexia, they should tell you. In that case I will fix mistakes quietly; pointing it out would be unnecessary. – gnasher729 Jan 24 '20 at 08:50
2

I would recommend using an IDE with built-in spellchecker. IntelliJ Idea does a wonderful job for Java programs. There are many embarassing typos it catches, not only in names of functions, but in e.g. exception messages the user gets to see. A program that produces messages full of typos does not inspire much confidence.

Roman Zenka
  • 211
  • 1
  • 2
0

I do it only if

  • it affects the usage of the program
  • it affects the accuracy of the program
  • I explicitly know the author wants to be corrected.

Just as a side note, if your function names are long enough to have grammar, they're probably too long. In the example given, I would call the function userHasPermission and move the "grammar" into your code, something like this:

if userHasPermission() ...
Mark Harrison
  • 765
  • 5
  • 7
  • 1
    There's still the same potential for grammar mistakes, though, since in this case `userHavePermission()` would be wrong. – Dean Harding Dec 28 '10 at 08:44
  • But that's exactly the point!! `userHasPermission()` implies that it returns a bool because of the grammar ~ OR ~ it could mean that it *sets* user permission. (Officer has the bridge :: user has permission). It's still vague. – Stephen Furlani Dec 28 '10 at 14:23
  • While I agree that the example names in the Q are unnecessarily long, I caution about the "too long" generalization. In this case, the concept can be expressed in fewer words, so it should be shorter. However, what is "too long"? Is there a character or word limit? – Mr. Lance E Sloan Aug 08 '16 at 15:07
  • DoesUserHavePermission adds nothing if value compared to userHasPermission. On the other hand, userPermission is unclear. – gnasher729 Jan 24 '20 at 08:48
0

This also happens A LOT in my project (being populated by natively Hebrew, Russian or Arabic speaking people), but even to a higher level - often I see code that uses some obscure terminology that happens to be what the dictionary produced as the translation for what the author had in mind, and it has nothing to do with the they meant...

Personally, when it happens so frequently and by so many team members that could have wrote the code even before I joined the project, I tend to ignore it, because it just won't matter.

However, if I'm committing some work in the same file as code or comments that have been written long ago and they have typos in the, I will correct them just because it's not too much work.

0

Golden Rule Applies

Do unto others as you would have them do unto you.

I want others to have my back on this kind of thing, so I help others. Being gracious and supportive can go a long way in your favor.

kevpie
  • 527
  • 4
  • 7
  • 2
    -1 for vagueness -- I have no idea what you are advising the questioner to do. – HedgeMage Dec 29 '10 at 18:27
  • @HedgeMage, I am advising the OP to apply http://en.wikipedia.org/wiki/The_Golden_Rule – kevpie Dec 29 '10 at 19:59
  • 2
    I'm familiar with it. In addition to being patently silly (there's no reason to believe that the way Alice wants to be treated is the way Bob wants to be treated), it distracts from the real issue: creating good code. Sure, I'm not going to be a jerk about it, but I'm not basing whether or not to raise a technical issue on whether or not the person writing bad code wants it raised! – HedgeMage Dec 29 '10 at 21:21
  • I think @HedgeMage's complaint can be illustrated like this: I want code to be the highest quality allowed by the time and resources available, because I care about the project and my future work on it. Bob wants to avoid criticism for correctable mistakes, because he doesn't take criticism well. We will implement the "golden rule" quite differently. – eyelidlessness Jan 12 '14 at 04:46
  • The advice means that the OP operates how he would want to be treated. Not to treat Bob how Bob would want to be treated. I was encouraging the OP to correct Bob as he (the OP) would want to be corrected for the same errors, specifically in the context the OP has shared. – kevpie Jan 13 '14 at 05:04
0

This is a minor mistake in code, but is a mistake. Treat it like any other mistake that you find. My policy is always to assume that my co workers are competent and treat them that way until they prove otherwise.

If it's a single mistake I might just fix it and check it in. If it's a pattern I might start getting that co worker to review those fixes. Let them know that you think they're a good coder, but that this is something that would be good to improve on. I don't think I'd ever make a big deal about something like this though.

As long as you don't treat it like it's a big issue it should be easy to put that co worker in a position where they can improve without putting ego on the line.

overstood
  • 133
  • 1
  • 4
-1

Sure point it out, but don't waste your time checking for spelling mistakes. Use a tool to automate this on your CI. On .net fxCop can do this...

khebbie
  • 159
  • 4
-1

It depends largely on what the mistakes are, how common and how bad they are, and whether it's actually a bona fide mistake or just not how you'd word it.

I personally can't stand it when some idiot drags a 5 minute code review out to half an hour because he wants everything renamed to how he'd do it and all the comments reworded just because he likes sticking his oar in. A logging line that says "Loading data objects" does not need to be changed to "The data object loader component will now load the relevant data objects from the data object storage component".

/rant :)

JohnL
  • 1,890
  • 13
  • 14
  • 2
    Insisting on things my way is one thing. Insisting that things use proper spelling and grammar is another thing entirely. – David Thornley Dec 28 '10 at 20:54
  • Not entirely sure why my answer merits a downvote but nevermind... Also, where did my reply to David's comment go? Anyway, 100% correct English grammar is not always desirable in development. In my above example, "Loading data objects" is not a complete sentence, but it's the more preferable wording of the two - concise, easy to localise and doesn't take up a lot of space. – JohnL Dec 29 '10 at 14:00
-1

As with many other good programming practices, the only objective, non-political, and effective way to implement a policy about spelling in programs is to automate it as part of the pre-commit process. Automation will save you from enormous amounts of grievance even if you have to write your own tool for the purpose.

Apalala
  • 2,283
  • 13
  • 19
  • 4
    Many of the most important errors *can't* be caught automatically. This applies to spelling and grammar too. You could do an automatic check, but the results would have to be equivalent to warnings. This is because spell-checkers produce both false positives (e.g proper nouns) and false negatives (two, too, to). So manual intervention is necessary. – Matthew Flaschen Dec 28 '10 at 21:38
  • That sort of automation doesn't solve these problems, it just catches some of the mistakes that people make. – overstood Dec 28 '10 at 22:54
  • 1
    Autocorrect??? There are plenty of examples of autocorrect "fails" on the internet. That's definitely not good. – Florian F Jan 04 '16 at 02:35