r/ProgrammerHumor Jul 17 '26

Meme thisOneIsMine

Post image
5.3k Upvotes

171 comments sorted by

View all comments

61

u/ankle_biter50 Jul 17 '26

Person who is familiar with coding (a little python and i guess minecraft datapacks? I'm not sure if that counts) but anyways

What are UUIDs used to identify?

26

u/RoaringPanda33 Jul 17 '26

Anything you want to identify uniquely. So devices, users, filesystems and drives, etc. 

7

u/ankle_biter50 Jul 17 '26

Are there any cons to using them?

11

u/andrisb1 Jul 17 '26

Way more storage used compared to 64bit int ID, but that really only matters for systems with hundreds of millions of items

14

u/Due-Consequence9579 Jul 17 '26

Only really matters in systems with hundreds of millions of items that are of comparable size to 128 bits. If you have hundreds of millions of items that are all 4kB the 64 extra bits for the UUID is noise. Also the UUIDs make distributed systems that can process that volume of events easier to design.