--- url: "https://martinfowler.com/bliki/TwoHardThings.html" titulek: "Two Hard Things" h1: "Two Hard Things" popis: "There are only two hard things in Computer Science: cache invalidation and naming things -- Phil Karlton (bonus variations on the page)" jazyk: "" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-13 22:04:41" znaku: 1827 slov: 243 kodovani: "utf-8" sha256: "436dd2833e87f706e6675d578bcb57641b283d615baa11bbc0ed8ab510b030be" --- # [Two Hard Things](TwoHardThings.html) 14 July 2009 [Martin Fowler](/) [API design](/tags/API%20design.html) > There are only two hard things in Computer Science: cache > invalidation and naming things. > > -- Phil Karlton Long a favorite saying of mine, one for which I couldn't find a satisfactory URL. Like many good phrases, it's had a host of riffs on it. A few of them I feel are worth adding to the page > There are 2 hard problems in computer science: cache invalidation, naming things, and > off-by-1 errors. > > -- [Leon Bambrick](https://twitter.com/secretGeek/status/7269997868) > There are only two hard problems in distributed systems: 2. Exactly-once delivery 1. > Guaranteed order of messages 2. Exactly-once delivery > > -- [Mathias Verraes](https://twitter.com/mathiasverraes/status/632260618599403520) > there's two hard problems in computer science: we only have one joke and it's not funny. > > -- [Phillip Scott Bowden](https://twitter.com/pbowden/status/468855097879830528) > There are so many variations on the “there are only two hard problems in > computer programming...” joke that I’m starting to suspect that programming > isn’t actually very easy. > > -- [Nat Pryce](https://twitter.com/natpryce/status/1396905452588474376) The first place anyone found it on the internet was in [Tim Bray's blog](http://www.tbray.org/ongoing/When/200x/2005/12/23/UPI). Tim said that [he first heard it](https://twitter.com/timbray/status/817025379109990402?cn=cmVwbHk%3D) around 1996-7 ## Revisions 2009-07-14: original post 2010-12-21: added off-by-one variation (unattributed) 2015-08-14: added distributed tweet 2017-03-30: added proper tweet for off-by-one and mention of Tim Bray's source 2017-12-22: added the Phillip Scott Bowden tweet 2021-05-24: added Nat Pryce tweet ## Acknowledgements Leon Bambrick let me know about better sources.