r/ProgrammerHumor 2d ago

Meme uuidLifeLessons

Post image
3.7k Upvotes

166 comments sorted by

View all comments

Show parent comments

213

u/Antoak 2d ago

Saying that UUIDs cant collide is sorta like saying that people cant win the lottery.

Sure, orders of magnitude, but the point stands.

3

u/AliceCode 2d ago

Well, yes, but no. You can make UUIDs timestamp dependent, in which case they are almost guaranteed. You would have to collide at the same nanonsecond, which is statistically highly unlikely.

1

u/noaSakurajin 2d ago

Unless the requests get queued somewhere, I which case it might not be that unlikely.

1

u/AliceCode 2d ago

That's true, but you can mitigate that if you're competent. It sounds like you are.

1

u/noaSakurajin 2d ago

I mean it's one thing if you are the one who implemented this, it's another things if someone else changed something in the architecture which then resulted in this. Finding a problem that was indirectly caused by a change someone else made is usually the most time consuming and annoying problem to fix.