6 ms·
Falsehoods Programmers Believe About Names (2010)
- elanning 6y agoI believe most programmers know a lot of this stuff, they're simply not trying to build a system that captures reality perfectly. They know Prince's name was a symbol at one point, but force Prince to confirm to their system with a nickname or some other workaround, and that feels OK to me.
- TonyTrapp 6y agoI deal with so many baffling assumptions developers make on a regular basis, I can only deduce that maybe they know about it, but they didn't even bother thinking about it for a second.
- ryandrake 6y agoAnd in some cases, designs seem to deliberately not handle simple edge cases. Like, it would probably be actually easier in the code to not separate your name field into three separate ones for first, middle, and last, and track them separately, but we go out of our way to do that! I've seen text inputs that go out of their way to flag names with special characters as errors (whatever the hell "special" means anymore, in a world with unicode). Maybe it's because the underlying database requires these assumptions, but that's an excuse, not a reason.
- bbody 6y agoBefore people start posting various programmer falsehood articles, here is a compilation: https://github.com/kdeldycke/awesome-falsehood https://github.com/kdeldycke/awesome-falsehood
- Deukhoofd 6y agoDoes anyone really believe that names are unique? I have a fairly unique name, but I've seen at least 10 people with the exact same first and last name as me on LinkedIn.
- PeterisP 6y agoSome people have designed some systems that include that assumption in some places - they almost certainly don't believe that names are unique, but still act like they do. For example, I have seen a (non-online) process designed in a manner that allow anyone with a matching name to easily and even accidentally gain access to the other persons' goods - e.g. you come to fetch your order, show ID that you're "John Smith", and get given all the currently outstanding stuff that's ordered by a John Smith, because the system is designed so that the employee searches by name, and the system provides a list of all the items that should be handed out without sufficient information to verify anything else.
- mjevans 6y agoThat system more strongly depends on the (3 + 0.5) 4th dimensional interaction and people generally being honest enough; as well as the hopefully implicit secret of who's orders are in the system. Though with all the food delivery stuff these days, it wouldn't surprise me for some rando to walk in, grab a reasonable looking number of bags from the output rack, and just walk right out the door. Particularly if they've got the confidence to not look guilty while doing it.
- PeterisP 6y agoThe impact scenario was that a person with a common name comes for their order, gets given a bag/box with stuff, and that box contains both their items and the items from someone else with the same name - i.e. the process (and the supporting IT system) simply couldn't organize separate pickups for two different John Smiths on the same day.
- mjevans 6y agoThat's just a poorly designed system. The proper natural key is an order number (possibly an alias to an internal ID that isn't shared, like a GUID). The failure mode without blame might be a pickup which contains both orders, in distinct bags. I think most places staple a receipt to the outside of the bag, so that should make this even less likely.
- wodenokoto 6y agoI wish these things came with examples. I'd love to hear more about how a culture that doesn't name children under 5, do their child rearing and generally go about their life. Also, who registers to a website, but doesn't have a name? At some point you need to choose an identifier if you want to interact with other people or their services, and you might even need to conform your identifier to something that someone can comprehend and reproduce. And at that point most of these falsehoods disappears. Illegal characters? Yes, you can't write your name as じゃわØÆÅ?+ on your boarding pass. No, your name on your boarding pass won't match your name in your passport, because the name in your passport conforms to whatever writing system in use in the country of your passport and the boarding pass accepts only ASCII letters. And airports still runs 24/7.
- justAnIdea 6y agoYep. This article is kinda pretentious to be honest. Most people writing software know these, they just ignore (or work around) some of them due to the complexity of implementing them (cost/benefit doesn't make sense here).
- m_mueller 6y agoThat being said, I’d at least expect airlines from countries with latin alphabet to support extended latin charsets. Not doing so just complicates things. My name is Müller. This can be translated to basic latin as Mueller (which e.g. is my passport). No English speaker gets that, thus most systems just replace ü -> u, and create confusion in the process as then the name does not match the passport anymore. And that’s just German, probably the closest language to English. I can’t even imagine the troubles of Vietnamese people, whose language got romanized by a Frenchman, to spell their names so that American programmed systems don’t trip up. A little more flexibility in thinking about languages would do American tech companies good IMO.
- dathinab 6y ago> Illegal characters? Except that in some cultures names with illegal characters (depending on what you see as illegal) are on your passport. And some other cultures might not have passports. The simplest reason is that not all names can be mapped to unicode. Which for a lot of software don't matter as supporting non-unicode names is not worth it. But if you are a government or some system used by one, or some other institution where you can't just randomly turn down some people from being registered in your computer system this is a potential problem. Lastly there are systems which can contain fictive or historic names so じゃわØÆÅ?+ might very well be a name. The only sane way to handle names is to handle them as opaque blobs which you display and maybe do a (fuzzy) search on but not much more. Never _ever_ use names as any form of identificators in _any_ computer systems as they are both highly imprecise, unstable in time, unstable in context and unstable in interpretation. (E.g. the same glyph sequences might be the same name or not depending on some historic context specific to the person using the name including weather or not the name is used in a way where it is "imported" into a culture, how people might have moved between cultural context in their live time and the live time of their ancestors and other factors. This is so extremely specific to the person using the name that there is absolutely no way to handle this (besides asking the person in question)).
- justAnIdea 6y agoI mean, some of these depend on where you live. Some egomaniac in the USA probably can stick a number in their kid's name (I'm guessing that's going to depend on the state? Even Musk wasn't allowed to use numbers.), but generally it's not something that's allowed. At least not in the EU.
- masklinn 6y ago> I mean, some of these depend on where you live. Where you live doesn't matter though, the constraint is where your users (or your data) lives. If you're writing software which works exclusively for a single culture / country e.g. that country's tax return software, then it might be fine to take a much more prescriptive approach to the issue under the assumption that the user's information will match the requirements & limitations of the wider system. But even then it's risky: > but generally it's not something that's allowed. At least not in the EU. what happens if the kid decides to move to the EU, do their have to change their name? Or use a transcription? Also Musk couldn't actually name his kid "X Æ A-12" because that's not legal under CA law (neither 12 nor Æ are part of the english alphabet). Kid ended up named X AE A-XII Musk ("AE A-XII" being their middle name).
- Yeri 6y agoI think the point here is that many systems are built with a western viewpoint on naming (John Smith), as opposed to naming in other (Asian, African) culture. "Mohamed bin Ali" literally means "Mohamed son of Ali". Ali is not their name, it's their fathers. Ali is not their last name. Indonesians (and others) commonly only have one name (ie "Sukarno"). This is neither a first nor last/family name. It's their only name. Imaging booking a plane ticket or filling in any form.... The list goes on with examples.
- raverbashing 6y agoWhat I always find curious is that by the time the computing systems came online, the US had a substantial amount of their population with names "a bit different" and had to deal with at least composite last names and apostrophes and nobody noticed they would break?
- Someone 6y agoThe first computer systems used character sets that didn’t allow for the difference between upper and lowercase letters, let alone for such things as apostrophes. https://en.wikipedia.org/wiki/BCD_(character_encoding)#Examples_of_BCD_codes https://en.wikipedia.org/wiki/BCD_(character_encoding)#Examp... shows the IBM 1401 (from 1959) supported apostrophes, but according to the accompanying text it was “not printable” and there was considerable variation in how the other code values were depicted in practice.” Memory was expensive, so you even had things like DEC Squoze (http://rabbit.eng.miami.edu/info/decchars.html http://rabbit.eng.miami.edu/info/decchars.html): “DEC Squoze was a 40-character code, containing only letters, digits, and a couple of other bonus characters. Strings in Squoze are computed base-40, which means that a 6 character string would only occupy 32 bits. That meant that in the standard 36 bit memory word, there would be enough space for a 6 character file name together with four bits of flags or other information”
- jasode 6y agoSo is there a best-practice reference data schema example that handles all the problems in this list? Is there a XML/JSON/RFC specification that handles all names in the world and 100% of every edge-case? Clearly, a database table with only the fields first_name, middle_name, last_name is not enough. So what does a perfect reference data schema look like? Add to that the reference examples of GUI frontends for those data schemas. Imo, the above would be much more useful because one could copy&paste the best design as into MySql/SQLite/etc as concrete engineering instead wondering what to do about a long list of abstract bullets saying "you're doing it wrong". EDIT to reply: >A generic "Name" field that takes some sequence of Unicode characters. There is no major company that handles millions/billions of customer names that uses a single name string field. E.g. Not Netflix/Amazon/Google/Facebook and various government websites. You may also need the component parts of name (firstname, lastname) in APIs to verify credit cards. You can't reliably parse a single name field for its component parts because an American would put John Smith but an Chinese person could put Zedong Mao or Mao Zedong. But wait! You're still doing it wrong because "Zedong" in ASCII is an imperfect transliteration of the original Chinese characters which should use full Unicode. Ok I get you... but I still have a credit-card to process: https://stackoverflow.com/questions/2004532/credit-card-validation-can-card-name-contain-non-ascii-characters/2005287 https://stackoverflow.com/questions/2004532/credit-card-vali...
- sbierwagen 6y ago>So what does a perfect reference data schema look like? A generic "Name" field that takes some sequence of Unicode characters. A separate, optional, "short name" field if you really want the system to address the user in a colloquial manner. But why bother?
- Ekaros 6y agoI feel like even this might break down. As I do use different name for invoicing and name I generally communicate out. And even with invoicing depending do I use my credit card or not... Ofc, you probably should separate the payment details from those you communicate and identify people with.
- glandium 6y agoI got a variant of 39 just today, but it's very frequent in Japan: the field for the name required at most 16 full-width characters. Standard Latin characters are rejected because they're half-width. If you really want Latin characters, you have to go with characters in the range U+FF21 to U+FF5A, although in many cases, they are rejected, and you have to go with katakana. Which is also asked for separately.
- sleavey 6y agoMost programs ask for first and last names because they need to know both (a) the subject's full, hopefully unique* name and (b) the first name for informal greetings (the "Howdy, Bob!" when you log in, or "Dear Bob" at the start of an automatic email). Can't this be solved for 99% of cases by switching from first/last name to asking for a subject's preferred full form name (which would be a string field which can contain arbitrary characters with some huge length limit) and a nickname (where users can write whatever they want the system to use in informal contexts)? *But any system using peoples' names as unique identifiers are in for a world of pain.
- jameshush 6y agoCome visit me in Taiwan, where everyone’s “first” name is what Westerns would call a “last” name. Also, what do you mean by nickname? The 2nd character of my Chinese name? My English name? Which English name? James or Jamie? :) If our job was easy we wouldn’t be paid so well.
- sleavey 6y agoThat's up to you - my point was that you can choose whatever you like for the name you want to be greeted informally with.
- mkl95 6y agoI recently had a minor scare with my ISP after they started to send me the invoices of another customer with the same name and surname. My guess is some employee or system had looked the other guy up using insufficient data to uniquely identify him (something like name and surname) and my record had popped up first. This employee or system assumed they did not have to dig any deeper. Fortunately, I quickly had it fixed, and my issues were limited to receiving someone elses invoice, which included a lot of personal data. After I told one of my technical friends, he was surprised that there is another guy with the same name and surname. In fact, there are dozens of people with the same name and surname, and one of them is a local celebrity.
- PeterisP 6y agoContrary to the many other "falsehoods programmers believe" articles, this has a strong caveat about domain restrictions. (What I'm saying is probably an instance of #29, "Confound your cultural relativism! People in my society, at least, agree on one commonly accepted standard for names.") E.g. if I'm writing tax software for a particular country, it is plausible to rely on an assumption that people have exactly one canonical full name (#1) in a specific format of names (#5) written in a specific character set (#10), because the names have to match a particular single source of truth (gov't registry), and the criteria for names in that registry is mandated by law. Yes, people coming from other countries (#24,25,26,27) may have different naming schemes, however, the same law prescribes how the names of the different languages shall be mangled to fit in the single commonly accepted standard, and that (mangled) version is legally mandated as de facto canonical name in all the related systems. That does come with the caveat of #38 "Two different systems containing data about the same person will use the same name for that person" and #2 "People have exactly one full name which they go by" as that person may use some other name in common life and other documents. So my point is that names are essentially an arbitrary social/legal construct that can be (and often are!) made to fit arbitrary restrictions.
- faeyanpiraat 6y agoIsn there a business opportunity here? There are services which handle international tax calculations for software billing. They are up to date about every tax rules in every country. Wouldn’t it be possible to have an universal embeddable name input widget based on the same principle?
- YouMeWeThem 6y agoThe unfortunate thing in Japan, where I (as well as the author, I believe) reside, is that the government decided to cop out on documentation for foreign residents. Every foreign resident is required to carry an official residence card, which is printed with your name exactly as it appears on your passport. You may think "aren't names in passports written with Latin characters?", and you may also be thinking "isn't the official language of Japan written with non-Latin characters?" Yes, to both. So basically foreign residents don't have an official Japanese transliteration of their name by default. This is a problem because almost all systems in Japan are made with Japanese people in mind. If you have a middle name then you're basically guaranteed to run into an issue at some point where an application requires your name to match your ID exactly, but the internal system only accepts an input of up to (for example) 16 characters.
- deleted 6y ago[deleted]
- KozmoNau7 6y agoExpand it to "everything you think you know about names and addresses is wrong". The streetname plus house number plus an optional letter plus an optional floor and side/number, plus postal code and town/city/district makes sense in a lot of the western world, but can break down very badly when trying to handle international addresses. Take down the phone number and email address in separate fields, their formats are at least reasonably constrained. For name and address, put a text box, and let people add as their name and address in the format that makes sense to them. If you need to send them anything physical, the various postal services around the world are really good at figuring out the right destinations for letters and packages.
- guytv 6y agoReminds me of that time, 30 years ago, that me and a friend were on a trip to Italy, and wanted to send a postcard to our friend back in Jerusalem. We did not have her exact street address, so we just wrote a postcard address to : "<her full name> building is opposite of the Menora garden". Postcard was delivered to her.
- mjevans 6y agoContext matters, both for the designer and the user. If a shipping address is desired, ask for one with name. Give the user a textbox entry field. It is OK to reduce a round-trip with client side checks for length and line count, etc; the server MUST perform final validation for correctness and MUST also indicate success or why failure. It is OK to ask the user for variations of their name for different contexts. How it should be displayed for legal reasons, how they'd prefer to see it, if there's a short name of any kind they'd like used for less formal settings. Please try to accommodate any valid form of input. Some users have touch-screen devices (mobile, tablet). Some have keyboard and mice, or speech dictation, braille (spelling?) or possibly devices you've never heard of before. Don't just default to dropdown boxes and sliders when alternatives like specified input type. https://html.spec.whatwg.org/multipage/input.html#the-min-and-max-attributes https://html.spec.whatwg.org/multipage/input.html#the-min-an... The client software should provide the end user the best suited widget for the requested type.
- notamy 6y agoAnother falsehood programmers believe about names: Nobody will ever have a last name of "Null." Mine is, and I find myself sending emails pretty frequently about people's code breaking on it.
- rkachowski 6y agowhat non unicode names are out there? does this exist outside of artistic statements?
- kuharich 6y agoPast comments: https://news.ycombinator.com/item?id=21492464 https://news.ycombinator.com/item?id=21492464
- Normal_gaussian 6y agoI wrote what I believe is my best piece of name handling last year. It had three fields legal_name, interpersonal_name, alias. When the user was signing up, they were prompted with three questions: --- Your legal name that must appear on documents such as invoices and contracts: <signed xxx> The alias you would like us to use in our interface and emails, that only you see: <hi xxx> The name we should show other people when referring to you in our interface: <request from xxx> --- The page had live examples alongside, and checkboxes for 'as above'. I was worried I had overcomplicated it, but a lot of my early feedback called out that they liked it without prompting. It is worth saying the system is never expected to scale past a few thousand users, these users are professionally motivated and pay or get paid for the service - as such I could say "anything goes" in the content of the fields without abuse being likely. Conflicting names are discovered through distance measurements and flagged up to an admin to determine whether they should be resolved.
- josefx 6y ago> Your legal name that must appear on documents such as invoices and contracts I know someone who trips that one every once in a while. Born in the Netherlands and took her partners last name when she married in a different country. Apparently the issue is Netherlands requires that all official paperwork uses the birth name, while the country she currently lives in considers her choice to adopt her partners last name legally binding and neither country will budge on it.
- trashtester 6y agoI teach my children: "Nothing that is real is perfect and nothing that is perfect is real." Then I do Plato's Allegory of the Cave to explain Realism vs Idealism. IT systems exist to be practical, so "good enough for a given purpose" is sufficient, they do not need to perfectly caputure every aspect of reality. For the same reason, it does not make sense to expect "Data Quality" of any IT system to be perfect or even "good enough" when you the data is transferred to another system (or is to be used for a different purpose) where other aspects of the data determine if the data is "good enough". This even applies to the metadata. Ontology and Semantics will depend on what the purpose of an IT system is, as well as what data is available. If the same data is to be used for another purpose, you may need to apply different metadata to it.
- You-Are-Right 6y agoPlease post solutions.
- 4ggr0 6y agoFinally an issue I can talk about :) Let me just tell you that the 'ë' in my name gets labeled as an invalid character pretty frequently. Europeans seem to handle that problem way better than USians, which makes sense considering how many languages are spoken in Europe.
- zelphirkalt 6y agoSome of the falsehoods, if they are such, do not change how systems are used. For example: > 9. People’s names are written in ASCII. I am well aware of that. However, there is usually a transcription to ASCII characters and using modern programming languages, which mostly deal with utf8, you do not exclude non-ASCII characters by default anyway. In languages I use I would have to take extra steps to limit strings to only ASCII characters. There might sometimes be some implementation bug in the programming language's string handling itself. I have encountered one case like that so far. Also I have a question: What is the difference between a "canonical full name" and a "full name"? (I get that people could have multiple names.) Aside from that, it will in many cases not matter, whether a person has multiple names. For example most things that have a login, usually let people register. When they register, they can make a choice of which name to choose as a handle on that system. It is sufficient, if they themselves are aware of their other names and associate themselves with the handle they have chosen for that system. Of course there are other systems like lets say some software for a register of inhabitants of a city. Those systems are hopefully designed with the applying edge cases in mind.
- AndriyKunitsyn 6y agoThis article is bad, because it is not actionable. So the author has met all of these corner cases about human names and encrypted them as “ha-ha, bet you didn’t know THIS could happen!” riddles? Cool, but I’m not interested in riddles, I’m interested in examples of corner cases, so I could determine whether they actually apply to my work. Thanks to all HN people in the comments that provided examples.
- dang 6y agoLooks like the major previous threads are these: Falsehoods Programmers Believe About Names (2010) - https://news.ycombinator.com/item?id=21492464 https://news.ycombinator.com/item?id=21492464 - Nov 2019 (142 comments) Falsehoods Programmers Believe About Names – With Examples - https://news.ycombinator.com/item?id=18567548 https://news.ycombinator.com/item?id=18567548 - Nov 2018 (169 comments) Falsehoods Programmers Believe About Names (2010) - https://news.ycombinator.com/item?id=12450825 https://news.ycombinator.com/item?id=12450825 - Sept 2016 (43 comments) Falsehoods Programmers Believe About Names - https://news.ycombinator.com/item?id=10255610 https://news.ycombinator.com/item?id=10255610 - Sept 2015 (13 comments) Falsehoods Programmers Believe About Names - https://news.ycombinator.com/item?id=1438472 https://news.ycombinator.com/item?id=1438472 - June 2010 (138 comments)