Paul's Internet Landfill/ 2012/ John McCarthy

John McCarthy

2011 was a bad year for foundational figures in the computer world. You all know about the death of Apple founder Steve Jobs; it was all over the news. Some of you will also remember blog coverage of Dennis Ritchie's death. Ritchie had at least two claims to fame: UNIX and the C programming language. UNIX was -- and is -- an incredibly influential operating system that has direct connections to Linux (which is a reimplementation of UNIX) and Mac OS X (which is based on a descendant of the UNIX codebase). The C programming language is a low-level programming language that can be used across many different computer systems. It was used to implement UNIX, and for better or for worse it is still being used to implement new computer software today. Ritchie helped design the C language, and co-authored an elegant textbook on its use. Steve Jobs and Dennis Ritchie deserved news coverage; their work continues to influence the computer world today.

However, other important figures in computer science died as well. I am guessing many of you will not have heard of John McCarthy, who died on October 24. McCarthy is most famous for developing/inventing/discovering the Lisp programming language, based on the "lambda calculus" described by Alonzo Church. Without getting into too much detail, the lambda calculus describes computation in terms of mathematical functions, in contrast to the "Turing machine" approach to computation, which describes contribution as a series of operations, similar to the individual steps a machine at a factory takes to manufacture a widget. It turns out that despite looking very different on the surface, the lambda calculus and Turing machines are equivalent in the sense that anything that can be calculated using the lamba calculus can also be calculated using a Turing machine, and vice versa.

Because Turing machines describe computation in terms of small operations, they lend themselves to being implemented as programming languages. (That is a little bit of a lie -- programming languages don't actually resemble Turing machines that much. But the ancestry is present.) It is less clear how to implement the lambda calculus as a programming language, and much less clear how to do so efficiently. Just because the lambda calculus is capable of describing the same computation as a Turing machine does not mean that it can do so quickly. McCarthy's achievement was translating the lambda calculus into a programming language that could be implemented on a computer, doing so in a way that made the language easy to modify, and furthermore doing so early enough in the history of computer science that people saw Lisp as a "real" programming language, and not just an intellectual curiosity to appreciate and ignore. Lisp became a primary language in artificial intelligence research. It was used to develop the Emacs text editor. Although Lisp is not used a lot these days, variations of Lisp are taught routinely in computer science classes today, and ideas from Lisp show up in many modern programming languages.

In my opinion, here's what makes Lisp important: it established that there are multiple ways to approach computer programming. The family of programming languages it spawned -- known as "functional" programming languages -- are famous for stretching the brains of computer science students all over the world. In high school many of us learn to program in languages influenced by the Turing machine style of computation -- languages often derived from the C programming language. Functional programming forces you to approach programming in a different way, one that seems totally alien when you first encounter it. Nearly everybody hates functional programming at first, but once you get used to it then it changes the way you think about computer programming. I believe it is one of the milestones critical to a proper computer science education. (Paul Graham has a lot more to say about this.)

If Lisp had not come along when it did, then I think there would be a good chance that early computer scientists would have fooled themselves into thinking that there was only one model of computation that could be implemented effectively. All commonly-available programming languages would (more or less) look like the C programming language, and computer science would be much worse off. Instead, we now have many different types of programming languages, some of which are widely used today. That's what made John McCarthy's early work so important. He achieved many other things over his career, of course, but he will be remembered for Lisp.

But this blog entry really isn't about Lisp, or even about John McCarthy's notable career. In typically self-centred fashion, this blog post is about my personal connection to John McCarthy -- in particular, how that personal connection ruined my life.

You see, sometime in March 2002 I was procrastinating from my grad school work by surfing the Internet (surprise, surprise). Somehow I found John McCarthy's website at Stanford, and somehow I wandered into his sustainability pages (which are still up as of this writing, but who knows how long that will last). "Oh look!" I thought to myself. "A famous computer scientist cares about sustainability, just like me!" So I started reading.

I soon discovered that McCarthy was concerned with human sustainability -- the question of whether human civilization can continue to flourish on Earth. His answer was: yes, unless the environmentalists screw everything up. McCarthy argued that there would be enough energy to go around provided we embrace nuclear power, that we could grow enough food to feed ten billion people, that resource shortages will not be a problem because we are good at inventing substitutes, that we can carefully geoengineer our way out of global warming catastrophe. Most importantly, he viewed human populations as an asset, not a liability. We need human ingenuity to address the problems that face us, and the more human ingenuity we can harness the better.

His concerns lay with environmentalists -- that they (meaning we, because I was ardently environmentalist at the time) are inherently and needlessly pessimistic, that their Malthusian predictions fail again and again, and that they hate humanity and view human beings as a scourge on the planet. He characterised environmentalism as a destructive religion. One anecdote he relates sticks with me to this day: in 1980 optimist Julian Simon and pessimist Paul Ehrlich made a bet that the price of five metals would rise over 10 years. Ehrlich lost the bet definitively.

In skimming through the pages in preparation for this blog entry (I am too frightened to read them through in depth again), it's not clear whether McCarthy's arguments are actually as solid as I thought when I first read them. I did not like the content of the pages, but they were well written. They mixed engaging anecdote with back-of-the-envelope calculations with published research in ways that I didn't have the tools to refute.

McCarthy was a disciple of Julian Simon's school of "economic optimism" -- the belief that our massive gains in prosperity since the Industrial Revolution are not an aberration but a trend. Economic optimists sometimes talk about environmentalism, but they don't actually care about the environment except to the degree that it supports human beings. (Bjørn Lomborg's The Skeptical Environmentalist is a famous example of this mindset.) I had been exposed to the economic optimists earlier than McCarthy's website, but I had never been willing to listen to their views. Instead I would stumble across some of their literature, get really angry, and shut them out.

My experience with McCarthy's sustainability pages was different because I respected John McCarthy. I knew he was a famous computer scientists. I thought functional programming was neat. I marvelled that a pioneering computer scientist was still alive. So I kept reading.

I don't think it is an exaggeration to say that the experience broke me. On the surface nothing much had happened. I sent McCarthy a couple of hesitant e-mails, and then proceeded to procrastinate in grad school. But it is difficult to express just how much the experience had broken me.

John McCarthy was right. Environmentalism is a religion of sorts, and I was a zealot. Too many issues of Ranger Rick magazine combined with my natural pessimist inclinations had converted me to the Church of Environmentalism. It is not a stretch to argue that I had structured my life around environmentalism. Environmentalism was the primary reason I did not drive or eat meat. It is the reason I got interested in fixing bikes, which led me to the Working Centre and another series of bad life decisions. I even attended the University of Waterloo because of environmentalism -- I knew WPIRG was a well-funded organization on campus, and I knew they supported environmentalist causes.

But in addition to being an environmentalist I wrapped a lot of my identity around "being smart" -- thinking clearly, being motivated by strong arguments and evidence, trusting the power of science. After reading McCarthy's pages I started seeing all kinds of holes in environmentalist thought -- how often they (we) put enormous amounts of effort into actions that would result in small payoffs, how often we ignored evidence, how we were so willing to dismiss amazing inventions like plastics because they were not "natural" (even though they are lighter and cleaner than their natural counterparts, and do a lot to save energy overall). My brain was no longer comfortable with environmentalism.

My heart, on the other hand, remains as environmentalist as it ever was. That's a large reason why I continue some of my questionable environmentalist habits (hello vegetarianism). I still feel that we are an aberration, and that we are making all kinds of choices that will get us into trouble. I still believe that the Calamity is coming. Every time I hear of a new and plausible gloom-and-doom threat, I cling to it. If that threat is caused by human folly, so much the better.

Conversely (and perversely) every time I hear good news I feel bad. I should be thrilled about shale oil and the tar sands -- the discovery of these ingenious (if ugly) technologies buys human civilization some time. When I hear evidence that global warming evidence may be overblown, I should cheer. But I don't. No matter what happens, my head and my heart never sync up.

Furthermore I have lost any hope that I can believe in anything. My personal conviction is that everything I believe is utterly wrong. I am drawn to aesthetics, not good argument. My intuitions mislead me endlessly, and I am neither smart nor educated enough to understand the underlying issues. The media (hello Avaaz!) is endlessly manipulative, and I don't think critically enough to see through the distortions. Also, reality is complex. After months and months (that felt like years and years) of agonizing about the economic optimists, Thomas Homer-Dixon offered some criticisms of their belief systems in The Ingenuity Gap (pages 29-33 or thereabouts, if you care) but in the end that did not reconcile my heart and my head. It just reinforced the idea that I have nothing to believe in.

I think McCarthy's pages also triggered me into becoming a much more unpleasant person. Because I did not trust anything, I developed a reputation as a devil's advocate. My version of the story is that I was trying to explore ideas in safe spaces, to figure out what was right and what was wrong. The people putting up with me thought (and continue to think) that I was being needlessly contrarian. Everybody says that critical thinking is an important skill, but in fact it's awful, and if you want to avoid unhappiness I encourage you to think as uncritically as possible.

Maybe most of all, my broken environmentalism cost me any hopes I had for acceptance in a community. The atheists and skeptics and rationalists don't want me because my heart is in the wrong place. The environmentalists and dreamers don't want me because I tend not to trust hocus-pocus. At best, I feel like an outsider who is tolerated.

None of this is John McCarthy's fault. On his website he states that he put the pages up in the hopes that he would do some good. There is an argument to be made that he did some good when I read his pages and broke my environmentalism (which one of my officemates once quipped as "falling prey to McCarthyism"). As usual, my head is ambivalently thankful, and my heart grieves.

So that's my John McCarthy story. I genuinely hope he is remembered fondly for decades to come.