Otter@lemmy.ca to Programming@programming.devEnglish · 5 months ago8 versions of UUID and when to use themwww.ntietz.comexternal-linkmessage-square27fedilinkarrow-up1115arrow-down12
arrow-up1113arrow-down1external-link8 versions of UUID and when to use themwww.ntietz.comOtter@lemmy.ca to Programming@programming.devEnglish · 5 months agomessage-square27fedilink
minus-squareZikeji@programming.devlinkfedilinkEnglisharrow-up13arrow-down3·5 months agoReject UUID embrace ULID.
minus-square𝙲𝚑𝚊𝚒𝚛𝚖𝚊𝚗 𝙼𝚎𝚘𝚠@programming.devlinkfedilinkarrow-up12·5 months agoAt the company I work at we use UUIDv7 but base63 encoded I believe. This gives you fairly short ids (16 chars iirc, it includes lowercase letters) that are also sortable.
minus-squareshotgun_crab@lemmy.worldlinkfedilinkarrow-up1·5 months agoI’ll be borrowing that little trick
minus-square𝙲𝚑𝚊𝚒𝚛𝚖𝚊𝚗 𝙼𝚎𝚘𝚠@programming.devlinkfedilinkarrow-up1·5 months agohttps://github.com/TheArchitectDev/Architect.Identities Here’s the package one of our former developers created. It has some advantages and some drawbacks, but overall it’s been quite a treat to work with!
minus-squareGamma@beehaw.orglinkfedilinkEnglisharrow-up10·5 months agoInteresting 👀 https://github.com/ulid/spec
minus-squarebitfucker@programming.devlinkfedilinkarrow-up2·edit-25 months agoI prefer CUID Just to clarify: Yes, I do know not all use cases are appropriate for CUID. But in general when generating ID, I’d use CUID2
Reject UUID embrace ULID.
At the company I work at we use UUIDv7 but base63 encoded I believe. This gives you fairly short ids (16 chars iirc, it includes lowercase letters) that are also sortable.
I’ll be borrowing that little trick
https://github.com/TheArchitectDev/Architect.Identities
Here’s the package one of our former developers created. It has some advantages and some drawbacks, but overall it’s been quite a treat to work with!
Interesting 👀 https://github.com/ulid/spec
I prefer CUID
Just to clarify: Yes, I do know not all use cases are appropriate for CUID. But in general when generating ID, I’d use CUID2
I vote for nanoid.