2 ms·
Every time someone posts about Base-X encoding I have a little nostalgia for the Base-94 encoding I wrote as probably the first program I wrote from scratch sol
by hinkley 6y ago
Every time someone posts about Base-X encoding I have a little nostalgia for the Base-94 encoding I wrote as probably the first program I wrote from scratch solo (my idea, my design, my implementation), or the funky Base-32 design we did for a dev tool.
We had a new team lead who was a night owl like me. One day everyone left early but he and I were sitting around, and one of us, I forget who, was trying to implement a URL slug format that had the following qualities, ordered by priority:
* does not require URL encoding
* can be dictated or transcribed easily (it was a dev tool, in a time when pasting a URL into chat was not a given)
* as much as possible, could not contain swear words
We nerd-sniped each other into spending a couple of hours coming up with an odd-ball base-32 implementation with no homographs, and also that as long as you have vowels and leetspeak numbers you'd get swear words.
So we started with base 64 minus the symbols, vowels+y, homographs and leetspeak numbers, leaving us somewhere around 40 symbols left, so we just started removing consonants common in swears, starting with epithets and working backward. shtccks4vr is a bad url, but stick c--t or the n-word in a URL and HR is going to definitely have a talk with you then write an angry letter to us. Especially with a selection of choice verbs in the same slug...