5 ms·
Some problems with 'first name' and 'last name' fields in data
- benj111 3y agoSo if you're dealing internationally, and names actually matter. You may need to think a bit harder about names. Although the proposal still doesn't solve all edge cases. And the current edge cases have presumably found a solution, like my girlfriend that has 2 last names, and is from a 'western' country. My parents address is stupidly long and doesn't fit in to most address boxes, so you also need to allow arbitrarily long addresses. Oh, and your email validator is wrong too.
- sjmulder 3y agoEven bog standard Dutch names are often a problem e.g. “Jan de Wit” being addressed as “Jan de”, “Jan Wit” or sorted under the letter d.
- stephenr 3y agoIs the "de" somehow different to a "regular" middle name?
- ssss11 3y agoIt’s part of the last name.
- Daimanta 3y agoIt's not a "middle name", rather it's an "infix". Some countries/languages have this feature where there is a generic "infix" part of the last/family name. This generic part if fully part of the last name but is so common that it will cause an imbalance in the distribution of names. To understand this as an English speaker. Imagine people aren't called John Smith, but rather John the Smith and not Bill Boston but Bill of Boston. Now imagine that a large percentage of people had an infix in the name. It would be impractical to order stuff by last name and find a massive index on the letter "o" because all the last names starting with "of" or at "t" starting with "the". To balance this out, parts that would translate to words like "from", "the", "of", "to" or "on" would be considered an index. Part of the last name, but not considered part of the name index. John the Smith would be found at the letter "S" usually structured as "Smith, John the".
- stephenr 3y agoAh ok. So the issue is not so much how to store it, but how to sort it. It's the iTunes "The ..." problem. Thanks for clarifying.
- deleted 3y ago[deleted]
- nomdep 3y agoThat sound like is the user’s fault: if their name is “Bill of Boston”, then their surname is “of Boston”… and if they prefer to be called “Mr. Boston” or similar, then they should omit the “the” when filling a form
- Hasnep 3y agoIf someone's family name is O'Neill and their name gets sorted to the top of the O section because if the apostrophe does that make it their fault? If they prefer to be sorted correctly they should omit the apostrophe from their name?
- Quekid5 3y agoThink "da Vinci". It's not exactly the same, but similar enough.
- hunter2_ 3y agoSpeaking of email validation, recently I've come across email inputs that reject addresses that would definitely match even the most restrictive pattern you can imagine (Latin letters and Arabic numerals @gmail.com) but which I created by mashing my keyboard or just made up using my imagination and extremely common (in the USA) names. For example, in the captive portal for Starbucks WiFi, it rejects things like "iebfisldndu38256" or "jennsmith122499" suffixed with "@gmail.com". Now, I'll admit: it actually did thwart my attempt at not providing my actual email address, for a good several attempts. I had to increase my creativity to a level I truly didn't anticipate, before finding something it accepted. And I definitely had enough randomness that it wasn't just disguising an "already exists" error with an "invalid address" error for privacy purposes, I am certain. What in the world kind of validation is this? Do people really end up resorting to entering their actual email address often enough to make this at all useful?
- constantly 3y agoThis isn’t about validation. They check to see if it is a real email address.
- NoZebra120vClip 3y agoThis may drive DBAs nuts, but in some cases, perhaps you could have a naming_convention variable that is filled out first, and it has a certain number of limited values, and it determines the number and order of "name" fields that get filled out. Then you have a catch-all naming_convention that just produces one "name" label that's very long, and you put the whole name in there. Then you can have, say, "Western" naming convention, "Asian" (reverse order), "Spanish", "Catalan", "Hungarian", "Ancient Roman", and some of these are going to look very similar. And then if Madonna Ciccone or Beyonce Knowles comes around, you just use the catch-all for the mononymous. It's not an elegant solution and it's not going to work for user-oriented forms, but perhaps on the backend, I don't know, for Wikipedia or something. Wikipedia already tags many biographies with the naming convention that is used.
- cratermoon 3y agoI'd go further and say we need to stop passing around names as language primitive strings. Serious work on Name types in the standard library would go a long way towards making life easier for developers, in the same way the Calendar, Date, Time, and Duration types have made dealing with time.
- hunter2_ 3y agoNot a bad idea. Form builders and the like increasingly do offer fancy string data types (like "Link" for example, which captures the desired link text and URL as a tuple, and sometimes even more detail than that), so it does seem reasonable for "Name of a person" to be dealt with similarly.
- macintux 3y agoI’m skeptical. Calendar, date, time all have a finite set of values. Sure, it’s a complex, maddening morass, but ultimately it boils down to a small set of integers, and a small set of standards to implement. Names are effectively a collection of arbitrary Unicode values with a fair number of complications (sorting, multiple names, etc), and there is no set of standards to draw upon for implementation.
- K0nserv 3y agoInstead of complicated schemes that attempt to be locale aware, it seems simpler to use a general scheme that will apply regardless. Collect two values: 1. What do you want to be called? e.g. if we send you an email we'll say Hello {name} 2. What is your legally recognised name i.e. what's on your passport and official documents. #2 is only relevant in some domains, in many cases #1 alone is sufficient.
- Aaargh20318 3y ago> What is your legally recognised name i.e. what's on your passport and official documents. 1) People can have multiple passports with different names. 2) a single passport can contain multiple names for the same person.
- bob778 3y agoWhat standard allows multiple aliases on one passport? AFAIK, the MRZ and chip don’t support alias fields?
- torstenvl 3y agoRussian passports contain a transliterated Latinized version, which also (usually?) omits the patronymic.
- jasonpeacock 3y agoAnd now we need a "Falsehoods developers believe about passports" doc...
- deleted 3y ago[deleted]
- Aaargh20318 3y agoICAO 9303, part 10, section 4.7.11, data group 11 allows for a list of other names.
- 3y ago
- someotherperson 3y agoI’m trying to figure out what the issue is here. The Spanish example given isn’t even a real problem: even Spanish speaking countries only use two columns (“first names” and “last names” plural). It really feels like it’s trying to invent a problem that doesn’t exist, or to try to cater for the extreme edge case. Once you have the data, how you present it as a separate i18n thing. Do you want to address an <ethnicity> crowd by their last name? Cool! That’s a rendering issue, not a database problem.
- agubelu 3y agoI understand that the author's point is that we should replace "first name" with "given name(s)" and "last name" with "family name(s)" if we are going to have two fields instead of just one for the full name. It's true that it would be more clear in some cases, since in many cultures the "first name" is the family name, which is probably not what the system expects. Though I do agree that it's mostly a matter of i18n. In Spanish you should ask for "nombre" (name) and "apellido(s)" (surname), if you say "given name" and "family name" users will be confused.
- hunter2_ 3y agoIdeally it would just ask for each actual need. If the system needs to render something brief for a salutation, something verbose for a certificate of achievement, and something suitable for sorting purposes, then it could just ask the user to provide all of those exact things. Then the potential for misalignment with "what the system expects" completely disappears.
- brodock 3y agoLast names are also not limited to ASCII. There all sorts of special caracters depending on the language like üáàãéèç-' (the single quote is specially important because its normally blocked due to SQL injection, but its a common character in italian/french/spanish names). Preventing people from writing their own names because you decide to use a regexp from stackoverflow is also bad.
- SAI_Peregrinus 3y agoDon't forget Irish names for using the apostrophe!
- NomDePlum 3y agoNames are much more complicated than this. A starting point is pretty much all systems processing names need to consider all possible permutations across all cultures, and select some constraints to operate by. There is no silver bullet here, and in all honesty the authors suggestions seem well intentioned, but don't address any real problem space. When it comes to these considerations for instance, it's possible to have a first name, but no last name and vice-versa. Also, never mind how many words make up a first or last name, but what's the minimum number of characters allowed for each? What characters do they allow, and which shouldn't they? Also, what version of the person are they attached to? Is Dr. J. Stevenson the same identity as Jonathan Stevenson, or Jon Adam Stevenson?
- cratermoon 3y agoI worked at an place tied to 60s US legacy technology from the airline industry, and yes, everything was first name/last name. I don't know how it works interoperating with airlines serving Asia or anywhere with non-US naming. The same system was strictly ASCII, too (I think very technically EBCDIC deep in the inner workings). Also, because of TSA rules and the security line, the names are used for more than personalization, they are legally required to meet certain criteria. Previous to that I worked at place with a key customer in Japan, so everything was pretty well i18n and I got used to seeing given name/family name or similar. I discovered I had muscle memory for typing 'surname' instead of 'lastname'.
- drewcoo 3y agoThe author prefers "given name," but that does not include one's surname and that may also not be a one's current name. I'm constantly annoyed when asked for both my legal name and my preferred name that companies choose not to address my by my preferred name. That's why I gave them my preferred name, after all.
- smusamashah 3y agoWhere I am from, we don't have first and last names. It's usually a name people call you by and your full name. Full name can have multiple parts (usually 2-3 can be more). The cast or family name usually comes at the end. Some cast related names are in the beginning as prefixes. E.g. First part of my name is Muhammad but no one ever calls me by this in my country (Pakistan). This is one of the most common prefix here. I am usually surprised when some one here in UK correctly calls by my name instead of Muhammad. Filling official form with Muhammad as my "First Name" is a weird experience knowing that this is what I will be called in communications.
- wdutch 3y agoFunnily enough, I have the same problem and I'm from the UK. I now live in Southeast Asia where officials will call me by my middle name which is a really weird experience for me.
- smusamashah 3y agoI think a better format for forms can be "name", which is the name you would like to called by, and "full name", which should cover a lot more cases.
- mcmoor 3y agoIt's always been a forced input format that doesn't stand scrutiny even a bit outside of western world.
- esperent 3y agoAlso fair to note that Western people who live in places with other name formats will suffer the reverse problem.
- redeeman 3y agothought: when half the country has a "muhammed" appendage to their name, what does it even mean? and might it perhaps be time to just not consider it as such?
- anotherhue 3y agoAs an Irish person I'm often accused of SQL injection.
- _kst_ 3y agoI recently filled out a web form on a state government site that asked me to enter the name of my immediate supervisor at my previous job. His last name has an apostrophe (starts with "O'"). The site gave me an error message: "Your immediate supervisor's name must only contain letters (A-Z), hyphens, or spaces." (At least it didn't actually impose the apparent restriction that the name must be ALL CAPS.)
- NoMoreNicksLeft 3y agoLike, human names are entirely culture-dependent, and in most cultures (including the Western Hemisphere culture) completely free-form? Even when people adhere to that norm rigorously (which they don't), it's completely unusable as a unique identifier, and is of dubious utility to disambiguate two distinct humans in many scenarios? That there's not even any real agreement on spelling (especially as, with some, it will need to be spelled in multiple alphabets)? If this stuff's not old news to you, you haven't ever worked with it. The one that will really make you want to curl up in a corner and whimper are the problems with birthdays.
- speeder 3y agoI just had an issue related to this: my name ends in "Filho" meaning son, to differentiate me from my father. I ran into some stupid company policy where I had to be identified by first and last name... Resulting in people thinking my name is "son". The I had to explain that no, son is not a name, nor a surname. It is an adjective, not a substantive, it's sole purpose is differentiate me from my father, when needed. Calling me just "son" makes no sense. I pointed out to that company that if they applied that policy to bill gates, that is names Willlam Gates III, they would end Calling him number three, and it is obvious that number three is not his name. Then there is the fact my "middle" name that matters. My first name was just to honor a famous catholic priest and is not even a valid word in my native language. Nobody calls me by my first name... unless there is some bureaucracy somewhere, then they insist on calling me by my first name, and son as my surname.
- numpad0 3y agoShouldn't your name(using Gates example) be "Gates_III" than just "III"?
- mildzebrataste 3y agoSide note to your example: Bill Gates’ nickname growing up was Tré — as in 3.
- alexpotato 3y agoReminds me of two stories/articles: 1. The "Y2Gay" problem Was a problem because databases were designed with the idea that marriage could only be between a male and a female. 2. Falsehoods developers believe about names From HN's legend: patio11 https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-...
- andsoitis 3y agoW3C has a good article about personal names around the world: https://www.w3.org/International/questions/qa-personal-names https://www.w3.org/International/questions/qa-personal-names
- alxmng 3y agoNot all cultures have a family name. Myanmar for example, has no family names. There is only a given name, which is often many words. Just store a name field, and if you need to interface with other systems with multiple name fields, ask the user to fill those fields out.
- HeavyStorm 3y agoIt took me ages to settle on how to fill in those two fields in websites. I have five names, four of which are family names. To identify me, you should have them all, but that division, first and last, have literally no meaning for me. My literal last name is a name that's so common here that I share it with the current president, a number of sportsmans and local celebrities, and probably half the people living in the same region as I. If that's what you're asking for, well, I can give it to you but I already know it's worthless.
- laserdancepony 3y agoI think it‘s all about your target audience. I‘ve never bothered with Native American or Middle Eastern Edge cases because all of my clients serve white Europeans that fit into the two name scheme 99.999%. So I won‘t go the extra mile to optimise for the 1 in 100,000. Why should I? There will be no ROI.