News for hackers. Stuff that matters.
Re:Sqids – Generate Short Unique IDs from Numbers by echelon on Saturday November 25, 2023 @03:06PM (#38416241)
I'd prefer to use crockford-encoded entropy with Stripe-style token prefixes to create unique ID namespaces. Run in through a bad words filter, and it's perfect.

user_1hrpt0xpax7ps

file_xpax7psaz0tv6az0tv6

Etc.

In distributed systems you can use the trailing bytes to encode things like author cluster, in case you're active-active and need to route subsequent writes before create event replication.

Easy to copy, debug, run ops/incall against. If you have an API, they're user-friendly.

Of course you still want to instruct people the prefixes are opaque.

Re:Sqids – Generate Short Unique IDs from Numbers by wombatpm on Saturday November 25, 2023 @03:22PM (#38416376)
Yeah don’t forget the bad words filter. I worked on an IKEA mailing where the list processing house was adding an autogenerated discount code to the address label. The customers received codes with BOOB, DICK, TWAT, and CUNT embedded within. People were not happy.
Re:Sqids – Generate Short Unique IDs from Numbers by otteromkram on Saturday November 25, 2023 @04:50PM (#38417049)
Did they never make an IKEA purchase after that or did they get over it like a normal adult?

I don't work retail, but something tells me people will make a stink out of just about anything if it meant potentially free products or other compensation.

Plus, are you filtering just English curse words or all curse words for countries that use Latin characters?

Re:Sqids – Generate Short Unique IDs from Numbers by jl6 on Saturday November 25, 2023 @07:27PM (#38418134)
The risk is not in offending someone, but in that someone posting the rude string on social media in real or mock indignation, causing the outrage machine to turn on your brand. There’s a steady supply of bottom-feeding journalists waiting to write the article “IKEA’s new system is sending hate messages to customers”.
Re:Sqids – Generate Short Unique IDs from Numbers by richev on Saturday November 25, 2023 @11:32PM (#38419175)
Can you cite an example of a journalist writing an article that makes such an accusation?
Re:Sqids – Generate Short Unique IDs from Numbers by wombatpm on Sunday November 26, 2023 @07:34PM (#38426730)
We caught it about 2 million into a 15 million print run. I had to go through the control files and change the offending value or identify the pallet and bundle of mail it was in so we could remove and readdress the catalog. It was about 10 years ago and anyone who complained got a coupon.

The mailing house that did the work was fired though.

Re:Sqids – Generate Short Unique IDs from Numbers by sandGorgon on Saturday November 25, 2023 @11:54PM (#38419265)
this is very interesting. do you know how amazon creates its order id ? they are all numeric