Live data from Hacker News

Falsehoods programmers believe about names – with examples (2018)

shinesolutions.com

51–60 of 115 posts

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

#51
post #41

Earlier quoted context omitted.

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

If your company can’t insure someone whose name violates these assumptions, then the best you can do is make those assumptions clear.

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

#53
post #41

Earlier quoted context omitted.

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

I’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?

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

#55
"with examples" => Follows up by not giving examples to a bunch of entries

"Confound your cultural relativism! People in my society, at least, agree on one commonly accepted standard for names. And will your software only be dealing with people named by your society?"

"I can safely assume that this dictionary of bad words contains no people’s names in it. This is a common mistake – many “bad words” are not bad words in other languages, and some are used in names. Moreover, not every society restricts what words may be used in a name; it’s perfectly possible that someone’s name may have been established in such a jurisdiction."

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

#56
post #24

Earlier quoted context omitted.

You can very easily have multiple legal names, as "legal" is a national concept and you can have multiple citizenships, each one with a different legal system and thus potentially a different legal name.

Which is exactly what I said

> You might have business rules, such as "a person can only have one legal name at a time[...]"

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

#57
I think about the 2010 article often as I develop- often little line of business apps etc I have to put first/last/middle on the ui and database because that’s what the paper form always had. I really wish for this, as well as other common scenarios- address and date/time entry also- there was a standard library to pull from for various languages. Need a simple user friendly ui for names that follows all the rules? Copy this. Or a DB schema for names? Here’s the TSQL.

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

#59

"with examples" => Follows up by not giving examples to a bunch of entries "Confound your cultural relativism! People in my society, at least, agree on one commonly accepted standard for names. And will your software only be dealing with people named by your society?" "I can safely assume that this dictionary of bad words contains no people’s names in it. This is a common mistake – many “bad words” are not bad words…

> People in my society, at least, agree on one commonly accepted standard for names.

For context, patio11, the author of the original list (without examples), emigrated to Japan and has noted that it is (was?) common for computer systems there to have no idea what to do with his English name. This included his Japanese employer, who apparently assumed all employees would have Japanese names.

> I can safely assume that this dictionary of bad words contains no people’s names in it.

This problem is notorious enough to have a name: https://en.wikipedia.org/wiki/Scunthorpe_problem

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

#60
post #56
post #24

Earlier quoted context omitted.

Which is exactly what I said

> You might have business rules, such as "a person can only have one legal name at a time[...]"

ya, meaning it's an option, and not the default
Post reply on HN