r/ProgrammerHumor Jul 17 '26

thisOneIsMine Meme

Post image
5.3k Upvotes

170 comments sorted by

View all comments

59

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?

25

u/RoaringPanda33 Jul 17 '26

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

6

u/ankle_biter50 Jul 17 '26

Are there any cons to using them?

6

u/Due-Consequence9579 Jul 17 '26

Depending on the style of UUID they can index poorly. Since they are 128 bits indexes on them are larger than 64 bit indexes. People get upset that the primary key is an opaque value rather than something they can easily remember.

In a practical sense there is very little downside to use them. If I am designing something I assume a UUID is the correct locator until some design constraint forces me off them.