logoalt Hacker News

austinjpyesterday at 4:21 PM3 repliesview on HN

Nice. See also sqids (previously known as hashids)

https://sqids.org/


Replies

chrismorganyesterday at 4:24 PM

I would not recommend it to anyone for any purpose: https://temp.chrismorgan.info/2025-09-17-tesid/more/#hashids

(Ah, it’s fun reading through that document a bit again. A few things I’d need to update now, like the Hashids name, or in the UUID section how UUIDv7 is no longer a draft, and of sidenote 12 I moved to India and got married and so took a phone number ending in 65536, replacing my Australian 32768. :-) )

show 3 replies
hubert_magniyesterday at 8:20 PM

Here is a Ruby gem for generating and managing pretty, human-readable keys in ActiveRecord models - uses sqids and a ticket table:

https://github.com/noreastergroup/active_record_pretty_key

bfleschyesterday at 4:25 PM

Oh thanks for sharing this. Many years ago I was asked to code such a thing during an interview and I totally screwed it up, and of course I forgot the name of this technique.

I wanted to use it many times in project for non-iteratable IDs but never found it again.