One of the applications I work on has a long history of problems handling data for people with the last name Null. I've given feedback on these bugs and make several recommendations for fixing them, but the folks who work on the application framework just...don't care? I don't know. They certainly don't design with exceptions in mind.
That's such an alien way of thinking to me. I was taught that 80% of your work is spent handling 20% of the data. Is there something cultural that prevents other programmers from working in exceptions-first mode?
Maybe it's just with boring business logic. I've heard that the most robust networking applications are written assuming constant worst-case failure states. Anyone have any insight into this phenomenon? I get that there are practical limits to what you can plan for, but if you're accepting string input, shouldn't you at least be prepared for apostrophes?
I have a one word name. I was recently pulled over for speeding. When I called the court, the ticket had already been dismissed. Because the officer hadn't properly filled out the ticket; he had copied my (one) name from my DL.
So, don't fix that particular system, thanks very much.
I had a strange experience where my cable company's mobile app, which streams most channels, was missing audio on a few channels. After escalating the issue to an engineer, he finally got back to us and told us that if a username contained "ts" like mine did this issue would happen. After making a second username without that combination, all worked fine. I'd still like to know what logic in their application would get stumped by these two letters.
I think I may be turning into a machine myself, because I had to google "cowboy code" thinking it's probably something from the Jargon File. Like, an apocryphal list of error codes and things, hidden in some obscure part of a posix filesystem etc.
In the context of acoustics, "ts" almost always means time-step (inverse of frequency). But I don't have the faintest idea of how it would collide with the username string :|
One of the reasons I've always been leery of regex. Especially since everyone I've seen using them tends to blindly copy an example from elsewhere and then bats at it until the test case passes.
In the context of video streaming, ts probably stands for "Transport Stream" [1] and nothrabannosir's idea of the bug is probably very close to correct. What's both hilarious and sad is that someone on HN without access to the source code, debugging environment and internal QA tools probably root caused the bug, whereas the cable company's developers let it get all the way into production.
In addition to the obligatory little Bobby Tables, this blog post describing the falsehoods programmers believe about names is informative and a must-read for anyone dealing with names in software:
Air Canada and several other airlines have for several years been unable to read my passport on the automated check in because I have a suffix in my name (II). I am told that "this happens with everyone who has a suffix", which just boggles my mind.
I have the same situation, though my suffix is less common. My strategy is to drop the suffix when purchasing a ticket, which has mixed results. Some airlines (United) remove the space between my last name and suffix when I do have to use it (International flights) which caused me some angst until I figured it out.
I realize that the issue of names is complicated when you consider different practices the world over, but is there not some kind of RFC or other specification that people are supposed to follow? How can that be in 2016?
The first job I took in IT, after graduating with a liberal arts degree, was in software testing for a company that made point-of-sale systems. Only a month or two out of training I was given the task to test a name and address form. Knowing that quotes were special characters in databases, I tried entering something like O'Connell as a last name. Sure enough, the system broke. I remember filing a snarky bug report about how Irish and Arab people ought to be able to use the form.
My point is that testing for quotes and "Null" as a surname isn't some kind of esoteric science. What's wrong with people!
It's a way to mitigate sql injection attacks when you don't want to pay for a rewrite of the data layer to not communicate with the database by blindly mashing strings together.
And don't get me started if your name can't be written in US-ASCII, i.e. if it has weird squiggles above or below the characters or if it's written in gasp cyrillic.
By deed poll or just by filling in the form differently? The idea of having to fill in the "have you ever been known by another name" section on forms just looks like a world of pain.
An alternative which is truer to the original would be to use Ó. It means 'grandson of'. But perhaps the other part should also be "deanglicized", giving either Ó Caoimh or Ó Cuív.
If these services are evaluating the string in the text field such that it results in the value Null rather than the string "Null" it is concerning. The usibility my be compromised for users with these surnames but I wonder if the security is also compromised via code injection through these fields.
In Programming Pearls, Jon Bentley mentions the story of an application, written in APL that bombed when it got to Ecuadorean data. Somebody figured out that it read the name "Quito" and processed it as "Quit".
Websites 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.
If 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.
That would require the user information to exactly match the credit card information - which is dumb because it blocks a whole swathe of use cases (multiple payment methods, different person paying, paying by Paypal, paying by Apple Pay, etc.)
A 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.
The 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.
I'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.
Names 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.
Unfortunately 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.
I 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.
There 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.
For 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").
Perhaps 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.
I already addressed many of these by just advising to have arbitary-length strings (and maybe just a single one). That takes care of #5, #11, and #20. I don't see how #32 - 36 are even relevant: your system should just take whatever name they give you. How long they've had the name is irrelevant (as long as you have a mechanism to change it).
#40: Sorry, but how can you not have a name? Good luck getting an ID document without a name. That doesn't make sense.
#11: This just sounds dumb: Unicode has thousands upon thousands of characters. Only with Chinese can I see this possibly being a problem, but even here I thought Unicode did account for that. Unicode was designed to have every conceivable glyph that every language on Earth uses.
> Sorry, but how can you not have a name? Good luck getting an ID document without a name. That doesn't make sense.
That's what 32-36 are referring to, cases where children aren't given a name for an extended period of time. Even without extreme cases. what about a Hospital system meant to be used to track newborn children? It's necessarily not going to be able to rely on a name, because it's not uncommon for children not to be named for a few days. A system such as that might want to track the children by the mother, date of birth, and birth ordering (in case of twins, triplets, etc).
> This just sounds dumb: Unicode has thousands upon thousands of characters. Only with Chinese can I see this possibly being a problem, but even here I thought Unicode did account for that. Unicode was designed to have every conceivable glyph that every language on Earth uses.
Just because it was designed to accommodate every conceivable symbol, doesn't mean it currently has every conceivable symbol. What about the symbol Prince used for his name[1]? What about a language that's not in Unicode yet?
> There really isn't that much to it: you need to have two strings (and one can be null as I said above)
If someone has a single name, does it go in the first name, or second name spot? Is this enforced, and where?
It's not that you won't generally be served well by your suggestions, it's just that the problem space is complex enough that it's worth thinking about a little before falling back on that. It might be that you don't even need a name, or only need it for billing, and your requirements may change depending on what payment processors expect (is it okay to just save a single string for whatever full name they submit?) These are all worth giving a little thought to up front, because changing the schema after it's in use is always harder, and that goes both ways, Splitting a string into multiple name parts is hard for many of the same reasons listed here.
You don't need to support that. You don't need to cover every single edge case, and that certainly includes people who make up some crazy symbol to be their "name". I'm quite sure Prince didn't file his taxes to the IRS using that symbol, in fact, according to Wikipedia, "1993 also marked the year in which Prince changed his stage name to Prince logo.svg, which was explained as a combination of the symbols for male () and female ()." So that wasn't even his name at all! That was just a stage name. If you're making a system for anything official at all, then you don't have to worry about silly stuff like that.
(On the other hand, if you're making a system for artists which has a field for stage name, then you're going to have to figure out a solution to this one. As you can see with Wikipedia, their solution was to use a SVG file of the symbol and insert that into the text as necessary.)
>What about a language that's not in Unicode yet?
This again probably depends on exactly what your application is. If it's a US government database, then you don't need to worry about stuff like that, because they're not going to care about people using some obscure language that isn't covered by Unicode. Is there even such a language? I doubt it, not any that are in actual use.
Don't forget, just about every language has been Latinized now, so you can always fall back to Latinized characters.
>If someone has a single name, does it go in the first name, or second name spot? Is this enforced, and where?
Irrelevant. Do it however you want, it really doesn't matter.
Now again, as I mentioned before, a lot of this depends on exactly what your application is, so it's pretty hard to come up with any ideas or rules without knowing this. Are you making a database for US government use? Or something for shippers to ship packages around the world? And from what country? Something for payment processors? Based out of what country? Something for the Chinese government? The requirements will change depending on the answers.
If the government forms require a first name and a last name, for instance, and that's the law, and you only have one name, then you have to get yourself a second name. If you have a Chinese name and this is for a US government form, then most likely you have to use a Latinized version of your name. The possibilities are endless.
> If it's a US government database, then you don't need to worry about stuff like that, because they're not going to care about people using some obscure language that isn't covered by Unicode.
Why, because immigration isn't tracked in US government databases? Liaisons in other countries aren't tracked in US government databases?
> Is there even such a language? I doubt it, not any that are in actual use.
A simple google search shows that yes, there are[1]. They may not be common, but you know where uncommonly used languages see use? In names, from people trying to preserve their heritage.
> Now again, as I mentioned before, a lot of this depends on exactly what your application is
Actually, you're saying that now. I've been saying it from the beginning. Actually, that was the point of my first comment, and the point of my second comment, and the point of this comment. You said "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." and I was trying to point out that even if we accept the assumption that you need to require at least two names, there are cases where depending on your purpose you should really examine what you really need an build your schema around that, not some simple rule summarized as two database fields of unlimited length Unicode text.
I said this explicitly in the first comment with "What this really means is, depending on the application and how important the name is to you, you will have different requirements."
The entire last paragraph of my second comment was about this.
> so it's pretty hard to come up with any ideas or rules without knowing this.
Which is my point, and the point of the linked post about names. You need to know your problem domain, and the data you are expected to encounter. It's also not what you stated in your original comment. I'll just assume you were being a bit overly assertive initially, and it's not really the entirety of your stance, because you're making the opposite argument now. We've wasted a lot of time when you could have just said, "Yeah, if name fidelity is important, know your expected data and make plans for special cases if it's important." Which, again, is exactly what I said in my second comment.
Your comment is a perfect example of the kind of incomplete and normative reasoning about names that causes systems to fail. The problem isn't that you're not careful, the problem is that your fundamental assumptions are based on incomplete knowledge.
For instance, you mentioned accommodating Cyrillic letters, but you didn't know you'd need to include a field for patronym, which is not the same thing as a middle name and can't just be included in the first name field without causing potential problems.
No, I addressed this. It's really simple: you don't need fields for different names!! Just have a single field: "name". That's it. People can put whatever name they want there, using any character set. If they want a "patronym", whatever the hell that is, no problem, just stick it in there! If they want a suffix like a bunch of Southerners here in America insist on for some archaic reason (like "Jimmy Bob Dalton III" or "Joe Smith Jr."), no problem, just put it there.
For mailing addresses, this is all you need. Postal organizations do NOT care about your name, they just want your address and some kind of name as a check in case there's a delivery problem (or there's been a forwarding address filed for a particular name). Payment processors may need something more defined, but those are frequently more standardized by country, but usually, at least here in the US, all they care about is "enter your name as it's written on the card here...". They don't care about your actual name, they just want to match the string you enter with the string the credit card has.
And if we're being picky, name: 艾未未, and oops, there goes my other idea that I can at least use the spaces between words to figure out what's going on... ;)
> 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.
Not even close; you're already off the rails with assumptions that break for tons of names. There's an easy way to do names decently, ask the user for their full name all in one field, and ask them for a nickname for use with the app and email and such. If you try to break their name down into parts, you're doing it wrong; names are not normally structured data, they're just unstructured free text.
Isaac Asimov had a series of short stories written in the form of conversations between the writer and a friend named George. George claims to have discovered how to summon a demon, and the conversations are about that demon. The demon is not allowed to directly help George, but he will do favors for George's friends.
These favors invariably do not turn out good for the friend. Each story is basically George telling the author the tale of one of these favors, and the writer trying to make sure George does not ask the demon to do any favors for the writer.
Anyway, in one of the stories George had a friend who wants to be able to do something to have a big positive impact on the world. George told the demon about this, and the demon said he'd help.
The next time George encountered that friend, the friend told George that he had been having all kinds of problems with computers. He'd go into his bank to cash a check, and when he'd get to the teller their computer would stop working. And it wasn't just the bank...anyone he encountered who was using a computer would find that their computer crashed when the friend came near. His mere presence seemed to be enough to crash computers.
This was, of course, making the friend's life miserable, and this was in the 1980s. If it kept happening it would get even worse, as computers were clearly going to become more and more common in everyday life.
George found out from the demon what had happened. The demon had indeed (irreversibly) made it so that computers could not work when the friend was near, in order to grant the wish to make a big positive impact. The demon says that when the friend is an old man humanity will be enslaved by an uprising of intelligent computers, and the friend will be the weapon that humanity will use to defeat the computers and regain freedom.
This story is great, I want to checkout the author now! The demon seems less of an actual evil being and more as a person who gets excited about awesome stories, uses ying yang guide the vine of destiny. Maybe half expecting a smile only to see horror. I know this is now the best place for poetry, but this story was very fun to read
This is not Asimov's usual style. The book you should be looking for is "Azazel", later re-packaged as "Magic". It's never establishes that Azazel is a demon. The book vacillates between "demon" and "technologically advanced extraterrestrial being".
I realize you're probably being sarcastic, but I've heard people claim that in all seriousness, so just for the record: that is definitely not true, and I can't imagine anyone thinking it was true unless they were completely ignorant of the myths and stories that both Wagner and Tolkien drew from. (Much like the folks who claim Star Wars is a ripoff of Kurosawa's The Hidden Fortress, which shows ignorance of the dozens of other classic films that Lucas quite openly referenced and homaged.) It's like claiming that Sonic the Hedgehog is a ripoff of Super Mario Bros.
I think the latter is fairly reasonable. They may have invented it, but at this point it has been done an awful lot, and someone could be forgiven for being sick of it.
Shakespeare's writing OTOH is still outstanding even if the stories are cliche (and they were cliche at the time as well)
There's a lot to check out. And it's all well worth your time to check out his fiction, non fiction, AND biography. And he's an interesting character, a bit odd, but not offensive like some authors can get.
Trivia time: Issac Asimov published books in 9 of the 10 major categories of the dewy decimal system.
Personal note: I grew up reading his non fiction articles in the Fantasy and Science Fiction magazine back in the 80's.
What a wonderful story! The friend in the story began to remind me of the character Emmet from The Lego Movie: an oddball whose quirks ultimately make him a hero.
A two-centimeter demon named Azazel
Has magical powers that dazzle.
But those who would strive
To get them derive
Nothing much and are beat to a frazzle.
My favourite "real world fails to fit the model we've come up with" is Carmel-by-the-Sea, which has many streets that have no addresses:
"To this day, there are still no addresses, parking meters or street lights, and no sidewalks outside of Carmel's downtown commercial area. Those seeking directions receive hints such as “fifth house on the east side of Torres Street, green trim, driftwood fence” or by the legendary names adorning most houses, such as “Hansel” or “Sea Urchin.”"
> My favourite "real world fails to fit the model we've come up with" is Carmel-by-the-Sea, which has many streets that have no addresses
You might be surprised to learn that in India, all addresses are more or less like this. This is due to the fact that we never ended up with the standardised street numbers and names that a lot of other countries have, and road naming is a highly political thing in India, so a lot of people call roads by colloquial names.
A typical address in India goes
- House / Building Name (a lot of bungalows in India have names)
- Locality
- Near [Landmark]
- Possibly another Landmark
- Road Name
- City Name
- Post Code
- State Name
- India
Quite a bit of the Arab world is like this too. Some colleagues of mine were working with a Middle Eastern courier firm recently, and it's quite a headache.
I have a first name composed of two names, and one of them with an acute accent. This is enough to cause some of my credit cards to be printed with a repeated name because they assume my "second first name" to be a middle name too. The acute accent results in encoding problems once in a while.
But nothing compares the problems that people with names longer than 30 characters have to face. Creating a SSN card, or driver license, or pretty much any official document can be very painful. The name does fit in their systems and the attendants just don't know what to do and most of them are very reluctant in using abbreviations.
And if you are naming kids and want to save them a lot of bureaucracy in their lives, give them short names.
I think it depends. Sometimes it's helpful to give them names that are just long enough to make their identities unique, so when they apply for police clearances, for example, they are not mistaken for similarly-named people with criminal records, or even nasty reputations.
I suspect the worst case is when you have a name that is neither common nor unique that you share with someone who is notorious in some manner. I used to know someone who lived in the same city and shared a name with someone who was in the news for some unsavory activity related to a local sports team. He literally had death threat voicemails left on his phone.
A family member of mine shares a name with a fairly notorious con artist in the SoCal area, who has been convicted multiple times for a series of increasingly big, elaborate, and bizarre frauds. Their names are just unique enough that many people assume my family member is the criminal. Fortunately, the felon was put away for 30+ years recently, so we hope he won't continue to make local headlines.
LOL. People have definitely tried to call the cops on him before. The con artist's picture has rarely been printed, and nobody in the general public knows what he looks like. They only know his name. So that used to make the mistaken-identity issues even worse.
Several years ago, my then-current girlfriend and I spent a couple days a week at a casino about an hour and a half away.
One day, both my girlfriend and my mother started receiving weird messages from people, saying they hoped I would be okay, that they were "praying" for me (ugh), etc.
The mystery was solved later that day when I received a Google alert for my name and discovered a news article where someone with the same name had been at a different casino, won a large sum of money, and was later beaten and left for dead (fortunately, he survived and recovered).
Have a friend with two names, one of which is two words. That one fails all kind of checks on its own, but it gets worse: many places ask for the local equivalent of the ssn which has a part derived from the name. So if he omits the name, sanity checks on that field will fail.
I'm reminded of Scott Adams (of Dilbert fame)'s anecdote about being "blessed with a name that is mercifully short and simple":
"After a long flight I've already got my car, got to the hotel, checked in, and am fast asleep. Boutros Boutros-Ghali (Secretary General of the UN) is still stuck at the car rental counter at the airport patiently explaining his name to the befuddled clerk."
(Although admittedly, whilst I understand the humor intended, I could also see this anecdote as being perhaps a little offensive, too...)
That list makes me very sad. Not because it's not interesting, which it is, but because it'd be so much more interesting if it discussed each item as it went.
This one, for example:
People’s names are assigned at birth.
OK, maybe not at birth, but at least pretty close to birth.
Alright, alright, within a year or so of birth.
Five years?
You’re kidding me, right?
Don't leave me there! Tell me which culture assigns names more than five years after birth!
>Tell me which culture assigns names more than five years after birth!
In the United States of America it is common for females to change their name at marriage, substituting their birth surname for that of their husband.
Also, in many tribal cultures the definitive name is not assigned until an adulthood rite of passage has been passed.
Adult names also change to reflect upgrades in social status such as the completion of a PhD, admittance into a society, acquisition of nobility titles, etc.
I knew someone, an American, whose wife was (I believe) Chinese and they did not give their baby a name for one year. They lived in California where it was legally required to assign the name in the first year, I'm not certain if they would have waited longer, or not, if they would have been allowed.
It's rare, but in cases of amnesia grown adults with no memory of their identity would have a name assigned to them sometime after receiving medical attention.
> And if you are naming kids and want to save them a lot of bureaucracy in their lives, give them short names.
This is not just a computing issue; my parents come from different continents, my wife from another and we live in yet another. Finding a name for our child that could be pronounced by all the various relatives was very hard -- we found a single phoneme name and went with that.
Our hyphenated family name is essentially unpronounceable and unspellable to most people.
I have a coworker whose last name is Corp. He was unable to create a Google+ account for a couple years and had a bit of difficulty with his Facebook account because they assumed he was a business.
I received a Dutch surname as a second middle name. I can never use it -- the "Van" alone is enough to break things. But even without "Van", having two middle names usually does not compute. I've seen people who lack middle names entirely have the opposite problem and insert the middle initial "X" just to satisfy the system.
Now that I think about it, in a large chunk of the Slavic world (Russia, Ukraine, Belarus etc), the majority of people probably have no middle name. A patronymic isn't really a middle name as such.
Isn't this problem mostly solved by type casting? I've never encountered a problem where 'Null' and Null were the same thing. Is it just shoddy code that runs everything through an eval or lambda?
The official way to transcribe the Danish letter ø into English is OE,and if you scan my passport the ø part of my name will show up as OE, but nobody knows this and the transcription is not clearly visible when looking at the passport.
So what should I write when I order a plane ticket? Write an O that the agents looking at my passport expects or the OE that matches what the computer reads?
It doesn't even have to be an "edge case", as stated in the article. My first name has a single accented vowel and breaks tons of online forms.
What annoys me is not so much having to re-enter my name with the unaccented version of the vowel, it's when the form throws up an error message saying "Enter a Valid Name" [or suchlike]. I find that insulting.
At least make your error text put the blame where it belongs: "Sorry. This form can only handle ASCII Text". Don't insult your users by telling them their name isn't real.
These kinds of limitations are fascinating because they reveal the cultural biases (and I don't mean bias in the negative sense) of their creators. A Western, American system might not be designed to accept names with accents and vowels because who has those in the States?
Anecdotally, I also heard of a female games journalist who had trouble using a VR headset because she wore mascara. It threw off the eye tracking because the system wasn't designed to handle that.
Any designer must test his or her product on many groups of people to find these problems.
> These kinds of limitations are fascinating because they reveal the cultural biases (and I don't mean bias in the negative sense) of their creators. A Western, American system might not be designed to accept names with accents and vowels because who has those in the States?
My guess would be on the order of tens or hundreds of thousands? It's 2016. There are very few good reasons left to assume text == ASCII anymore.
We had some face-tracking Sony pan/tilt cameras in the mid 1990s. They were also racist - they worked fine for me but wouldn't track an Indian friend of mine at all.
It could also be a cost benefit analysis. How much business lost vs. the cost of supporting. Especially when many such users have encountered the problem often enough to already have a work around.
There are definitely some cases where it is a testing issue, but especially with accepting all possible valid names, sometimes the cost is too high to convince the one in control of funding.
It's just really annoying when it's a government system and it's use is required.
This is slightly off topic, but I recently came across a lawsuit involving German passport and their having a person's name printed IN ALL CAPS. The plaintiff was suing for his right to use lower case characters as that was how his name was spelled correctly vis-a-vis how other families who use the same letters in the same order but with different casing spelt it.
falsehoods government bureaucrats believe about names...
Relatedly, the OCR machine-readable part of a standard (ICAO) passport can't contain accented letters, so ICAO has a standard for how to systematically transliterate various scripts into Basic Latin.
> A Western, American system might not be designed to accept names with accents and vowels because who has those in the States?
Here in Brazil, names with accents on vowels are common. Yet some banking file formats still use positional (fixed-length fields) uppercase-only ASCII files.
The format I'm thinking of also has a field in the header to specify whether the tape is formatted as 1600 BPI or 6250 BPI, so I'm inclined to think the cause is more technological than cultural.
I once sent a package to Curaçao. I bought postage online from USPS.
The package was delivered to Australia, as my local post office showed me on a printout, and lost forever.
The best I can figure out it, it was because I dared to use the accented 'ç' character in the country's name, and their computers were not able to handle this.
On a recent visit to Boston I wanted to use my credit card to buy my wife a gift at Best Buy whose special price was internet-only for store pickup. For those of us whose credit card billing addresses have non-US addresses, their special magic address to get past the US-only address form is:
I once sent a package to Curaçao. I bought postage online from USPS.
Click-N-Ship used to be able to handle Unicode characters but for some reason that was removed a few years ago. I always had success with it, but there must have been enough situations similar to yours that they decided to do away with it.
It's a shame. Every time we get an order from Spain and the customer uses the superscript "o" in the address, I have to substitute (normal) "o" and pray that the package actually arrives.
Yeah, my last name has a space in it. For a while, the NY DMV's computer couldn't handle that, so my license had a hyphen in my last name. Talk about insulting.
Which is weird because my first name is hyphenated and so many computers refuse to accept a hyphen in a first name. And even if they do accept a hyphen then there are still many times (including my state's online system) where my first name is too long.
Do you honestly think that's a good idea? IMHO, 95% (yes, this a guess, but I think a conservative one) of people will have no idea what that means. It will only confuse them and leave them feeling stupid - don't make users feel stupid.
This is not to say you don't have a valid point, but end-users need error messages that tell them how to fix the problem, not a diagnosis.
Look, dont you insult the user too. Everyone ouside of the ascii alphabet have at least a vague notion that americans dont allow all letters in their forms, so telling the user that an "forbidden letter" was used is clear enough.
I think the problem is that coders who realize that their form can't handle many common characters don't make a specialized error message, they just fix the problem. Basic Latin Unicode support isn't hard to do. If you've written code that can't handle it, you very likely aren't aware that you've made a mistake.
A few years ago I ordered a custom license plate 'NULL'. What should have been a 2-3 week process lasted 8 months, with the order being canceled multiple times, and at one point a blank plate being shipped to the county clerk's office.
More recently I've gotten out of a parking ticket in a certain municipality when a frustrated meter maid told me they saw my plates were valid, but the handheld device used to issue tickets would crash any time they tried to issue the ticket.
When I was working at British Airways a decade or so ago there was* a problem with a screen-scraping programme that terminated the crew printout whenever there was a passenger needing medical assistance on the flight manifest because the text "invalid" was assumed to be an error condition.
*Actually long enough ago I can no longer recall whether this was something that happened while I was there or just a tall tale that was doing the rounds in the department.
That is amazing. Not that I endorse criminal activity or anything, but I imagine the amount of power you now have to evade traffic violations, get away with jewel heists etc, must have made the wait well worth it
Null and various other strings are banned for use in license plates in many states. Think plates that might confuse humans (0/O and 1/l in words, NA, NONE, NO PLATE/TAG etc etc) and make it difficult to accurately read/write out a plate.
287 comments
[ 0.25 ms ] story [ 270 ms ] threadThat's such an alien way of thinking to me. I was taught that 80% of your work is spent handling 20% of the data. Is there something cultural that prevents other programmers from working in exceptions-first mode?
Maybe it's just with boring business logic. I've heard that the most robust networking applications are written assuming constant worst-case failure states. Anyone have any insight into this phenomenon? I get that there are practical limits to what you can plan for, but if you're accepting string input, shouldn't you at least be prepared for apostrophes?
So, don't fix that particular system, thanks very much.
(Edited)
T_T
1: https://en.wikipedia.org/wiki/MPEG_transport_stream
Perhaps there is an internal policy with usernames and those usernames and some rights are also transferred into the app. I don't have a better idea
http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...
The first job I took in IT, after graduating with a liberal arts degree, was in software testing for a company that made point-of-sale systems. Only a month or two out of training I was given the task to test a name and address form. Knowing that quotes were special characters in databases, I tried entering something like O'Connell as a last name. Sure enough, the system broke. I remember filing a snarky bug report about how Irish and Arab people ought to be able to use the form.
My point is that testing for quotes and "Null" as a surname isn't some kind of esoteric science. What's wrong with people!
And don't get me started if your name can't be written in US-ASCII, i.e. if it has weird squiggles above or below the characters or if it's written in gasp cyrillic.
https://en.wikipedia.org/wiki/O'Keeffe
http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...
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.
http://developer.authorize.net/api/reference/
firstName
First name associated with customer’s billing address. Required only when using a European Payment Processor.
No they don't, they ask for a single field, name on card which is a single string containing everything on the card.
http://developer.authorize.net/api/reference/
firstName
First name associated with customer’s billing address. Required only when using a European Payment Processor.
http://developer.authorize.net/api/reference/
firstName
First name associated with customer’s billing address. Required only when using a European Payment Processor.
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.
A free text field doesn't catch everything in that list.
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_p...
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.
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").
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.
#40: Sorry, but how can you not have a name? Good luck getting an ID document without a name. That doesn't make sense.
#11: This just sounds dumb: Unicode has thousands upon thousands of characters. Only with Chinese can I see this possibly being a problem, but even here I thought Unicode did account for that. Unicode was designed to have every conceivable glyph that every language on Earth uses.
That's what 32-36 are referring to, cases where children aren't given a name for an extended period of time. Even without extreme cases. what about a Hospital system meant to be used to track newborn children? It's necessarily not going to be able to rely on a name, because it's not uncommon for children not to be named for a few days. A system such as that might want to track the children by the mother, date of birth, and birth ordering (in case of twins, triplets, etc).
> This just sounds dumb: Unicode has thousands upon thousands of characters. Only with Chinese can I see this possibly being a problem, but even here I thought Unicode did account for that. Unicode was designed to have every conceivable glyph that every language on Earth uses.
Just because it was designed to accommodate every conceivable symbol, doesn't mean it currently has every conceivable symbol. What about the symbol Prince used for his name[1]? What about a language that's not in Unicode yet?
> There really isn't that much to it: you need to have two strings (and one can be null as I said above)
If someone has a single name, does it go in the first name, or second name spot? Is this enforced, and where?
It's not that you won't generally be served well by your suggestions, it's just that the problem space is complex enough that it's worth thinking about a little before falling back on that. It might be that you don't even need a name, or only need it for billing, and your requirements may change depending on what payment processors expect (is it okay to just save a single string for whatever full name they submit?) These are all worth giving a little thought to up front, because changing the schema after it's in use is always harder, and that goes both ways, Splitting a string into multiple name parts is hard for many of the same reasons listed here.
1: http://parkerhiggins.net/2013/01/writing-the-prince-symbol-i...
You don't need to support that. You don't need to cover every single edge case, and that certainly includes people who make up some crazy symbol to be their "name". I'm quite sure Prince didn't file his taxes to the IRS using that symbol, in fact, according to Wikipedia, "1993 also marked the year in which Prince changed his stage name to Prince logo.svg, which was explained as a combination of the symbols for male () and female ()." So that wasn't even his name at all! That was just a stage name. If you're making a system for anything official at all, then you don't have to worry about silly stuff like that.
(On the other hand, if you're making a system for artists which has a field for stage name, then you're going to have to figure out a solution to this one. As you can see with Wikipedia, their solution was to use a SVG file of the symbol and insert that into the text as necessary.)
>What about a language that's not in Unicode yet?
This again probably depends on exactly what your application is. If it's a US government database, then you don't need to worry about stuff like that, because they're not going to care about people using some obscure language that isn't covered by Unicode. Is there even such a language? I doubt it, not any that are in actual use.
Don't forget, just about every language has been Latinized now, so you can always fall back to Latinized characters.
>If someone has a single name, does it go in the first name, or second name spot? Is this enforced, and where?
Irrelevant. Do it however you want, it really doesn't matter.
Now again, as I mentioned before, a lot of this depends on exactly what your application is, so it's pretty hard to come up with any ideas or rules without knowing this. Are you making a database for US government use? Or something for shippers to ship packages around the world? And from what country? Something for payment processors? Based out of what country? Something for the Chinese government? The requirements will change depending on the answers.
If the government forms require a first name and a last name, for instance, and that's the law, and you only have one name, then you have to get yourself a second name. If you have a Chinese name and this is for a US government form, then most likely you have to use a Latinized version of your name. The possibilities are endless.
Why, because immigration isn't tracked in US government databases? Liaisons in other countries aren't tracked in US government databases?
> Is there even such a language? I doubt it, not any that are in actual use.
A simple google search shows that yes, there are[1]. They may not be common, but you know where uncommonly used languages see use? In names, from people trying to preserve their heritage.
> Now again, as I mentioned before, a lot of this depends on exactly what your application is
Actually, you're saying that now. I've been saying it from the beginning. Actually, that was the point of my first comment, and the point of my second comment, and the point of this comment. You said "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." and I was trying to point out that even if we accept the assumption that you need to require at least two names, there are cases where depending on your purpose you should really examine what you really need an build your schema around that, not some simple rule summarized as two database fields of unlimited length Unicode text.
I said this explicitly in the first comment with "What this really means is, depending on the application and how important the name is to you, you will have different requirements."
The entire last paragraph of my second comment was about this.
> so it's pretty hard to come up with any ideas or rules without knowing this.
Which is my point, and the point of the linked post about names. You need to know your problem domain, and the data you are expected to encounter. It's also not what you stated in your original comment. I'll just assume you were being a bit overly assertive initially, and it's not really the entirety of your stance, because you're making the opposite argument now. We've wasted a lot of time when you could have just said, "Yeah, if name fidelity is important, know your expected data and make plans for special cases if it's important." Which, again, is exactly what I said in my second comment.
1: http://unicode.org/standard/unsupported.html
For instance, you mentioned accommodating Cyrillic letters, but you didn't know you'd need to include a field for patronym, which is not the same thing as a middle name and can't just be included in the first name field without causing potential problems.
https://en.wikipedia.org/wiki/Mononymous_person#Modern_times
https://en.wikipedia.org/wiki/Indonesian_names#Mononymic_nam...
For mailing addresses, this is all you need. Postal organizations do NOT care about your name, they just want your address and some kind of name as a check in case there's a delivery problem (or there's been a forwarding address filed for a particular name). Payment processors may need something more defined, but those are frequently more standardized by country, but usually, at least here in the US, all they care about is "enter your name as it's written on the card here...". They don't care about your actual name, they just want to match the string you enter with the string the credit card has.
For Ai Weiwei, "Weiwei Ai" doesn't make sense, "Ai, Weiwei" is odd, and it has to be "Mr. Ai".
Not even close; you're already off the rails with assumptions that break for tons of names. There's an easy way to do names decently, ask the user for their full name all in one field, and ask them for a nickname for use with the app and email and such. If you try to break their name down into parts, you're doing it wrong; names are not normally structured data, they're just unstructured free text.
327!
Isaac Asimov had a series of short stories written in the form of conversations between the writer and a friend named George. George claims to have discovered how to summon a demon, and the conversations are about that demon. The demon is not allowed to directly help George, but he will do favors for George's friends.
These favors invariably do not turn out good for the friend. Each story is basically George telling the author the tale of one of these favors, and the writer trying to make sure George does not ask the demon to do any favors for the writer.
Anyway, in one of the stories George had a friend who wants to be able to do something to have a big positive impact on the world. George told the demon about this, and the demon said he'd help.
The next time George encountered that friend, the friend told George that he had been having all kinds of problems with computers. He'd go into his bank to cash a check, and when he'd get to the teller their computer would stop working. And it wasn't just the bank...anyone he encountered who was using a computer would find that their computer crashed when the friend came near. His mere presence seemed to be enough to crash computers.
This was, of course, making the friend's life miserable, and this was in the 1980s. If it kept happening it would get even worse, as computers were clearly going to become more and more common in everyday life.
George found out from the demon what had happened. The demon had indeed (irreversibly) made it so that computers could not work when the friend was near, in order to grant the wish to make a big positive impact. The demon says that when the friend is an old man humanity will be enslaved by an uprising of intelligent computers, and the friend will be the weapon that humanity will use to defeat the computers and regain freedom.
Yeah, you should probably do that.
You sound like I guy I once heard complain that The Lord of the Rings was just a collection of D&D cliches.
"I don't like the Beatles, I've heard that pop style a million times before"
Shakespeare's writing OTOH is still outstanding even if the stories are cliche (and they were cliche at the time as well)
Edit: chirality error, Samuel R. Delany
Trivia time: Issac Asimov published books in 9 of the 10 major categories of the dewy decimal system.
Personal note: I grew up reading his non fiction articles in the Fantasy and Science Fiction magazine back in the 80's.
"To this day, there are still no addresses, parking meters or street lights, and no sidewalks outside of Carmel's downtown commercial area. Those seeking directions receive hints such as “fifth house on the east side of Torres Street, green trim, driftwood fence” or by the legendary names adorning most houses, such as “Hansel” or “Sea Urchin.”"
http://www.carmelcalifornia.com/fun-facts-about-carmel.htm
You might be surprised to learn that in India, all addresses are more or less like this. This is due to the fact that we never ended up with the standardised street numbers and names that a lot of other countries have, and road naming is a highly political thing in India, so a lot of people call roads by colloquial names.
A typical address in India goes
"But how did the postman know where the house was without a number?"
"They just knew."
"What, all of them?"
"Yup. Each postman knew their own area."
"But how did the post get to that postman? There's no postcode!"
"People in the sorting office read the addresses..."
We also had a three-digit phone number. (One of the outer isles used to have one-digit phone numbers.)
But nothing compares the problems that people with names longer than 30 characters have to face. Creating a SSN card, or driver license, or pretty much any official document can be very painful. The name does fit in their systems and the attendants just don't know what to do and most of them are very reluctant in using abbreviations.
Every programmer should at least read Patrick's article that is cited in the story: http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...
And if you are naming kids and want to save them a lot of bureaucracy in their lives, give them short names.
I think it depends. Sometimes it's helpful to give them names that are just long enough to make their identities unique, so when they apply for police clearances, for example, they are not mistaken for similarly-named people with criminal records, or even nasty reputations.
One day, both my girlfriend and my mother started receiving weird messages from people, saying they hoped I would be okay, that they were "praying" for me (ugh), etc.
The mystery was solved later that day when I received a Google alert for my name and discovered a news article where someone with the same name had been at a different casino, won a large sum of money, and was later beaten and left for dead (fortunately, he survived and recovered).
"After a long flight I've already got my car, got to the hotel, checked in, and am fast asleep. Boutros Boutros-Ghali (Secretary General of the UN) is still stuck at the car rental counter at the airport patiently explaining his name to the befuddled clerk."
(Although admittedly, whilst I understand the humor intended, I could also see this anecdote as being perhaps a little offensive, too...)
- Thing One and Thing Two.. I wonder if it will fail..
Prima, Secunda, Tertia, Quarta, Quinta, Sexta, Septima, Octavia, and Decima — first to tenth daughter.
Octavia survived into modern English: https://en.wikipedia.org/wiki/Octavia_Spencer , https://en.wikipedia.org/wiki/Octavia_E._Butler
https://en.wikipedia.org/wiki/Balinese_name
This one, for example:
Don't leave me there! Tell me which culture assigns names more than five years after birth!I'd love to see an annotated version.
In the United States of America it is common for females to change their name at marriage, substituting their birth surname for that of their husband.
Also, in many tribal cultures the definitive name is not assigned until an adulthood rite of passage has been passed.
Adult names also change to reflect upgrades in social status such as the completion of a PhD, admittance into a society, acquisition of nobility titles, etc.
...or maybe it's not; without expanding on the items in the list, it's kinda hard to tell.
This is not just a computing issue; my parents come from different continents, my wife from another and we live in yet another. Finding a name for our child that could be pronounced by all the various relatives was very hard -- we found a single phoneme name and went with that.
Our hyphenated family name is essentially unpronounceable and unspellable to most people.
http://stackoverflow.com/questions/4456438/how-do-i-correctl...
We were still using punch cards back then.
Now that I think about it, in a large chunk of the Slavic world (Russia, Ukraine, Belarus etc), the majority of people probably have no middle name. A patronymic isn't really a middle name as such.
No middle name isn't uncommon, perhaps one in five people. One middle name is most common.
A second middle name isn't at all unusual. Having three suggests an aristocrat — not common, but certainly understood.
I remember a Christian friend choosing his second middle name, which I thought was weird: https://en.wikipedia.org/wiki/Confirmation#Confirmation_name
http://www.onwhichsubject.com/piran/press/
We used to rely on this guy to break systems. Not using his name, mind; he's just a really devious programmer.
https://glyph.twistedmatrix.com/2008/06/data-in-garbage-out....
So what should I write when I order a plane ticket? Write an O that the agents looking at my passport expects or the OE that matches what the computer reads?
What annoys me is not so much having to re-enter my name with the unaccented version of the vowel, it's when the form throws up an error message saying "Enter a Valid Name" [or suchlike]. I find that insulting.
At least make your error text put the blame where it belongs: "Sorry. This form can only handle ASCII Text". Don't insult your users by telling them their name isn't real.
Anecdotally, I also heard of a female games journalist who had trouble using a VR headset because she wore mascara. It threw off the eye tracking because the system wasn't designed to handle that.
Any designer must test his or her product on many groups of people to find these problems.
My guess would be on the order of tens or hundreds of thousands? It's 2016. There are very few good reasons left to assume text == ASCII anymore.
There are definitely some cases where it is a testing issue, but especially with accepting all possible valid names, sometimes the cost is too high to convince the one in control of funding.
This is slightly off topic, but I recently came across a lawsuit involving German passport and their having a person's name printed IN ALL CAPS. The plaintiff was suing for his right to use lower case characters as that was how his name was spelled correctly vis-a-vis how other families who use the same letters in the same order but with different casing spelt it.
falsehoods government bureaucrats believe about names...
Here in Brazil, names with accents on vowels are common. Yet some banking file formats still use positional (fixed-length fields) uppercase-only ASCII files.
The format I'm thinking of also has a field in the header to specify whether the tape is formatted as 1600 BPI or 6250 BPI, so I'm inclined to think the cause is more technological than cultural.
Right! Just:
Hernández, Martínez, Rodríguez, García, González, Gómez...
Luis Muñoz Marín, Luis Fortuño, and Aníbal Acevedo Vilá - all governors of Puerto Rico.
Ben Ray Luján - current U.S. Representative
The package was delivered to Australia, as my local post office showed me on a printout, and lost forever.
The best I can figure out it, it was because I dared to use the accented 'ç' character in the country's name, and their computers were not able to handle this.
On a recent visit to Boston I wanted to use my credit card to buy my wife a gift at Best Buy whose special price was internet-only for store pickup. For those of us whose credit card billing addresses have non-US addresses, their special magic address to get past the US-only address form is:
10780 Kempwood Dr. Houston, TX 77043
http://www.bestbuy.com/site/help-topics/international-orders...
Click-N-Ship used to be able to handle Unicode characters but for some reason that was removed a few years ago. I always had success with it, but there must have been enough situations similar to yours that they decided to do away with it.
It's a shame. Every time we get an order from Spain and the customer uses the superscript "o" in the address, I have to substitute (normal) "o" and pray that the package actually arrives.
Do you honestly think that's a good idea? IMHO, 95% (yes, this a guess, but I think a conservative one) of people will have no idea what that means. It will only confuse them and leave them feeling stupid - don't make users feel stupid.
This is not to say you don't have a valid point, but end-users need error messages that tell them how to fix the problem, not a diagnosis.
More recently I've gotten out of a parking ticket in a certain municipality when a frustrated meter maid told me they saw my plates were valid, but the handheld device used to issue tickets would crash any time they tried to issue the ticket.
But, I wonder how much more frequently you'd get pulled over with a plate like that.
the CA DMV lets you check for custom plates online: https://www.dmv.ca.gov/ipp2/initPers.do
*Actually long enough ago I can no longer recall whether this was something that happened while I was there or just a tall tale that was doing the rounds in the department.
-edit 'MI55ING' is available too.
However in NYC I saw a limo with the plates "1I11II1"
I do have one who's the III, only it's spelled Ill for reasons of forced capitalization.
https://xkcd.com/1105/
Edit: as someone else jumped to mention as well. Howdy there.