this post was submitted on 30 Jun 2024
114 points (98.3% liked)

Programming

16975 readers
1288 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 10 points 2 months ago (4 children)
[–] [email protected] 12 points 2 months ago (1 children)

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.

[–] [email protected] 1 points 2 months ago (1 children)

I'll be borrowing that little trick

[–] [email protected] 1 points 2 months ago

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!

[–] [email protected] 2 points 2 months ago* (last edited 2 months ago)

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

[–] [email protected] 1 points 2 months ago

I vote for nanoid.