The espresso machine at the café was called Gerald. It was a bean-to-cup model: you pressed a button, and he ground, brewed and steamed the milk, start to finish. Gerald also had a problem.
Every time he finished a drink, a worn valve inside him let out a honk. A loud, wet, offended honk, like a goose being asked to fill in a form. It wasn't in the manual. The technician called it a fault and said he'd get to it eventually.
The regulars worked it out within a week. Honk means your drink is done. Nobody announced this. Nobody put up a sign. Within a month the whole room ran on it. People drifted toward the counter on the honk, collected their cups, drifted away. No tickets, no names shouted, no buzzers. A notification system with 100% adoption, built entirely by accident.
The café is made up. The pattern is real, it has a name (Hyrum's Law), and you have probably caused it.
The day the café got better
The owner bought a new machine. Quiet, fast, with a spec sheet that made Gerald's look like a cry for help. Every documented behaviour was an upgrade: faster warm-up, steadier drinks, less water. It did not honk. The owner ticked every box on the acceptance list and went home happy.
Monday morning, twelve people were hovering at the counter, craning over each other's shoulders and asking the barista, "Is that mine?"
A flat white sat on the pickup shelf for six minutes while the man who ordered it stood two feet away, because nothing told him it existed. Someone asked if the new machine was broken. It wasn't. It was working perfectly, which was exactly the problem.
By Wednesday, a regular named Dennis had appointed himself the machine's replacement honk. Whenever a drink finished, he'd shout "HONK" from his table by the window. People collected their drinks. The line recovered.
Nobody paid Dennis. Dennis was a compatibility layer with a latte habit, and the most important engineer in the building.
The owner finally understood what she had shipped. She had removed a feature. She just hadn't known it was a feature, because it had never been on any list.
So what is Hyrum's Law?
Hyrum Wright, a software engineer at Google, noticed that once enough people use an interface, it stops mattering what the documentation promises. Somebody, somewhere, will depend on every behaviour they can observe. His colleague Titus Winters gave the idea its name, and it shows up in the book Software Engineering at Google. You can read the original wording at hyrumslaw.com, and there's an xkcd about it that every developer has either sent or received.
Gerald's honk was observable, never promised, and fully load-bearing. Your software has honks too:
- the order of results from an endpoint whose docs promise no order
- the exact wording of an error message (someone's regex is reading it right now)
- a price returned as the string
"4.50"instead of the number4.5 - how long a call takes, because someone's cron job only works since your endpoint is slow enough for another job to finish first
- the status code you return for that one weird edge case
- the CSS class on a button that someone's browser extension is hunting for
None of that is in the documented contract. All of it gets depended on anyway.
Big teams have a Gerald too
Go. Before Go 1, the language never defined the order of map iteration, and in practice it differed across hardware platforms. Programmers still came to lean on whatever order they saw, and the Go 1 release notes describe the result: a test could pass on one machine and fail on another. So Go 1 made the order deliberately unpredictable, even when you loop over the same map twice, so that code depending on it breaks early instead of late. The Go team made Gerald's honk much harder to rely on.
Excel. Lotus 1-2-3 treated 1900 as a leap year, which it wasn't. When Microsoft built Excel, it copied the mistake so that Lotus spreadsheets would import with identical dates. Excel still accepts February 29, 1900. Microsoft's own support page says fixing it is technically possible, but it doesn't think the benefits outweigh the costs, and it notes that the WEEKDAY function returns wrong values for dates before March 1, 1900. Forty-odd years of bug-for-bug compatibility. Excel is the café that kept the faulty valve because the regulars had built their mornings around it.
You can't stop the honk. You can make it cheaper.
Five habits that would have saved the owner a very bad Monday, with code you can paste into a scratch file.
1. The Honk Audit
Before Gerald left, somebody should have stood in the café for one morning with a notebook and written down what the room did without being told. Do the same to your API: take one real response and ask what you deliver that you never promised. Read it like a stranger would, ideally one with a regex and a grudge. Field order, number formats, whitespace, header casing, sort order, error text. Every one of those is a possible Gerald.
2. The Golden Test
A characterization test records what your code actually does today. A golden master (or approval) test is one way to capture that behaviour: save the output, then compare future output against it. It's the notebook from the Honk Audit, written as code. And it looks almost too dumb to be useful:
import json
def render_order(order):
return json.dumps({
"id": order["id"],
"status": order["status"],
"total": order["total"],
})
def test_order_json_is_exactly_what_clients_have_always_seen():
# "4.50" is a string. Somewhere, a spreadsheet is relying on that.
order = {"id": 7, "status": "ready", "total": "4.50"}
assert render_order(order) == '{"id": 7, "status": "ready", "total": "4.50"}'
Now somebody opens a tidy-up PR that turns total into a proper number. The output becomes 4.5, the test goes red, and the reviewer has to stop and ask the question that matters: who is parsing this? That pause is the point. The test doesn't forbid the change, it only stops the change from sneaking in. And if it turns out nobody depends on the oddity, retire the test on purpose.
3. The Shuffle
This is the Go move. In café terms, it's a machine that honks at random, so nobody learns to listen for it. If your docs say a list has no guaranteed order, don't hand out a lucky one.
import os
import random
def ready_orders(rows):
rows = list(rows)
if os.environ.get("APP_ENV") != "production":
random.shuffle(rows) # the docs promise no order, so don't provide one
return rows
In dev and CI, shuffling can expose code that assumes a particular order before that assumption reaches a customer. In production the order is left alone, and your input list is never modified. One limit: your outside partners don't run your test mode. For them this is a smell detector, not a shield. Go keeps the order unpredictable in production too, which is a much bolder choice.
One more catch: a random shuffle turns a hidden order dependency into a failure that looks flaky. Make it reproducible. If you use pytest, the pytest-randomly plugin prints a base seed at the start of each run and derives a repeatable random seed for each test from it. If a test fails because of this shuffle, rerun with pytest --randomly-seed=<printed-seed> to replay the run.
4. The Sunset
When a behaviour has to go, don't make it vanish on a Tuesday. Gerald deserved a sign on the door a month ahead: Gerald retires on the 30th. Here is how you will know your drink is ready. HTTP gives you two headers for that sign. There's Deprecation (RFC 9745, published in 2025) and Sunset (RFC 8594). Here is a small helper that builds both:
from datetime import datetime, timezone
from email.utils import format_datetime
def deprecation_headers(deprecated_at, sunset_at, doc_url):
for moment in (deprecated_at, sunset_at):
if moment.utcoffset() is None:
raise ValueError("use timezone-aware datetimes")
deprecated_at = deprecated_at.astimezone(timezone.utc)
sunset_at = sunset_at.astimezone(timezone.utc)
if sunset_at < deprecated_at:
raise ValueError("sunset can't come before deprecation")
return {
"Deprecation": f"@{int(deprecated_at.timestamp())}",
"Sunset": format_datetime(sunset_at, usegmt=True),
"Link": f'<{doc_url}>; rel="deprecation"; type="text/html"',
}
headers = deprecation_headers(
datetime(2026, 12, 3, tzinfo=timezone.utc),
datetime(2027, 6, 30, 23, 59, 59, tzinfo=timezone.utc),
"https://example.com/docs/order-total-is-becoming-a-number",
)
# Deprecation: @1796256000
# Sunset: Wed, 30 Jun 2027 23:59:59 GMT
The first header carries the deprecation date as a Unix timestamp, the second carries the sunset date as a normal HTTP date, and the link points to a page that explains what to do. RFC 9745 says the sunset can't come before the deprecation, so the function refuses to build it that way. It also rejects datetimes without a timezone and converts any other timezone to UTC, which is what these headers need. Treat Sunset as a heads-up, not a shutdown switch: RFC 8594 says clients should read it as a hint, not a guarantee.
Headers only help if clients act on them, and plenty won't. So also log a stable client identifier on every request that still takes the old path, and aggregate by client from those logs. (Avoid raw client IDs as metric labels, since thousands of distinct values make metrics expensive.) That tells you who is still making those requests, so you know who to email. It can't tell you whether they saw the warning. Some teams go further and switch the old behaviour off for a few minutes on a schedule, a "brownout", so that anyone still depending on it shows up in the support inbox early rather than on the final day. In café terms: muting the honk for ten minutes on a Friday and watching who stands there looking confused.
5. The Buzzer
The café never got Gerald's honk back. After a week of Dennis, the owner bought a cheap order buzzer system. This time, it was a documented feature, deliberately added, with a battery.
Whenever you discover a Dennis in your own system, someone holding up a behaviour you never wrote down, write the contract he was missing. Give the honk a name, a test, and a line in the docs. It's less romantic than a goose-shaped valve and far less likely to ruin a Monday.
Nobody misses a faulty valve. A few people do miss the goose.
Gerald is retired now. Dennis got a free coffee and was offered a job title, which he declined.
The manual says what you meant. Your users depend on what you did.
So, what's the Gerald in your system? What did you "clean up" that turned out to be holding the building up, or what are you quietly afraid to touch? Tell me in the comments. I'd like to hear the stories, especially the Dennis ones.



Top comments (18)
This one is brilliant, great metaphor - a very entertaining read, and not just entertaining - thought-provoking!
This really resonates - maybe we're using that word a bit too often, but in this case I can honestly say it does ...
Almost any moderately complex system has "quirks" or "de facto behaviors", which are not "designed", documented, or intended, and often not covered by unit tests ...
But if that system is rolled out to a substantial number of users, or customers (in the case of SaaS), then sooner or later people are going to depend on those "quirks" - and then you can't just go and simply change those features anymore, because you'd break stuff, for your customers or users ...
That's when you've created "legacy" code (works in a weird way, difficult to maintain or change, nobody wants to touch it, etc) - I think that anyone who's worked on moderately complex software (especially SaaS) has encountered this - but I didn't know it has a name ("Hyrum's Law") !
P.S. the regular customer (Dennis) shouting HONK! is comedy gold 😁😁😁
Thanks, leob! Really happy you liked it. Dennis is going to be unbearable now. 😄
You nailed the painful part. Nobody designs the quirk, nobody documents it, and then one day customers are depending on it. Suddenly, your "tiny cleanup" PR isn't so tiny anymore.
And yes, now that Hyrum's Law has a name for you, you'll start spotting it everywhere. Sorry in advance. 😅
Also, Dennis went from regular customer to compatibility layer with a latte habit. Zero pay, zero SLA, and somehow he was the most important engineer in the building. ☕😂
Sis, 🫡 🙌🙌🙌
Learned a lot from this article.
Thanks for this!
Thank you so much! 🙌 Really glad it was useful.
Shubhra lol ok Dennis the human honk... my Gerald was an error message wording, cleaned it up at like 10:37pm, someone's script broke by morning, just stared xD anyway golden test idea, I would say that's my buzzer now. thanks for Gerald!!
Haha, 10:37 PM! Gerald really does pick the worst possible time to show how important he is. 😂
And "Dennis the human honk" is going straight into the post's hall of fame. 😄 Error message wording is actually on the list of honks too, so you're in good company.
That's exactly what I had in mind with the Golden Test. Capture the behaviour before the cleanup, so the test raises a hand when someone changes something a script might already depend on. Next time you do a 10:37 PM cleanup, hopefully there's a buzzer instead of a broken script in the morning. ☕
You're welcome, and Gerald says hi!
Gerald gets a hi back lol. Shubhra, my version of the Golden Test is just a txt file of old responses. ugly but works. thanks :D
Shubhra, Dennis as a human compatibility layer is the perfect image — and the part I will steal first is the honk audit. Before I rename any field in my small API, I want a notebook list of what users actually depend on, not what the docs promise. The Sunset headers were new to me: do you log who still calls a deprecated endpoint, or only that it was called?
Steal away, Wei Bin! Dennis turned down his job title, so he won't fight you over the credit. 😂
The notebook is exactly where I'd start. The docs tell you what you promised, and the notebook tells you what people actually rely on. Those two lists are rarely the same!
On Sunset, I'd log who, not just that it was called. A stable client identifier on every request that still hits the deprecated endpoint, then aggregate by client from those logs. That way you know who to email before the sunset date. Just don't use raw client IDs as metric labels, because thousands of unique values make metrics expensive.
Only catch is that the logs tell you who's still calling, not whether they ever saw the warning. So the headers are the sign on the café door, and the logs are you watching who's still walking through it. ☕
Haha, poor Gerald. He never knew his little honk had become such an important part of everyone's morning. And Dennis stepping in as the replacement notification system absolutely made my day. A lovely second visit to the café, Shubhra. Always room for another story here. ☕
Poor Gerald really had no idea how important he was! 😂 And Dennis definitely deserves a permanent place in the café after that performance. So happy to be back for another visit. Always lovely to have a seat here. ❤️☕
Haha, Dennis might need his own seat now. Glad to have you back, Shubhra. Another cup is always waiting. ☕🍻
Haha, I think Dennis will be expecting his own coffee and a little salary next! 😂 And I'll happily take you up on that next cup! ❤️☕
Honestly, you can't just read your own code and find these things. You only find out when someone tells you their thing broke. I'm sure there's a Dennis out there holding up something of mine right now. 😄
Anyone else had a "wait, people were using THAT?" moment?
Dennis shouting HONK got me 😂 Imagine becoming the café's unofficial notification system! Loved this one, di. It also made me think about how many little things we depend on without even realising it 😄
I'm so glad you picked up on that! 😄 So many little things quietly keep everything running, and we only notice when they stop. Thanks for reading, Hema! ❤️
This was a fun read. Gerald deserved better. Funny how the machine that did everything quietly is the one everyone missed once it was gone.
Thanks, Gautam! 😄 Gerald would say "quietly" is generous, since he honked every single time, but you're right that nobody noticed how much he was doing until he was gone. A few people really did miss the goose. ☕