3 ms·
This seems slightly flawed in that it completely removes all members of a similar set rather than normalizing to a single element per similar set. Thus after n
by shkkmo 3y ago
This seems slightly flawed in that it completely removes all members of a similar set rather than normalizing to a single element per similar set.
Thus after normalization, '1lI' would become '111'. This allows you to add seven characters back to the author's code generation alphabet without re-introducing any ambiguity.
- dools 3y agoIt only reduces the ambiguity if everyone does the same and everyone knows that you've done it.
- shkkmo 3y agoIf you control the system for generating the codes and the system for verifying the codes (which is generally the case for these kinds of codes), then nobody needs to know you've done anything. It's the same normalizing to upper/lowercase characters when you parse a non-case sensitive code.
- hananova 3y agoWhy not include '1', but make it so '|Il1' all map to the same internal value? That way you have no ambiguity while minimizing alphabet reduction.
- shkkmo 3y agoI'm not following how your suggestion. It seems like we're saying the same thing?
- wccrawford 3y agoIf you need more possible values, I agree. However, if you don't need them, I would remove them so that the user doesn't have to spend any time wondering which character it is. Even though you're processing them all after they type them and fixing them, the user has spent time and effort that they didn't need to, just picking which one it is. IIRC, I chose to keep them when I did something like this, but I don't think I thought to accept the others and convert them automatically. That project is sunset now, so it's not an issue.