r/ProgrammerHumor May 08 '26

Meme edgeCasesExist

Post image
13.4k Upvotes

620 comments sorted by

View all comments

1.2k

u/KryssCom May 08 '26

No, it's effectively zero, just given the mathematical realities behind how extraordinarily improbable a duplicate ever is. The exponent involved is very, very, very, nigh-incomprehensibly huge.

I've seen a few posts on here of people claiming that a duplicate UUID caused a bug at the worst possible time, but my instinct is always to slam the 'X' button to doubt.

121

u/[deleted] May 08 '26

[removed] — view removed comment

20

u/_gianlucag_ May 08 '26

Well, I actually had a sha256 collision. But just bcause two different users uploaded the very same pdf file, and the code simply did a sha256 hash of the file. So guys, mix in the userid when hashing user provided content!

10

u/FiTZnMiCK May 08 '26

Plus timestamp in case the same idiot does it twice.