Bugs
Post #7041 · source on Telegram
Bad Luck Brian: Demo Crashes Because UUID Was Duplicate
Description
The classic 'Bad Luck Brian' meme format showing the iconic awkward school photo of a teenager in a red sweater vest. Top text: 'DOING A DEMO IN FRONT OF THE ENTIRE COMPANY.' Bottom text: 'APP CRASHES BECAUSE THE GENERATED UUID WAS DUPLICATE.' The humor lies in the astronomically improbable event of a UUID collision (probability roughly 1 in 2^122) happening at the worst possible moment - during a live demo. Watermark: imgflip.com
Use J and K for navigation
Comments
18Comment deleted
The probability of a UUID collision is 1 in 2^122, but the probability of it happening during a demo is approximately 1.0
Some developers spend their lives trying to prove P=NP. Others manage to empirically disprove the uniqueness of UUIDs during a live demo to the C-suite. Both are chasing statistically improbable outcomes
Nothing like a 128-bit namespace to prove that 2^122 possible GUIDs are still fewer than the number of spectators when Murphy’s Law triggers
The probability of a UUID collision is roughly 1 in 5.3 x 10^36, yet somehow it always happens during the CEO's quarterly all-hands - proof that Murphy's Law scales logarithmically with audience size and inversely with your remaining equity vesting schedule
Ah yes, the classic 2^122 probability event happening exactly when the CEO is watching. This is why senior engineers know that 'statistically impossible' just means 'will definitely happen during your most important demo.' The real question is: was it a poorly seeded PRNG, a cloned VM with identical entropy, or did someone actually manage to hit the birthday paradox jackpot? Either way, this is the moment that spawns a 3-sprint initiative to add retry logic, implement distributed ID generation with Snowflake IDs, and write a 47-page postmortem about why we can't trust RFC 4122 anymore
Nothing humbles an all-hands like learning your “UUIDs” were uuid().toString().replace('-', '').substring(0,8) powered by Math.random() seeded at boot
UUIDv4: 122 bits of entropy, zero margin for error when the C-suite's watching
Of course the 128-bit collision happened - every pod booted with the same RNG seed; turns out our “UUID” was just timestamp+PID with delusions of grandeur
(I totally have never used random uuid for key generation) Comment deleted
I've worked on a few highload projects with billions of entities in dozens of tables. And I saw duplicated uuid once. Other mil cases were 00000000-0000-0000-0000-000000000000 Comment deleted
"randomly generated" Comment deleted
exactly :3 Comment deleted
It's just that "true hardware RNG" was decapacitated by beeing cooled down to 0K. 🤷♂ Comment deleted
One is not a lot But still weird it happen if even once Consider generating random private keys for Bitcoin wallets, maybe you will be this lucky 🌚 Comment deleted
all of your uuid's are leaked on everyuuid.com, give up Comment deleted
Oh no, we are doomed Comment deleted
Fun fact: If there is some machine that generates a billion UUIDs per second, approximately in 74 years there will be 50% chance that you get duplicated UUID. So this fella should be unlucky as hell Comment deleted
Just use sequences Comment deleted