Saturday, August 26, 2006

the two species of programmers

Along the same lines as that "clash of programming language civilizations" post, I have long had the idea that there are two basic species of programmers. I have no hard evidence for this blurry distinction, but only my own experience and hyperactive generalization. I'm also sure that I'm not the only one to have stumbled upon this. Anyway, in alphabetical order, the two species: linguistic and mathematical.
  1. Linguistic. This species spells correctly most of the time. In fact, the linguistic can often be observed lecturing or poking fun at the mathematical's egregious spelling errors. Per its name, the linguistic has excellent language intelligence or aptitude, and perhaps may study little-used languages like Esperanto. The linguistic may be good at abstract algebra, but may not be as quick as the mathematical when it comes to, say, listing the first 23 prime numbers. A program is a series of sentences and clauses for a linguistic. Functional programming may come more naturally to the linguistic than the mathematical. The linguistic may take excessive pleasure in the logical elegance of a program's design. He or she may be more apt to comment "if the computer can't run my beautiful program efficiently, then that's the compiler or interpreter's problem". Top-down or UML-style design may be a preferred mode of operation for the linguistic.
  2. Mathematical. This species often has difficulty spelling correctly. But to the mathematical, correct spelling doesn't really matter so long as the idea gets communicated. Per its name, the mathematical has excellent mathematical intelligence or aptitude, and may know practical trivia about timekeeping. The mathematical's intuitive feel for numbers allows for good estimation, such that the mathematical can arrive at an answer but have trouble explaining how he arrived at it. A program is a series of individual calculations for a mathematical. A mathematical would view the statement a = 5 + 2 to be "add 5 to 2 and store the result in a", while a linguistic would view the same statement as "define a to be the evaluation of the expression 5 + 2". Assembly programming may come more naturally to the mathematical than the linguistic. To the mathematical, complex program design is not necessarily a joy; to the contrary, it may be more likely to obscure the real functioning of a program. He or she may be more apt to comment "perfect theroetical purity isn't worth anything if it doesn't adequately solve this particular problem in the real world". Bottom-up or eXtreme Programming may be a preferred more of operation for the mathematical, in which program modularity evolves naturally.
I make no value judgments here about which species is "better". For what it's worth, I identify more with the linguistic species. Of course, my taxonomy is a failure in the sense that any actual programmer may "switch species" in any given situation. For instance, I know that whenever I write a shell script, I do it like a specimen of the mathematical species: look up some quick examples on the Web, use trial-and-error to figure out which utility parameters do what I need, and basically learn as little of the syntax as I must. My two categories also fail in the sense that any actual programmer probably exhibits features of both species. I think it should go without saying, but the best, well-rounded programmer should be a chimera.

3 comments:

  1. Anonymous3:03 PM

    Interesting idea.

    In my opinion, logic and linguistics are pretty close. Both are concerned with grammar, structure, and form as opposed to content. Both are very close to language theory.

    What you call a mathematician, I'd rather call an engineer.

    ReplyDelete
  2. Anonymous9:37 PM

    I agree that your dichotomy exists, but I think your terminology is misleading. I don't see how someone good at abstract algebra would be classified as non-mathematical. By your definitions, many mathematicians would not be "mathematical".

    I would say the difference is better characterized this way: a formal/abstract view of programming vs. a savant-like understanding of how computations are done on a step-by-step basis.

    Also, I disagree that your "linguistic" programmers would prefer UML. To me, UML is not formal enough to represent programming constructs precisely.

    There are two ways of dealing with overwhelming detail. One way is to elide most of the details, give a summary, and use analogies to describe technically difficult concepts. This what a manager means when he says, "Don't make it so technical. Keep it at a high-level." This is also what journalists do when they write science articles. The other way is the mathematician's way: to generalize by finding the smallest set of conditions necessary to reason correctly. So you talk about groups and rings, and consider the integers to be a special case.

    To me, UML is the journalist's way. Your "linguistic" programmers follow the mathematicians way. And your "mathematical" programmers (this is why I dislike your terminology) do neither, but revel in the details.

    ReplyDelete
  3. Thank you for the criticism. Picking names was one of the hardest parts of writing this. I wanted to pick names that had no negative connotations, but were broad enough to get the full meaning across. I thought about neat/messy (but messy could be a synonym for sloppy, see Oscars and Felixes for that), theoretical/practical, computer scientist/hacker, abstract/concrete.

    It's true that a "linguistic" programmer probably groks higher math pretty well, and is therefore "mathematical" too. My own experience in math classes was that I was great at differentiation, integration, and proving trig identities (also at balancing chemical equations) but I wasn't so hot at actual math competitions, whose qustions required the leaps of insight into the problem that real mathematicians do. Also, I'm not that swift with mental arithmetic. In short: I may be good at math, but I'm not good with numbers.

    Maybe I shouldn't have said UML. What I meant was the high-level OO design approach in general - coming up with a full stable of objects (perhaps even with brittle inheritance hierarchies) before writing a single line of real code.

    Yeah, I agree that there's a connection between logic and linguistics, although the brain's high tolerance for ambiguities allows languages to evolve in all sorts of illogical ways. Hence the usefulness of well-defined math syntax for expressing math ideas. Lojban is an artifical language that tries to be as logical as it can be without sacrificing the expressive power of natural human languages. It even has formalized grammar rules (the same as rigorously-defined programming languages) for parsing.

    ReplyDelete

Note: Only a member of this blog may post a comment.