7 ms·
People do no have names that break computers. Programmers believe they have certain structures when they don't then his or her code fails. http://www.kalzumeu
by cdumler 11y ago
People do no have names that break computers. Programmers believe they have certain structures when they don't then his or her code fails.
http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...
- teej 11y agoFor what it's worth, programmers do not have the tools to perfectly handle the complexity of human language. It's a hard problem.
- Marazan 11y agoA free text entry field would cover almost everyone.
- lostlogin 11y agoCovering almost everyone isn't the problem, it's getting everyone in that is hard. There is a good link in that story about name assumptions. http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b.... A free text field doesn't catch everything in that list.
- macintux 11y agoExcept people without a single canonical name, or those with no names. Doesn't solve ordering. Or a few more problems from http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b... I'm sure.
- zimpenfish 11y agoWebsites that insist on forcing me to enter a first and last name always get abuse in the latter. What I call myself on websites is my business, not yours.
- jhall1468 11y agoIf at any point in the process they need to bill you for something, they have to ask for your first and last name because that's exactly what the credit card companies require. So there are use cases. Personally, I don't see why any company is asking for a name if they aren't billing you for something or they aren't a social network.
- lostlogin 11y agoI've had a Google, but can't find Zuckerbergs answer to this. Any idea?
- takno 11y agoI've never seen a credit card company ask for separate first and last names.
- jhall1468 11y agoSometimes I think Hacker News forgets the world doesn't start with LA and end with Miami. http://developer.authorize.net/api/reference/ http://developer.authorize.net/api/reference/ firstName First name associated with customer’s billing address. Required only when using a European Payment Processor.
- gnaritas 11y ago> they have to ask for your first and last name because that's exactly what the credit card companies require No they don't, they ask for a single field, name on card which is a single string containing everything on the card.
- jhall1468 11y agoSometimes I think Hacker News forgets the world doesn't start with LA and end with Miami. http://developer.authorize.net/api/reference/ http://developer.authorize.net/api/reference/ firstName First name associated with customer’s billing address. Required only when using a European Payment Processor.
- teej 11y agoA text entry field on what? A browser? A native android app? A QT interface? What language is processing the text? Java? C? JavaScript? Where is the data going, what is the transmit format, what is the data store? Answering these questions for ascii text is easier. Answering it for utf-8 is harder. Cobbling something together for a character encoding format that can handle the median human name is challenging.
- jdjb 11y agoThat, and we have bosses who don't believe us that a single string for first and last name won't work for everyone.
- pavel_lishin 11y agoConversely (or is it inversely?), I've got a coworker whose entire, full, legal name is a single word. It just shows up twice in all of our systems.
- jakub_g 11y agoWhat is his nationality, out of curiosity? Or was he born with name and surname? BTW Just found this list, pretty short. Is it common in some societies still to have just one name? https://en.m.wikipedia.org/wiki/List_of_legally_mononymous_people https://en.m.wikipedia.org/wiki/List_of_legally_mononymous_p...
- roywiggins 11y agoIndonesia's the most well-known example.
- twic 11y agoThe other famous one is Burma - U Thant, third Secretary-General of the United Nations, was actually just called Thant, but nobody could handle that in 1961, so they stuck the Burmese version of 'Mr' on the front to make something they could recognise as a name.
- pavel_lishin 11y agoI'm not sure, he works in a different office than I do. As far as I know, he's American, and I'm not sure if he had a mononym from birth, or if he changed his name.
- deleted 11y ago[deleted]
- pavel_lishin 11y agoNames are an incredibly tiny subset of human communication, and if we were having a beer at the bar, I'd take a swing at arguing that they're not part of language at all.
- lostlogin 11y agoUnfortunately they are the part of communication that we hang the whole communication on. If we identify people by any other part of the conversation we would have the same trouble I'm sure.
- lotyrin 11y agoI don't know, name systems seem to quickly betray their origin in little sentences of specificity in the languages used at the time, before they became systematized according to common western practice (if that even happened, depending on culture). John? John who? Oh, "John the Smith" with time, the is dropped - the name is carried forward despite people's profession, people post-facto come up with systems for "First" and "Last" names, but the order remains. In Japanese, grammar flows the other way, "Ken of the mountain field" is written "Yama no Ta no Ken", "Yamada Ken" because of grammar though, the surname still comes first. And the biggest one is Patronymic names that maintain the untouched grammar of specifying who you mean based on who's kid they are "Ori, Eric's daughter." = "Ori Ericsdottir", "Mateo's Luis" "Luis de Mateo", "O'Connor" "ibn `Amr" etc. etc.
- ryandrake 11y agoThere should be an entire college course dedicated to all the various "Falsehoods Programmers Believe About Xxxx" lists. I've seen so much horribly bad code that's supposed do handle times, dates, names, addresses, etc. The spec says "Store the user's name in the database" and the programmer simply allocates a string for First Name and a string for Last Name and calls it a day. What's needed is good unit tests and a corpus of test names that exercise as many edge cases as possible.
- Grishnakh 11y agoFor the database at least, I don't see why you need unit tests or any testing at all. Assuming that you're going to require at least two names (no single-name names allowed), then a string for First Name and a string for Last Name should be sufficient. If this is a decent database, where the string can have any Unicode character, including a space, and you don't set a limit on the string length (modern databases don't need this), then how can there possibly be a problem? If your database can't handle arbitrary-length Unicode strings, you have much, much bigger problems than weird people names. (And if you want to handle single-name names too, you can either just have a single "name" field, or you can allow null values for the first name.) Now, the application logic is another matter and probably should be tested. But this really shouldn't be a hard problem, and it's downright shameful that so many programmers have bungled this so badly. There really isn't that much to it: you need to have two strings (and one can be null as I said above), they need to support Unicode so you can handle accented characters or characters from non-Latin character sets (Japanese, Chinese, Cyrillic, etc.), you need to handle spaces in names, and you need to not have arbitrary length restrictions (this could be a problem in web forms, but even here you should be able to make it scroll inside the box). The only valid limitation I can see is not allowing names with backslashes (in PostgreSQL, nulls are represented in SQL dumps with "\N").
- kbenson 11y agoPerhaps you should read, or if you have read, really internalize the "Falsehoods Programmers Believe About Names" link referenced above. Here's some choice excerpts: 5. People have exactly N names, for any value of N. 11. People’s names are all mapped in Unicode code points. 18. People’s names have an order to them. Picking any ordering scheme will automatically result in consistent ordering among all systems, as long as both use the same ordering scheme for the same name. 20. People have last names, family names, or anything else which is shared by folks recognized as their relatives. 32. People’s names are assigned at birth. 33. OK, maybe not at birth, but at least pretty close to birth. 34. Alright, alright, within a year or so of birth. 35. Five years? 36. You’re kidding me, right? 40. People have names. What this really means is, depending on the application and how important the name is to you, you will have different requirements. You need to fit your schema to your needs. For some applications, the name may be important, and extra care might need be taken to reflect the user's entry as accurately as possible. For others, it may simply be a string you expect your payment processor to accept, and that's all you care about.