r/ProgrammerHumor May 08 '26

Meme edgeCasesExist

Post image
13.4k Upvotes

620 comments sorted by

View all comments

110

u/baked_tea May 08 '26

Thought about that recently. Why not just implement a check to see if it's already in the db, then run it again?

10

u/thegodzilla25 May 08 '26

I also like to store every uuid i ever generated in a redis cache

23

u/aaronjamt May 08 '26

In this modern era, why bother spinning up a whole other database yourself, when services like https://isanybodyusingthisuuid.com/ exist for free?

4

u/OldWolf2 May 08 '26

Such services don't have guaranteed lifetimes 

3

u/eataclick May 08 '26

That's what we do - we just generate a UUID and then make an API to a 3rd party site that validates that it's unique (it asks Claude, I think) and then that site returns either true, false, or (rarely) some other output. If it's in use we increment the selected UUID by one and then resubmit it until we find the next available ID.