Tuesday, December 19, 2006

What If There Are No Gods?

Couple blog posts I read recently say that Smalltalk is the language of the gods, or that Smalltalk and Lisp are the languages of the gods. This is an interesting idea, because if Smalltalk and Lisp are the languages of the gods, then surely Ruby is Prometheus, packaging up that holy fire in a way mere mortals can use. However, these statements are much more poetic than true.

About a year ago, I was doing some tutoring in Java for a local college. One of the girls I was tutoring was very good-looking, young, fit, and was supposed to be mastering interfaces. Instead she was struggling with System.out.println(). Around the same time I was tutoring her in Java, I was reading books on Lisp by Paul Graham and Peter Seibel. She was at my place one day, saw one of these books, and asked what it was about. I told her it was high magic and nothing she ought to trouble her pretty little head about.

She opened one of the books, gave it a little snort of contempt, and said, "Oh yeah, Scheme. We did that last year. It's all about recursion?"

As far as languages of the gods go, this young woman was smart, but she wasn't a programming goddess. She didn't have to be. One moral of this story is that no matter how clever and enlightened you think you are, you might in fact just be this silly sexist moron. But a much more relevant moral is that the simpler language might in fact be the better language. It's entirely possible that this young woman found Scheme easy and Java hard because simple designs make more sense.

To say that Lisp is a language of the gods, and Java is a language for mortals, that could in fact be getting everything entirely backwards. Scheme is actually easier to use than Java. So the easier language is the language of the gods, and the hard one is the one for regular people? How does that make sense? And think about something else. The best implementation of Smalltalk I've used is Squeak. Squeak was designed for children. So if Squeak is a language of the gods, what does that make Logo? The language of the angels?

Maybe there's something else going on here.

If there's anything godlike about using Lisp or Smalltalk when the rest of the world is on Java and C#, it isn't the skill level required. It's the balls. Standing up to the rest of the world and telling them, "your technology decisions are bad and I'm going to use a language that doesn't suck" is a very unusual move. It requires a lot of courage. But if you think about that, that's kind of bad. I mean, if what I'm saying is true, then the average technology business is kind of pathetic.

Unfortunately, I've worked for a very large number of different technology businesses, and I can tell you with confidence, certainty, and no fear of inaccuracy that the average technology business is indeed kind of pathetic.

The sad thing is that Ruby still kind of qualifies as Prometheus. It is still a midpoint between the languages of the gods and the languages of ordinary mortals, but not just because of its design. Using Rails is ballsier than using PHP, but it's still abject cowardice compared to using Seaside.

You certainly don't have to be a programming god to use Rails. Far from it. It's possible to put together Rails sites without ever really learning to program at all. When Java replaced C++ as the dominant language, one of the Java guys said that they had brought the world kicking and screaming a few inches closer to Lisp. Rails is fast becoming huge, but to a certain extent, they're only doing the same thing the Java guys did -- bringing the world a few inches closer to Lisp (and Smalltalk). It's not so much dragging the world kicking and screaming in this case, though. This time around it's more about hiding all the good stuff under the hood, where nine out of ten users will never even see it.

But say that we know the average technology business is really kind of pathetic. Say further that the only difference between a company running Seaside, a company running Rails, and a company running PHP is that the Seaside company has huge balls, the Rails company has some balls, and the PHP company has no balls at all. That's got nothing to do with the godlike qualities of any particular language. All that tells you is that very few companies opt to use the best technology available to them. And unfortunately, anybody who has noticed that Microsoft exists already knew that.

The culture of technology businesses has a serious problem, which is that technology decisions are generally made by people who do not understand technological issues. But saying that the best languages somehow require godlike intelligence, when they are in fact simpler to use, more intuitive, and in one case designed for little kids, that's just silly. The difference between a Smalltalk programmer and a Java programmer isn't really located inside their brains at all. Look a little lower down. It's a difference at the scrotum level. One of these programmers has a scrotum, and one of them does not.

It's worth pointing out, the poster children for Lisp and Smalltalk are Paul Graham and Avi Bryant. Neither one of these guys actually had to stand up to management and tell them they were wrong. They just went ahead and started companies using better technology. Paul Graham obviously won pretty big when he did that. It's too early to tell with Avi Bryant, but there's no doubt at all that Dabble puts every other Web app in the world to shame.

I'm going a little too far here, and obviously some of the sexism has returned, with all this talk about genitals, but really, I'm just having fun with this. Think about it. Lisp and Smalltalk aren't languages of the gods. Maybe there are no gods. Maybe all there is is clear thinking and fuzzy thinking, good decisions and bad decisions, morons with MBAs and people who have the courage to state the obvious.

Maybe it is that simple.

---- Update: More people seem to have read this than I anticipated, the anticipated number being zero, so, just for the record, I don't hate anybody's languages. It's not about advocacy. And also, think about this: as trendy as Rails is today, last year, DHH and anyone else on Rails were in that same category with Paul Graham and Avi Bryant, building companies on technologies other people swore weren't ready for prime time. Like I said, it's not about advocacy, it's about, if you want to do it, just do it already.


  1. Nice post, there's certainly much truth in the simple fact that simpler languages are simpler to use.

    However, consider that they also enable more styles of programming, which allow you to go wrong in oh so many more ways, hence the language of the gods attitude.

    Newbie programmers really do find basic simpler than Scheme, Lisp, or Smalltalk. Smalltalk may have been designed for children, but it's hardly been successful in that arena.

    Look around, only the most experience programmers end up choosing those languages, but it's because they allow more freedom to the programmer, and you need lots of experience to truly appreciate that freedom.

    Language of the gods doesn't mean mortals "can't" use them, only that they choose not too. Language of the gods was more about where the gods end up going. They want languages without training wheels.

    Ramon Leon

  2. I think you misunderstand what most people mean when they say "X is the language of the gods". I don't think they're trying to say "language X is usable only by godlike programmers". It's more a statement about the "fundamentality" of the language.

    To draw a parallel with astronomy: Humans created page after page of star charts, seemingly arbitrary rules about circle-within-circle orbits, and ever more complex and crufty systems to explain the motion of the planets in the heavens. But then Newton comes along and discovers that God set up the whole system to work on two rules: F=ma and G=m1*m2/d^2.

    It's atoms versus alchemy, it's E=mc^2 versus pages and pages of differential equations, and it's why physicists continue to search for the grand unified theory.

    Given that aesthetic, it seems clear to me that the universe would be written in Lisp rather than, say, C++.

  3. If you take "gods" to be anthropomorphized psychological archetypes, models hardwired in our brains, then DNA becomes the (literal) "language of the gods." Or, perhaps DNA "is" God, and RNA "is" the angels? After all, the double helix serpent is virtually immortal, and literally guides us through life, cell by cell.

    So, in programming terms what does this mean? Well, I'm no programmer, nor a geneticist or neurologician, but it seems to me the "gods" don't use a single language. At the most fundemental level, there is the base-four (A C G T, rather than binary 0 1) "machine language" of DNA. Unlike computers, our DNA programs both hardware -and- software. DNA is a set beyond any manmade programming language, until the reproducing PCs come along...

    Maybe we all spoke in DNA (low-level) language before the Babel deal, now we speak in (high-level) regional definition-based tongues. Just as programmers all originally spoke in binary, they now speak in high-level multi-paradigm languages.

    Note that the "gods" keep it simple, and long. The human genome contains about three billion base pairs (lines of code), making up over 20,000 genes (functions?), across 24 chromosomes. Most of this is just "commented" code, nonencoding "junk DNA," tracing each individual back to the dawn of life. God's word is absolute and final (He never goes back to revise), but it isn't all compiled.

    RNA is, of course, the compiler (in the computer analogy) and angels (in the theological analogy). It takes the machine language of DNA, and translates it into proteins. There are a number of cofactors, other nucleotides. Saints?

    What's going to happen when computer science gets together with the biotech?

    Now, these might all be false idols: quantum, nuclear manipulation could be the ultimate "language." Or maybe that's just the invisible, out of reach Tao. To quote Ron Hogan's translation of Lao-Tzu, "If you can talk about it, it ain't Tao." We can talk about DNA, we can talk -in- DNA -- it's a fully realized functional language. Perhaps nanotechnology is "taotechnology." Or perhaps I'm full of shit.

  4. @ramon -- I know what you mean, I'm mostly just kidding, but I think the real reason experienced programmers go for these languages is because they develop the ability to compare languages at all, and when they do, the right choices are relatively obvious. I think most people just pick up languages based on social factors like peer pressure and current trends.

    @ivymike -- the universe might be written in Lisp, but I meet people who were written in Basic every day. seriously I think that idea that elegance is next to godliness is dead-on, but I think coding in Scheme is less like toying with powers men do not understand and more like doing push-ups. It makes you stronger, it's a good idea, I don't know if it's such a big deal, though.

    @maxwell -- I have no idea, dude. maybe.

  5. "Newbie programmers really do find basic simpler than Scheme, Lisp, or Smalltalk."

    I object to this statement as it is untrue. My 5 year old son is currently learning Haskell - a language that far supersedes Lisp/Scheme in "power".

    Of course, he hasn't learned many of the basic concepts that even a Java programmer would know, but the point is, he is learning at a rate similar, if not slightly faster, than the Java students that I used to teach at university. He is also impaired by barriers in communication because of his age.

    Nevertheless, my son will not be seeing a for loop (or Lisp/Scheme for that matter) until he is "ready". Just like you wouldn't let a child watch a horror movie with explicit violence. That is to say, he should be aware that "bad stuff is out there", but give him the platform to make his choice - instead of the other way around as is so prevalent.

    Learning how to program is easy. Unlearning how not to program is not - I think this blog post supports this proposition quite well.

  6. This comment has been removed by a blog administrator.

  7. My 5 year old son is currently learning Haskell...

    ...my son will not be seeing a for loop ... until he is "ready". Just like you wouldn't let a child watch a horror movie with explicit violence.

    best comment EVAR

  8. Haskell - a language that far supersedes Lisp/Scheme in "power"

    Eh? How so?


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