A programmer in headphones works at a beige computer with a glowing teal screen in a late-night cubicle stacked with printouts.

Original artwork, not a still

Phil Karlton

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

Behind the line

What it means

Our interpretation.

The joke pairs a problem experts rate as truly hard with one that looks trivial, and anyone who has argued over a variable name knows the second is no less painful. It is the most recycled one-liner in programming, endlessly extended with off-by-one errors and exactly-once delivery. It endures because every programmer has a fresh disaster to add to the list.

Context reviewed

In context

May contain spoilersShow the scene

Martin Fowler's bliki called this a long-time favourite saying in a post of 14 July 2009 and credited it to Phil Karlton. Fowler could not find a good link for it; the earliest online appearance he found was a 2005 post by Tim Bray, who said he first heard it around 1996 or 1997. No document in Karlton's own words has surfaced, so the credit rests on word of mouth. Fowler's page also collects the riffs it spawned, including Leon Bambrick's off-by-one errors as a third hard thing.

Sources (2)

Context reviewed

Share this quote