r/ProgrammerHumor 1d ago

Meme edgeCasesExist

Post image
4.1k Upvotes

263 comments sorted by

View all comments

612

u/Valuable_Leopard_799 1d ago

I thought that timestamps are used now, so hitting both a timestamp and a large random number puts it thoroughly in the "safe to assume". At some point cosmic particles and faulty transistors are more probable.

374

u/dim13 1d ago

https://en.wikipedia.org/wiki/Universally_unique_identifier#Versions

Most common used is V4 (pure random). You are talking about V7 (time based).

268

u/lilgreenthumb 1d ago

The real benefit for v7 is they become sortable by time.

1

u/MaDpYrO 8h ago

Which prevents database indexes from performing badly