There Are 2 Hard Things in Computer Science, and Sean Bean Said None of Them

I had the quote stuck in my head all week and could not place it. What I had was roughly this:

There are only 2 problems in programming. 1. Naming things. 2. Cache invalidation. 3. Counting.

And I was fairly sure it had been read to me in a grave British voice, by Sean Bean, in Civilization V.

Every part of that is wrong, and the ways in which it is wrong turn out to be more interesting than the quote.

The actual line

There are only two hard things in Computer Science: cache invalidation and naming things.

Two things. Not three. The man who said it was Phil Karlton, and the reason you have never seen a citation is that there isn't one — he said it out loud, to people, and then he died.

Karlton is not a household name but his résumé is the back half of the twentieth century in computing: Xerox, Digital, Silicon Graphics, and finally Netscape, where his own home page gives his title as Principal Curmudgeon. X11. OpenGL. Debuggers. Mail user agents. He was in the room for SSL 3.0 — you can still read him arguing about the transport layer on the IETF TLS list in 1996. Every HTTPS connection you have ever made is downstream of meetings this man sat in.

On 20 June 1997 he and his wife Jan were killed in a car accident while on holiday in Italy. Their son David runs the site that is now the closest thing the quote has to a primary source.

So the most-repeated sentence in software engineering has no paper. It is hearsay, all the way down.

The chain of custody

It is genuinely worth laying out how thin the evidence is, because the quote is treated as scripture:

That's it. That's the archive. The best corroboration for the volleyball story is that Karlton's own Netscape page, written by him, lists volleyball among his hobbies — beer, single malts, rock climbing, roller hockey, volleyball. The detail checks out even though the quote doesn't.

There is something perfect about this. The industry's favourite line about how hard it is to name things has spent thirty years unable to reliably name its own author.

The third one

The version I had in my head — the one with the counting joke — is not Karlton's and was never meant to be mistaken for it. On New Year's Day 2010, Leon Bambrick — @secretGeek — tweeted:

There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.

The joke is not the third item. The joke is the 2. The sentence promises two problems and delivers three, so the list demonstrates the bug it is describing while you are still reading it. It is a self-executing punchline, and it is better than the original — which is why it has almost entirely replaced it in casual use, and why my memory kept the shape of it while dropping every fact attached.

My reconstruction had even mangled that: I remembered the payload ("counting") rather than the mechanism ("off-by-one"), which is what you get when a brain compresses a joke down to its gist and throws away the executable part.

The format turned out to be extremely fertile. Mathias Verraes did the distributed-systems port, and it may be the best of the lot:

There are only two hard problems in distributed systems: 2. Exactly-once delivery. 1. Guaranteed order of messages. 2. Exactly-once delivery.

Out-of-order and delivered twice. The sentence is the failure mode.

Fowler's page also collects Phillip Scott Bowden's — there's two hard problems in computer science: we only have one joke and it's not funny — and Nat Pryce's observation that the sheer volume of variants is itself evidence that programming may not be as easy as everyone claims.

Now, Sean Bean

Here is where my memory was most confidently wrong.

Civilization has read historical quotes at you since the beginning, and the narrator is different in each game:

GameNarrator
Civilization IVLeonard Nimoy
Civilization VW. Morgan Sheppard
Civilization VISean Bean
Civilization VIIGwendoline Christie

Sean Bean is Civ VI. Civ V — the one I was sure about — was W. Morgan Sheppard, the English character actor with the gravel in his voice, who did the tech quotes and the intro and died in 2019. Civ VII, in 2025, went to Gwendoline Christie, the first woman to narrate the series and the second Game of Thrones alumnus in a row, which is a hiring pattern I respect.

And the Karlton quote is in none of them. As far as I can tell it has never appeared in a Civilization game. What Sean Bean actually reads you when you finish Computers in Civ VI is:

To err is human, but to really foul things up you need a computer. — Paul R. Ehrlich

The good thing about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. — Ted Nelson

Same register. Same cadence. Same wry-aphorism-about-machines slot in the sentence. If you were going to falsely remember a programming joke as having been narrated to you over a tech-tree fanfare, these are exactly the neighbours that would make it feel true.

Why the misremembering is on-topic

Two decades of Civilization trained a generation of people who work with computers to receive pithy aphorisms in a serious British voice with strings under it. The Karlton line fits that slot so precisely — right length, right irony, right subject — that my brain filed it there and, when asked for a source, returned the one it had lying around.

Which is, and I'm aware of how neat this is, a cache invalidation bug. The aphorism was cached. Its provenance was evicted. Nothing signalled that the entry had gone stale, so the lookup succeeded and returned confident garbage: Sean Bean, Civ 5. No error. No miss. Just a plausible value served warm from a bad line.

Human memory is a cache with an excellent hit rate, no TTL, and no invalidation protocol whatsoever. It will hand you a wrong answer with exactly the same subjective confidence as a right one, which is the whole reason the original observation is any good: the hard problems aren't the ones that announce themselves by crashing.

So, corrected and with numbering intact:

There are only two hard things in Computer Science: cache invalidation and naming things. — Phil Karlton, out loud, sometime between 1970 and 1997, to somebody who was paying attention

Nobody read it to you. It doesn't need the voice.


Sources: Martin Fowler, Two Hard Things · David Karlton, Naming things is hard · karlton.org · Phil Karlton's Netscape home page · Kellan Elliott-McCrea (2005) · PC Gamer on Sean Bean and Civ 6 · PC Gamer on Gwendoline Christie and Civ 7 · Civilization Wiki: Computers (Civ6)


Comments