Hacker News new | ask | show | jobs
by wmeddie 1030 days ago
Definitely read https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-... if you haven't yet.

Then think about what are the requirements your system needs when it comes to names.

Does the app need to know what a user's name is at all or is a username enough? Does it need to distinguish the family part of their name for anything?

A thing I think is the most general is to just have a Full Name field (min length 1 and either John Doe or something cute as default) And a Nickname or Display Name field if your app needs to show something on screen.

7 comments

It's not just programmers. Plenty of genealogists, do things like automatically give a wife their husband's (male!) patronym. Even though they see it doesn't work that way in the sources, they seem to feel that it "should" work that way.
In France married women, if they let their guard down, will be given their husband's last name as "nom d'usage" upon almost any sign-up paperwork, without being asked, at least in my experience.

Nom d'usage technically has no legal value, it's just a last name you might want to be addressed as, normally that of your husband but it can be a pen name and whatever. It's optional, and technically only at the request of the relevant person. Men can have nom d'usage too (égalité, after all).

Still, immigration offices, banks, insurances... they often slap the husband's last name if that field is left empty, just because. Why would you want something else, right? She probably forgot!

We started crossing those fields to make it clear she doesn't want a nom d'usage.

Yes, it's really bad.

We actually couldn't open a joint bank account with both names separated. They'd accept the papers signed in the official names, but the names on the cards and other communication needed to be unified for their system to accept it. They'd accept to reemit card with the correct names only as an exception by abusing the card renewal system apparently

I assume you're talking about Société Générale? I've experienced that, and what's worse it's that's it's broken on purpose. A joint bank account doesn't require the people to be married, let alone to share names. But if they tick the married box, whoops, now it's suddenly mandatory.
To be fair, most of the stuff in "falsehoods programmers believe about $concept" lists are really falsehoods almost everyone believes. Software is just one of the places where the limits of those implicit beliefs might actually become apparent.

Most people never need to think about the details of how names might work in a different culture across the world, let alone work that into any kind of a rule-based mechanism or a rigid information model. If some random person working at a construction site in Europe or the US has no idea that first names and last names aren't a universal thing, that has exactly zero direct effect on anything. In most cases that's probably even true of lawyers or other high-level white collar work.

I'm actually inclined to believe lots of programmers know more about e.g. time [1] than a non-programmer Joe Random does on average, exactly because software developers may actually end up coming across at least some of those issues.

[1] e.g. https://gist.github.com/timvisee/fcda9bbdff88d45cc9061606b4b...

This list would have been so much better with examples or a short explanation how or why the assumptions break in case it is not obvious. The author offers examples on demand [1] but while I would be interested to know them, it seems not important enough to bother the author. Maybe the author sees this comment and has some time to spare, then it could benefit everyone and not just one person asking.

[1] If you need examples of real names which disprove any of the above commonly held misconceptions, I will happily introduce you to several.

I live in Japan (as does Kalzameus), my name will regularly cause problems in computer systems. In fact, quite often I'm not using my name but what I am called in Japanese, and even then it will often fail. Number 1 problem - not enough characters, because most Japanese people only use a few characters for their entire name, don't have middle names, and don't have spaces in their names. And that's just for starters. Should I use what I consider to be my name, my full name, the name on my passport or the name on my residence card…?

It's just not that hard to find problems with name inputs.

Do you have to enter your name in Romaji or Katakana in Japanese sites?
It depends but it's usually going to be katakana. Sometimes it would specify what's written on your passport, or residence card. I've even heard talk of using half-width characters, which, luckily, I've not had the misfortune to use yet.
Someone else decided to write a follow-up with examples: https://shinesolutions.com/2018/01/08/falsehoods-programmers...
There are 4 main name forms that I often see:

* Full name (John Smith)

* Index name (Smith, John) - mostly for meatspace compatibility.

* Preferred name (John Smith) - used in lists with other people's names

* Personal name (John) - used in direct communications

Index vs. preferred name can get a bit wonky. I used to work on software that had a lot of attendee/speaker list functionality. Different types of customer had strong expectations about how names should be displayed and ordered, sometimes even in different contexts (attendees might be listed by last name but speakers by first, etc.). We had medical conferences where everybody would be listed as "Dr. Fredrica Bloggs, MD" but the sort order would be by last name. And that was just for English-speaking customers.
it is really something to be dealt with via locale settings but the lack of standardized data underlying what the locale logic would display really throws a wrench in things
The name used in direct communications can depend on the level of formality and on the context. For example, John / Mr. Smith / Dr. Smith.

Then there is the difference between the "full" name and the legal full name, with all names spelled out. The latter is sometimes necessary, but it can be awkward or inappropriate to use it in most places that expect a full name.

Is there an article showing a solution because listing problems is the easy part?

And maybe it's just me but

>because names are central to our identities, virtually by definition.

isn't true, my name is for the outside world, inside I'm just I, that's my identity.

In this case, "listing problems" - as you dismissively call it - takes a lot of care and effort, the article is a distillation of experience and knowledge that very few possess. It's up to you to use this understanding of the problem space to decide which aspects you're willing to trade off. The article's job is to help people make these tradeoffs consciously, instead of designing based on simplistic assumptions made in ignorance.
There is no "a solution" and never will be. Design your solution to be maximally relevant to your scenario and accept that it can't be perfect.
>>because names are central to our identities, virtually by definition.

>isn't true, my name is for the outside world, inside I'm just I, that's my identity.

What happens in your head when someone calls your name? Surely that's a feeling of identity?

>What happens in your head when someone calls your name? Surely that's a feeling of identity?

I realize that someone is talking to me, but that has nothing to do with my identity. I doubt that that person and I have the same perception of who I am.

>..someone is talking to me..

I think the discrepancy here is just different definitions of the word 'identity'. If someone is talking 'to you' then you are identified by that. It's not about your unique internal world, but about your uniqueness among humans (like a primary key identifies a database row).

You don't refer to yourself in private by your own name?
Do you? I only say my own name when I’m introducing myself to someone.
On my own, I use my own name and pronouns. Not ever said or thought something like "Toutouxc, what are you doing?"
Nope, literally never. The idea of talking to myself using my own name is even a bit unpleasant, actually. I don’t have a bad name, I just don’t use it in my relationship with myself. Just like I know and like the name of my girlfriend, but I seldom address her by the name, we usually use the honey/love/baby equivalents.
What you are suggesting is talking in 3rd person. It is odd when someone does that.
To oneself, in private, you never or have never referred to yourself by your own name?
I had no part in choosing any of the names assigned to me at birth; I don't use them and don't particularly feel any attachment to them.
No, I refer to myself as I.

Without others I would never use my name.

> That Klingon Empire thing was a joke, right?

That made me laugh out loud. It's a great reminder why being conscious of the assumptions you make is an important part of development and one that LLMs can't really do.

Thank you for reminding me of this article!

More people designing applications need to read it.

And read this, you can learn a lot about names from it:

https://studyinthestates.dhs.gov/sevis-help-hub/sevis-basics...

> No hyphens, apostrophes, or commas; except in the Preferred Name field

But my passport and drivers license both show my middle names hyphenated :(

This was also educational, thank you!
Very interesting however

>People have exactly one canonical full name.

What is on your passport then?

My passport has two of my names in both Ukrainian Cyrillic and Latinized form, neither of which is my full legal name per Ukrainian law. My id however has a legal full name in Cyrillic, but not in Latin. To make matters worse, the same set of Cyrillic characters can be represented by different Latin characters and it's somewhat up to me to decide how it's spelled when the document is issued. Since I can have more then one passport at the same time, the names in Latin don't even have to match.

Then I have a residence permit in a different country, where my full legal name is spelled in Latin characters based on what is written in my birth certificate (which you guessed -- is in Cyrillic). So the Latin rendering there is entirely based on what I asked the translator to write there.

In the end, out of three documents I can id myself with, no pair has the same combination of characters for my name.

add:

To make matters even worse, my original birth certificate (not the one I have now) was issued by the soviet union and uses russian cyrillic and the same name there is both spelled and pronounced differently.

I can tell you that in my passport, my name appears in two different places and it's spelled differently been them.

Also, a lot of people in the world don't have passports.

I can also tell you that the passport office doesn't check anything very well, at least in the US, as my name on my passport doesn't actually match the name on my birth cert or SSN paperwork. I guess I mis-wrote it when I filled it out originally, but now I have to deal with how to get it fixed. For renewals, they only have a "my name changed" field, not a "you messed it up", so I've been ineffective at correcting the issue for years now.
> What is on your passport then?

In Ireland, it’s not entirely rare to use different forms of one’s name in Irish and English.

For example, in English our president would be called “ Michael Daniel Higgins”, but in Irish “Mícheál Dónal Ó hUigínn”, and while there’s obviously a correspondence between them, they are pronounced quite differently.

It’s possible to change the version of the name you use on your passport after six months of regular use (compared to two years for any other kind of name change), and in that situation both forms of your name will be listed on your passport.

What's on your passport may not be canonical. In some countries (Ireland and the UK, for instance) your name is, for practical (and generally legal!) purposes, whatever you use day to day; it wouldn't be _that_ uncommon for someone to have name X on their passport but have been going by name Y for years, and in this case name Y would probably be considered their legal name in most contexts.
I'm in that situation now, my UK passport/birth-certificate name is not the one I'm known by.

After several years of getting queried on mismatching ID, now I've moved to another country, I'm going through the process to "rename myself" - and mostly that's a matter of saying "Here's the name I've used for a long time, please make it official".

After the renaming goes through I'll be updating everything to match which will no doubt be a pain. But once it's done I'll have a much easier life.

Just as a really common anglo example, my passport has my middle name, but I will not otherwise use that name unless it's explicitly requested. Even airlines are inconsistent about this, so for most purposes I'm just Firstname Lastname.

At one point I had cards from two different banks, one with my middle name and one without.

> What is on your passport then?

See my other comment on Vietnamese names, actually if you have a Belgian passport and a Vietnamese name, your actual given name (the third part for women with the "Thi" middle name) is not shown on your passport or identity card, only the first letter of it.

For French people who have three given names it's the same, although the two last ones are generally not used (you could say they're little endian compared to Vietnamese big endian names, I suppose) so it's not as important.

I have no idea why, and Belgium is the only country I know that does that, but it means your passport name is absolutely not your canonical full name.

My wife has an extra first name that she doesn't always use, and my mum has two different but both correct spellings of her name.
The magician Teller just has 'Teller' on his passport, and if you refer to 'Raymond Joseph Teller', people won't know who you're referring to.
Dual citizenship frequently results in different names in different passports.
Exactly. This is the case for my children.
If you obtain French citizenship you can "francify"[0] your name; you'll end up with two full canonical names. Nothing really forces you to change your original name in your original nationality.

[0] https://www.service-public.fr/particuliers/vosdroits/F10528

depends... which passport are you asking about?
I'm from Ireland, an English-speaking country in Western Europe. I have a name that is a typical Western name. In theory, I should be the happy path for any name system.

But even I don't have one canonical full name. Even with just the government, the name on my birth certificate, passport, and tax documents is different.

Name 1: I was named by my parents after a friend of theirs. That friend commonly went by a short version of the name (think "Jessie" vs "Jessica", though that's not the real example). Anyway, since I was born in Ireland in the 90s, my parents had me baptised by the Catholic Church, which expected you to name your kids after saints. In the form which the saints used. This was less about any strong faith on their behalf, and more of the fact that it made it easier to get into any of the 90% of schools run by the Catholic Church. I think even then, it depended a little on which priest you were dealing with as to how strict they were with the name rules.

But anyway, the extended, "saint's" form of my name was needed for the baptism, so my parent's put it on the birth cert, plus a middle name. They (and consequently I) never used the extended version of my name, but my birth cert reads "ExtendedFirst Middle Last"

Name 2: Anyway, then my teenage years came and I went abroad and I filled out a passport application form to get one for that. It had fields for first name, middle name, and last name. So I put in the first name I actually use, dutifully filled out the middle name field even though I never use that, and then put in my last name. So my passport has "First Middle Last".

Name 3: Then when I came to actually paying tax as an adult, I had to provide details to the tax office and my first employer that lined up. At this point my middle name was well and truly out of use, so both got just "First Last". This is also the form of my name that appears on most utility bills, professional correspondence, etc.

Name 4: And then on top of that, I have a nickname I'm commonly known by. This is what's on a lot of personal correspondence (sometimes as just Nickname, sometimes as Nickname LastName), what people call me face to face, etc.

Now a lot of countries have a concept of a singular "legal name". In some countries it may be at least procedurally incorrect or sometimes even legally fraud if you were to use something else in passport applications, tax documents, etc. But Ireland does not. If you use something as your name, it is your name. Most government interactions will accept evidence (such as utility bills, employment contracts, etc.) that you've been using it for 6 months to update the above documents.

For any of the 4 variations above, I could provide enough evidence to the government to get them to update the other documents in line, but it's just not important. But if I was to bother I'd use "First Last" as the target name, and I'd actually rather not update the passport as I travel to the US frequently enough and "your name is different to last time you were here" strikes me as the kind of thing to make US immigration unhappy.

Alternatively, you can register a deed poll to get a piece of government paper stating effectively "X Y Z has informed the government they're now known as A B". But this is not a prerequisite to changing your name, just a way of short circuiting the process if you're stuck getting documentary evidence that you have changed your name via other mechanisms.

And that's all before we get into marriages, gender transitions, Irish vs English names, immigrants who anglicise their names, confirmation names, etc.