Why programmers make good editors

A couple days ago, whilst reading a post on a well-known blog (though I no longer remember which one), I noticed an unmatched parenthesis. A long parenthetical aside, fully two paragraphs in length, was not terminated with a matching right parenthesis. This is quite an easy mistake for most to make, and I do not fault the author overmuch. The length of a parenthetical aside is inversely proportional to how likely the reader is to remember he is still in a parenthetical aside by the time he reaches its end. In this case, the person doing the reading was also the post’s author going back through to edit it, and he simply missed the missing closing parenthesis.

But I’m the kind of person who notices these errors, and I’m also the kind of person who often thoroughly analyzes situations (note that I did not say “over-analyzes”), so I got to thinking, why do I notice these kinds of errors especially well when many people tend not to? I don’t think it’s just because I personally enjoy using parentheses so much that I keep a careful watch for abused parentheses everywhere I go, like some superheroic defender of downtrodden punctuation. No, that’s not it. Then it hit me. Keeping track of matching syntax is a very important activity in my day job — computer programming. Programmers run into time-consuming compiler errors early and often if they can’t keep their parentheses, angle brackets, curly braces, and square brackets tightly wrangled.

Therefore, it’s worthwhile to keep track of syntax nesting levels in your head as you write or read code, adding a mental “+1″ for each opening character you come across and taking off a mental “-1″ for each associated closing character. By the end of the chunk of code, you should be back to the number you started off with (for my fellow computer scientists out there, the best representation of this would be a stack (i.e., push a left symbol onto it and pop a right symbol off, and the stack should be empty at the end (this is how compilers work)). I’m not saying I’m perfect at it; when I’m twenty levels of parentheses deep in a particularly ugly Lisp subroutine, I have no choice but to rely on the compiler’s auto-indentation to make matching manageable. But I definitely think I’m better than most, simply because I regularly work in an environment where it matters a lot.

So as I’m reading prose and I encounter a left parenthesis, some kind of state subconsciously switches in my mind, and I go into parenthetical aside mode. I stay in that mode until a right parenthesis is encountered. If one isn’t forthcoming, I quickly scan ahead in the text to see if there even is one, or maybe there was one already that I simply missed. More often than not, the author has simply forgotten the closing parenthesis. It is my experience that long parenthetical asides are more rare than unclosed short ones. This same mental trick even works for parenthetical asides inside of parenthetical asides and even parenthetical asides inside of parenthetical asides inside of parenthetical asides, but that’s about as far as I go. Luckily for me, you don’t tend to see levels of parenthetical nesting four or more deep, and if you do, it’s probably some Lisp programmer forgetting in what medium they’re writing. If the latter is the case, watch out for cars and cdrs as well.

But I don’t just notice mismatching syntax errors in the written word; I tend to notice all errors (so long as I’m reading with the intent of editing, anyway; when I’m speed reading, I often miss errors on account of not seeing them). I’m a good editor — and not to sound vain, I’ll balance that out by saying I’m a terrible bowler. But I can’t help but think that being good at editing comes naturally to computer scientists. Many of the skills — noticing slight deviations from the rules, especially in the form of syntax — are exactly the same. Both the English language and all programming languages have well-defined rules about how words/clauses may or may not be used together. It’s simply a matter of identifying violations of the rules.

I will add one rather large caveat to my thesis: I’ve known many programmers who cannot spell worth a damn (maybe they flee to computer science because it involves very little essay writing?). Some of them have been dyslexic. I don’t know if anyone’s established a correlation between dyslexia and going into computer science, but I definitely think there is one. So I think programmers make good editors, with the exception of the many programmers who cannot spell well. But if the spelling is good, by virtue of their profession, I bet they’ll be darn good at noticing all of the other errors one encounters in prose.

And for those of you following along closely at home, did you notice the mismatched parenthesis in this post? In the comments below, let me know if you noticed it, and whether you are a programmer. Be honest! Let’s try to get some data that, while not conclusive, will at least be one step above anecdotal.

6 Responses to “Why programmers make good editors”

  1. Kelly Martin Says:

    Nested parentheses should be used extremely rarely in writing. If you find yourself using them, you should seriously consider rewriting whatever it is that generated the apparent need for them.

    I realized some time ago that I abuse parentheticals in my writing, and have taken to editing them out, usually just by moving the parenthetical into the main text, as quite often my parentheticals do not deserve such second-rate treatment. While composing this reply, I started to write both clause ending the preceding sentence, and then this sentence, as parentheticals, before forcing myself to rewrite.

  2. William (green) Says:

    I didn’t notice any mismatches on my first run through, and on a second run through, I only see one. The bit with “(this is how compilers work)” feels pretty forced, so I’m guessing you added that in or reformatted it to demonstrate the point.
    As far as being a CS person… I don’t really know how to answer that at this point. I’m kind of in-between “am” and “am not”, at this point.

  3. Cyde Weys Says:

    Yeah, it was kind of forced. I figured it’d be too obvious if I just left off an end parenthesis in isolation, so I went for some totally unnatural nesting.

    Hey, it looks like it worked!

  4. Ed Says:

    Yeap, noticed it first time. Although I’m not a programmer anymore I did it some years back. I guess it’s a bit like riding a bike…

  5. drinian Says:

    I did not, but then again I was skimming quite quickly.

    Do not confuse English syntax errors with artistic license. If you want a precise human language, go speak Lojban, but don’t expect Shakespeare to come out.

  6. Cyde Weys Says:

    I wouldn’t confuse ‘em for the world. I take advantage of artistic license all the time. But there’s a difference between artistic license and a sentence that’s just plain wrong.

Feel free to leave a comment: