Does programming turn you into a grammar Nazi?

Recently, I had an exchange on 43things.com about the use of the passive voice.

Something that I love about the internet is that it allows you to find people who are up for a discussion of the most arcane things. I can never talk about grammar with my friends or family, which is perhaps quite healthy and for the best.

What’s more, because of the setting, you have a chance to check your facts and develop your responses in a way that is impossible in real life. Thank you Google and Wikipedia.

One of the points of this discussion was that the passive voice can obfuscate the meaning and is less simple than the active voice and should, therefore, be avoided. I disagree with both reasons. A sentence in the passive shouldn’t be much of a challenge for any native speaker of English.

But I thought about this and wondered about the effect that spending so many hours a week programming has on the linguistic centres of a brain.

Consider a fragment of code like this:

my_div.appendChild(document.createTextNode(my_var.get_foo()));

A translation of this into English might be:

Take the value returned by the get_foo method of the my_var object and, using the createTextNode method of the document object, generate a TextNode object for that value. Append this object to my_div object using the appendChild method.

Any programmer might deal with hundreds of lines similar to this on any given day. Trust me (if you’re not a JavaScript programmer), this is simple stuff.

I dislike the fussiness and delusions of superiority that go with correcting other people’s language. I saw a group on facebook recently for people who always carry red pens so that they can correct menus which contain grammatical and spelling mistakes. Not only is this rude (and possibly xenophobic in some of the situations listed by the group), it also misunderstands the point of language and its evolution. Communication is the aim of speech and writing. I’m very much opposed to the idea of Linguistic prescription. To quote dear old Winston Churchill, it’s “the sort of bloody nonsense up with which I will not put.”

However, programming languages (for very good reasons) do have strict rules of syntax.

Consider:

my_div.appendChild(document.createTextNode(my_var.get_foo());

Hopefully, any programmers reading this will have spotted the mistake more or less instantly.

Just by force of habit, programmers tend to end up being fairly precise when it comes to language. Or perhaps, it’s that people who are precise about language end up working as programmers. I just hope that bashing my mind against compilers for years won’t give me any silly ideas about how human languages work.

I also have to admit that writing about grammar scares me. I hope that I haven’t made any speling mistakes and that the passive voice hasn’t been used too much.

Leave a Reply