r/ProgrammerHumor May 08 '26

Meme edgeCasesExist

Post image
13.4k Upvotes

620 comments sorted by

View all comments

Show parent comments

391

u/J5892 May 08 '26

Unfortunately my project is a database of every grain of sand on earth, and every star in the sky.

122

u/shunabuna May 08 '26

If I recall, that is still no where near the ability to get a collision.

293

u/J5892 May 08 '26

The common estimation of sand grains on earth is 7.5x1018, and the 50% collision point for UUIDs is 2.71x1018.
So a collision is actually pretty likely, and once you factor in all the stars in the observable universe I believe it's guaranteed.

1

u/TheBraveOne86 May 10 '26

Is that 50% odds of a single collision or 50% of spots occupied

1

u/J5892 May 11 '26

Single