Falsehoods programmers believe about names – with examples (2018)
shinesolutions.com
shinesolutions.com
But in China, there are 5 Microsoft-approved offline training centers per metro station in any city with IT employees + the flats are so small you cant possible be uninterrupted during the exam during covid, so we mostly go offline.
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?
When you write code that accepts names, don’t bake in assumptions that violate these falsehoods.
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.
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...
There's also really nothing about JSON that should dictate that you can't handle the name "Null" or "O'Neill." You don't even need special escaping for those.
It is meaningless to "sort" names across countries. Most languages have their own sort rules, and some languages have multiple sorts depending on the specific usage!
Sorting is almost never what you want.
Are you printing out a phone book onto dead trees? No? Then you do not need to sort names.
Just do substring search, and you've already got a UI that is 10x better than having people flip to 'A', then 'Aa' to get to 'Aaron', etc...
If you're about to say "but I need to define a sort order for a database table key" then you've made another mistake and also not read the article...
That is true. However, it's also obviously true that a sort order that tries to take all of these into account, instead of using the rules of the current user's language, is obviously useless, so I don't understand why you think it's a meaningful objection. Users are surprised and annoyed by an inability to sort names.
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.
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.)
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.
Falsehoods Programmers Believe About Names – With Examples - https://news.ycombinator.com/item?id=18567548 - Nov 2018 (169 comments)
Eg. in macedonia, traditionally a person would get their fathers name as their surname (so if the fathers name was "Petar", and the son was Dragan, the lastname would be roughly translated to "Dragan of Peter"). Because there are different forms for feminine and masculine words, The son would be named "Dragan Petrovski", and the daughter (Eg Marija) would be named "Marija Petrovska".
This tanslated to modern times means, that if "Marija Ilijevska" married "Dragan Petrovski", she would then be named "Marija Petrovska". Their sons surname would again be "Petrovski" and daughter "Petrovska".
So basically matching parents and their kids by their last names has to take in account the -ski or -ska form .
Jan Kowalski has a daughter, Anna Kowalska.
When she is young, she is called Anna Kowalszczonka, Kowaliczka or Kowalówna depending on who you asked (and you can't reliably reverse these forms into the original name)
When she is grown up, she is called Anna Kowalska.
As it happens, the country was part of the Russian empire, so she's also called Анна Ковалска or Aнна Kовалская, depending on who you asked.
When she marries Jan Kowal, she is called Anna Kowalowa or Anna Kowal.
When Jan Kowal dies and she marries Wawrzyniec Słowacki, she is called Anna Słowacka. But her husband is from Austria-Hungary, so he's also called Laurentius Slowacki somewhere in his documents, even though he never uses this name for anything.
Their son Stefan moves to Lithuania, but even though he's ethnically Polish, Lithuanian government requires him to have "Steponas Slovackis" printed on his documents.
https://en.wikipedia.org/wiki/KISS_principle
I would recommend my daughter or son to keep their name even after marriage just to avoid paperwork hastle.
Björk's name is Björk Guðmundsdóttir, daughter of Guðmundur Gunnarsson and Hildur Rúna Hauksdóttir.
These use the genitive -s followed by either -dóttir for girls or -son for boys.
In Iceland, matching parents and their kids by their last names doesn't work that well.
We had a German friend who married a Spanish man, and she insisted on changing her surname to his when they got married since that was traditional for her. But for Spanish people this was really weird, since it sounded like they were siblings. I actually haven't asked them since they had kids, but I guess their kids must have his first surname doubled (which is not unusual - María Sanchez Sanchez just means that the first surname of both parents was Sanchez).
Not for a long time. Only Iceland does that now.
If a "programmer" was actually just a programmer, none of their beliefs would matter. Either it met the spec, or not.
But in reality, a lot of the job of a "programmer" is to make all those detailed decisions, and handle all the exceptional cases, that other people don't want to be bothered to think about. But those detailed decisions and edge cases need to be handled because much of the value of software is running the business worldwide at all hours with fewer humans involved, so those edge cases will come up constantly.
So all these little decisions fall on the one writing software. That's actually an incredible amount of power once you realize it.
Oh and btw the value of software is not to handle every edge cases well, but to be able to change, imho.
I think the reason is that many assume that these cases are niche and not something they need to worry about.
Which might be the case, or might not, depending on the application. But either way, using celebrities or historical figures is not a great way to convince anyone otherwise.
This is a French-specific thing? I didn't know that. I really like it, it makes it easier to know which part is the name and which part is the family name.
https://www.cia.gov/the-world-factbook/countries/japan/
Lots of info on the page, but the relevant part:
“head of government: Prime Minister Fumio KISHIDA (since 4 October 2021 )“
Edit: Another example:
https://www.cia.gov/the-world-factbook/countries/albania/
“head of government: Prime Minister Edi RAMA (since 10 September 2013); Deputy Prime Minister Senida MESI (since 13 September 2017)“
Not contend with simply filling in Jack, bureaucrats would simply come up with a last name for them. Or - if they felt so inclined - ask the person to come up with one themselves. They would often chose their occupation. Americans know that a lot of modern family name spellings in the US are the result of careless bureaucrats at Ellis Island.
Back then, family names, house names, last names and surnames weren't necessarily the same thing. One might have more than one. You may be of one House, but your last name was Jackson (son of Jack). Also somewhat inconvenient for these bureaucrats with few fields on their forms. And also, stop changing last name from generation to generation.
Though, fortunately for these bureaucrats, unlike modern programmers, when the map did not fit the terrain, they could simply alter the terrain.
See eg this from the New York Public Library: https://www.nypl.org/blog/2013/07/02/name-changes-ellis-isla...
(The mandated adoption of surnames is a pretty complex topic and of course proceeded in different ways in various times and places.)
In Le Guin's The Dispossessed [1] people on the satellite planet called Anarres get assigned an unique mononymous [2] name at birth. No one else alive at the time has the same name (and usually the name isn't re-used for a number of years). The protagonist is "Shevek".
The problems arise when you want to do more than just echo the name exactly as entered. Perhaps you want to show only last name in some context - now you assume everyone have a last name, and you are already in trouble.
Of course you can't always get away with treating names as opaque, so this is where you need to be very careful with the assumptions you make. The approach depends on the purpose of registering the name in the first place. For example if the purpose is to identify a person showing showing up to pick up a rental car, you just ask them to enter their name as it is stated on the drivers license. If you want to mail them a letter, ask for the name as it is stated on their mailbox.
There is no one-size-fits-all solution, but instead of worrying about the-artist-formerly-known-as-Prince or tribes communicating only with colored fabric, consider the use case for the name. If you have a web-shop you probably don't have to worry about orphan toddler refugees, but if you write software for hospitals you absolutely have to consider the case where the name is unknown. I'm sure Mr Artist-formerly-known-as-Prince has both a passport, credit card, legal name and drivers license, all with names representable as Unicode characters. The question is which one your application needs.
Btw. I find it amusing when web startups think they need a "web scale" distributed database system in order to be scalable to a billion users, but thinks handling characters outside of the ASCII-range is an obscure edge case which can be ignored.
However, after a period of time dictated by the hierarchial position of the one who died, you will be given the choice to retake your previous name, or maintain your new one, if you have it.
Several name changes with the differing clocks for switching may overlap. Each time, you may end up with interspersed periods of no name.
Every time a change occurs, you are not normally allowed to acknowledge that the previous name was ever attached to you. As such, your gov IDs have a numeric constant, like everyone else, but no name fields.
On an island of a thousand, I estimated roughly 10% of people at any one time had no name.
"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."
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
> No, your system is badly designed.
> This particular example name 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.
I feel like the author of this page missed the original joke here: The sentence is in English so the reader is primed to expect an English name, or at least something representable in ascii/latin characters, and then it drops something totally different to challenge the reader's expectations.
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 time, but multiple pseudonyms at a time".
Some examples:
names: [
{
type:"POLYNYM",
role:"LEGAL",
given:"George",
middle:"Herman",
moniker:"Babe",
surname:"Ruth",
generation:"JUNIOR"
},
{
type:"MONONYM",
role:"SOBRIQUET",
mononym:"The Bambino" /* mononyms can be more than one word, but only one component */
},
{
type:"MONONYM",
role:"SOBRIQUET",
mononym:"The Sultan of Swat"
}
]
or names: [
{
type:"POLYNYM",
role:"PREFERRED",
given:"Malcolm",
surname:"X"
},
{
type:"POLYNYM",
role:"BIRTH",
given:"Malcolm",
surname:"Little"
},
{
type:"POLYNYM",
role:"LEGAL",
given:"Malik",
surname:"El-Shabazz"
}
]
or names:[
{
type:"POLYNYM",
role:"LEGAL",
given:"Prince",
middle:"Rogers",
surname:"Nelson"
},
{
type:"MONONYM",
role:"SOBRIQUET",
mononym:"Prince"
},
{
type:"PICTONYM",
role:"LEGAL",
url:"http://upload.wikimedia.org/wikipedia/en/thumb/a/af/Prince_logo.svg/130px-Prince_logo.svg.png"
}
]
or names:[
{
type:"POLYNYM",
role:"LEGAL",
given:"Juan Pablo",
surname:"Fernández de Calderón",
secondarySurname:"García-Iglesias" /* hispanic people often have two surnames. it can be impolite to use the wrong one. Portuguese and Spaniards differ as to which surname is important */
}
]
Given names, middle names, surnames can be multiple words such as `"Billy Bob" Thornton`, or `Ralph "Vaughn Williams"`. [1]: https://en.wikipedia.org/wiki/Prince_(musician)Looks like GP didn't read the list.
Compromises are unavoidable in web development.
Also, tell me what the purpose you're using my name for, e.g. "Name as it appears on your payment card/passport/ID/SSN" helps tremendously in resolving ambiguity.
Also, consider not asking for a name at all unless there's actually a good reason.
You probably need a length limit to prevent against attacks though. Just don't set it at 31 character.
It's "Van Gogh" when written without the first name. With, it becomes "Vincent van Gogh".
Basically, the "filler words" are without capital unless "naked" at the start of the noun.
So it also is "Van der Staaij" or "Kees van der Staaij".
Russians don't hold a patent on Cyrillic. There are plenty of languages using Cyrillic, e.g. Mongolian or Serbian.
The problem occurred when the prince had to seek urgent care, the Emergency Room of a rural hospital.
They needed first name, last name. The prince didn't have a way to fill out the family name, the last name. English was not his first language, he was bleeding, and it was a late night for everyone all around.
So it became a real argument. Finally my friend leans over and says "SMITH. His last name is Smith!"
The orderly was able to fill out the form, and everyone was better off.