←back to thread

317 points thunderbong | 3 comments | | HN request time: 0s | source
Show context
kibwen ◴[] No.42203962[source]
Hyrum's Law is one of those observations that's certainly useful, but be careful not to fixate on it and draw the wrong conclusions. Consider that even the total runtime of a function is an observable property, which means that optimizing a function to make it faster is a breaking change (what if suddenly one of your queues clears too fast and triggers a deadlock??), despite the fact that 99.99999999% of your users would probably appreciate having code that runs faster for no effort on their part.

Therefore it's unavoidable that what constitutes a "breaking change" is a social contract, not a technical contract, because the alternative is that literally nothing is ever allowed to change. So as a library author, document what parts of your API are guaranteed not to change, be reasonable, and have empathy for your users. And as a library consumer, understand that making undocumented interfaces into load-bearing constructs is done at your own risk, and have empathy for the library authors.

replies(9): >>42204203 #>>42204851 #>>42205110 #>>42205152 #>>42206063 #>>42206661 #>>42207782 #>>42209267 #>>42216851 #
rjst01 ◴[] No.42204203[source]
One day I will give a lighting talk about the load bearing teapot, or how and why I made HTTP Status 418 a load bearing part of an internal API, and why it was the least bad option considering the constraints.
replies(1): >>42206013 #
renewiltord ◴[] No.42206013[source]
It’s a classic. Binance will give you 429 errors to back off then 418s to tell you you will be IP banned and then they’ll ban you.
replies(1): >>42207064 #
1. hinkley ◴[] No.42207064{3}[source]
Google’s spiders will punish you for giving them too many 429 responses. It’s hell for hosting sites with vanity urls. They can’t tell they’re sending you 50+ req/s.

It’s practically a protection racket. Only AWS gets the money.

replies(1): >>42207600 #
2. wbl ◴[] No.42207600[source]
50 requests/sec? Did you forget a few zeros?
replies(1): >>42207799 #
3. hinkley ◴[] No.42207799[source]
Little’s law is a bitch, and you can get away with a little throttling but not much.

Also, that’s a bit dismissive for HN.