3 ms·
> This particular example name [Tanaka Tarou 田中太郎] is perhaps best known as the name of an alien in an anime series (and a manga). There have also been real peo
by emodendroket 5y ago
> This particular example name [Tanaka Tarou 田中太郎] is perhaps best known as the name of an alien in an anime series (and a manga). There have also been real people with this name.
Huh? That's a bit like saying the name "John Doe" is "perhaps best known from being the name of a character in a movie." It's just the stand-in, "generic" Japanese name that's used in examples. If an alien had the name in a cartoon it was probably a joke about the alien going out if its way to appear ordinary, the way the characters in Third Rock from the Sun were named Tom, Dick, and Harry.
Anyway, this article always kind of rubbed me the wrong way. OK, maybe someone's name is one character that's not possible to represent with Unicode. What do you want me to do about it?
- drewzero1 5y ago> the way the characters in Third Rock from the Sun were named Tom, Dick, and Harry. Wow, I've watched that show for years and never caught that. I love the ordinary alien name trope, and my favorite incarnation is Ford Prefect from the Hitchhikers Guide series. (While I imagine it was a great gag in the UK for the alien to believe that cars are the dominant life form on earth, the joke was a bit lost on US readers because the model was not popular here.)
- mcphage 5y ago> What do you want me to do about it? When you write code that accepts names, don’t bake in assumptions that violate these falsehoods.
- bspammer 5y agoThe only way I can think of do that would be to not make a name field mandatory. That's certainly possible in some applications, but not in others. For example, I work in insurance and we need a name to put on the policy documents.
- mcphage 5y agoIf your company can’t insure someone whose name violates these assumptions, then the best you can do is make those assumptions clear.
- emodendroket 5y agoIf you book travel, they have something you're supposed to put in the last name field if you don't have one.
- umvi 5y agoOr do, and just don't care that Elon Musk's kid won't be able to use your application
- grammarnazzzi 5y agoYou're being obtuse. Everybody can still use the application. The just need to supply a name that is valid to the application. THIS IS REASONABLE
- emodendroket 5y agoAnd considering the great number of official forms one must fill out which make the same assumptions that programmers foolishly believe, I am inclined to believe that The Artist Formerly Known as Prince or whoever already has some idea what they'll put in the fields to accommodate their unusual situation.
- smoldesu 5y agoI think that part is pretty easy to understand, but if the author's intention is to have every single one of these issues addressed they're going about it the entirely wrong way.
- mcphage 5y agoI’m not sure anyone, including the author, considers addressing every one of those to be possible. But they want you to be aware of the assumptions you’re baking into your code, and maybe spend a few moments about which requirements you actually require. What do you think would be a better way of going about it?
- smoldesu 5y ago> What do you think would be a better way of going about it? I suppose it depends on what you're trying to accomplish. This article definitely reads like it's trying to annoy developers to the point of closing the page though, even if it's intentions are relatively agreeable. I'm reminded of the whole 'master vs main' debacle, where this kind of tribalism hit critical mass. There was huge potential for people to have a good discussion about acceptable practices in software development, but we gave it up in lieu of tribalism and us-vs-them politics. As a result, there was way more media blowback than necessary, which lead to a false sense of urgency and a whole lot of bugs. So, I don't know. But I do know that a good discussion doesn't start with 40 theses and a hostage situation.
- jiggawatts 5y agoMost of these issues can be solved by simply providing a "Name" field that accepts Unicode and has a reasonable length. Don't validate it in any way except to require at least one non-whitespace character. Trim any excess whitespace and run the text through a Unicode normalization algorithm. At most, filter out Unicode blocks that can't possibly apply, such as emoji and maths symbols. Done. That covers something like 90% of the already pretty obscure corner-cases. The remainder are likely out-of-scope, such as children that have not-yet-been-named. They can't legally sign up for things in most (all?) jurisdictions, so it's not really worth considering in most scenarios. This is already 10,000x better than ascii-only input fields for "Surname" and "Given Name" limited to something like 20 characters each. Where entering "Null" or "O'Neill" throws a HTTP/500 error because JSON is "so simple" that anyone can use it...
- dahfizz 5y agoHow do you even accept names if the name is not representable in any character encoding?
- mcphage 5y agoProbably you can't, because the person couldn't even type their name in. So if you're writing an application, that's one that's outside your control, and you can't do anything about.
- emodendroket 5y agoOK, so what I'm asking you is how I am meant to handle names which are characters that are literally impossible to represent with a computer.
- imwillofficial 5y agoThe artist formerly known as imwill eagerly awaits your answer.
- mcphage 5y agoI responded this to a different thread also, but: Probably you can't, because the person couldn't even type their name in. So if you're writing an application, that's one that's outside your control, and you can't do anything about.
- tkgally 5y agoOne real person with that name is the current editor of a Japanese science magazine [1] that has been published since 1931. I did some work for him about ten years ago. He is a very nice man. [1] https://www.iwanami.co.jp/ad/kagaku/ https://www.iwanami.co.jp/ad/kagaku/
- goto11 5y ago> OK, maybe someone's name is one character that's not possible to represent with Unicode. What do you want me to do about it? The example with The Artist Formerly Known as Prince is rather contrived. More realistic is the Chinese family names which are not yet supported by Unicode. But if you can get away with it, it is perfectly reasonable business decision to only support names which can be represented as Unicode characters! The point of the article is just that you should be aware about the assumptions you make, and the less assumptions you need to make, the fewer problems. A less contrived example would be the forms which required a last name of at least two characters. This is just dumb, since "O" is a perfectly valid and even reasonably common last name. So the writers put in extra effort to outlaw certain names, for no benefit whatsoever. Presumably they thought all real names are at least two characters long. Knowing this was a faulty assumption would have saved them the time they spent on making their site less useful.