Comment

Comment by tttp

We need to separate the storage format (Postgres and MySQL both have a bigint serial for primary key and it should stay that way)

for display, you have various ways to encode that number into something easier for humans, what I prefer:

- short word - no offensive words - with a checksum (so we easily spot any copy paste mistake) - not sequential - can be put in a url without extra encoding

this is our implementation of that (base32 and luhn code)

https://github.com/tttp/dxid

parent tttp 2 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton