Live data from Hacker News

Falsehoods programmers believe about names – with examples (2018)

shinesolutions.com

41–50 of 115 posts

Re: Falsehoods programmers believe about names – with examples (2018)

#41

> 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 p…

> 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.

Re: Falsehoods programmers believe about names – with examples (2018)

#43
post #41

> 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 p…

> 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.

The 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.

Re: Falsehoods programmers believe about names – with examples (2018)

#44
post #3

A personal name is either a Polynym (a name with multiple sortable components), a Mononym (a name with only one component), or a Pictonym (a name represented by a picture - this exists due to people like [Prince][1]). A person can have multiple names, playing roles, such as LEGAL, MARITAL, MAIDEN, PREFERRED, SOBRIQUET, PSEUDONYM, etc. You might have business rules, such as "a person can only have one legal name at a…

Does it cover "Bobby Tables"?

https://xkcd.com/327/

Re: Falsehoods programmers believe about names – with examples (2018)

#46
post #41

> 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 p…

> 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.

Or do, and just don't care that Elon Musk's kid won't be able to use your application

Re: Falsehoods programmers believe about names – with examples (2018)

#47
post #41

> 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 p…

> 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.

I 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.

Re: Falsehoods programmers believe about names – with examples (2018)

#50
post #28

A more realistic example for 40 ("people have names"): Newborns might not have a name. Lots of systems might have to handle newborns.

Some systems even have to handle not-yet-borns. An example I have seen is that when pregnant in France, you might have to pre-register your future child for one reason or another (a common one is waiting lists for childcare, but some paperwork requires it in other situations). Ours had “À naître” [to be born] as a first name, as the forms did not accept no first name.
Post reply on HN