4 ms·
> This alphabet excludes the letters I, L, O, and U to avoid confusion and abuse. Can anyone please ellaborate? I don't get the confusion or abuse potential
by cfv 10y ago
> This alphabet excludes the letters I, L, O, and U to avoid confusion and abuse.
Can anyone please ellaborate? I don't get the confusion or abuse potential
- cloudhead 10y agoI'm guessing the following pairs can be confused visually: O/0, I/l, U/V..
- _ak 10y agoNot the author, but presumably because 1, I and l are visually hard to distinguish in some fonts. Same goes for O and 0. As for U, I don't know about that, but I recently stumbled upon the issue that Google's OCR software seems to incorrectly recognize U as II relatively often.
- tsenart 10y agoDepending on the font used, 'I' and 'L' can be easily confused by humans. 'O' can be read as '0' too. This is meant to prevent that. As for the 'U', I'm not sure why the original ULID spec left it out. Thanks for raising this. I'll investigate.
- Guvante 10y agoWell you need to leave 4 characters out to get to 32, so unless there is a better character the selection is arbitrary.
- tyingq 10y agoTypically, 'U' is omitted to avoid accidentally putting the word FUCK into the generated output. No, not kidding. See http://www.crockford.com/wrmg/base32.html http://www.crockford.com/wrmg/base32.html, Ctrl-F, search for obscenity. Edit: Interestingly, since it already omits the letter I, adding U covers all of George Carlins' 7 Dirty Words: https://en.wikipedia.org/wiki/Seven_dirty_words https://en.wikipedia.org/wiki/Seven_dirty_words
- joshuak 10y agoThis is so bazar that I don't even know where to start to try an understand it. Is it a joke? Tongue-n-cheek? It must be. I can't understand how it could possibly be a ligament concern. What about other languages? As adults who doesn't use 'fuck' conversationally? If it were a real concern then surly drawing attention to it in the design of the ID is a more obvious then the very rare occasion of 'dirty words' (by some definition of dirty) appearing in otherwise random strings. So I have to conclude it's a joke, but then what the fuck? This type of thing puts noise into engineering details that just ends adding to confusion and ambiguity. If there's no (important) reason for 'U' to be in the omission set, then just say it's an arbitrary choice, if there is an OCR, or legibility reason then say that. Half of my brain says it's funny, and half my brain says it's fucked up.
- tyingq 10y agoI see where you're coming from. On the other hand, since they were after base32, they were able to choose an additional letter to omit. By omitting the U, they happen to exclude the most popular english language expletives. These things can and do end up in, for example, urls. Think something like an ecommerce store order id. While not likely to happen, the below could happen in an email, and might invite unneeded controversy: "Dear Mr Customer, Please Click Here to see your order status: http://example.com/status/FUCKUP6433432334234 http://example.com/status/FUCKUP6433432334234 "
- joshuak 10y agoAh yes ok I can understand that. I can see from a marketing point of view that you might want to simply and quietly avoid the (roughly) 1 in 1,000,000 ids which start with 4 specific characters. Still, it's a bit culturally specific. It gives the impression of solving a problem that is doesn't. Depending on your market/language a different character might be a better choice. Plus there are quite a few 'bad' words that can still appear. Filtering and rejecting proposed IDs based on a list of objectionable words seems like a far more realistic solution, then baking a very specific exclusion into the plumbing.
- taeric 10y agoI think this is a problem that was accented quite well for people that ever had to use passwords in video games. Sibling posts explain why better. This isn't something that you forget once it has bitten you.
- pradn 10y agoDouglas Crockford goes into why he chose those 4 letters in this page: http://www.crockford.com/wrmg/base32.html http://www.crockford.com/wrmg/base32.html. I, L, and O can be confused with the digits 1, 1, and 0, respectively. He omits U to avoid "accidental obscenity."