5 ms·
>Recently, another smart developer decided to prevent people with first name less than 2 characters from checking-in. PSA, don't assume everyone has a name of
by Smithalicious 7y ago
>Recently, another smart developer decided to prevent people with first name less than 2 characters from checking-in.
PSA, don't assume everyone has a name of at least 2 characters; it isn't remotely true. Some people don't even have more than one name.
- Sharlin 7y agoAlways relevant: https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-...
- ryandrake 7y agoThis entire thread is a testament to Falsehoods Programmers Believe About Names. Shouldn't everyone by now have access to a list of "edge case" names to test their software against so these kinds of things don't get deployed? It's hard to believe it's 2019 and we are still struggling with things like names, addresses and dates.
- ken 7y agoThe edge cases in this example are trivial to generate: length 1, or empty string. ("Ends with the letters MR" isn't on this list, and is awfully specific.) If you do nothing but have a text field that can contain anything at all the user chooses to type, that will work! Add in "user X's name changes to Y on date Z" (hard to put in a list of edge case names) and you've covered 98% of these issues.
- ClumsyPilot 7y agoI must admit I have not seen one. Sounds like a perfect thing to crowdsource
- lostlogin 7y agoI’ll add the HN thread from that here too. That link of yours is very good. https://news.ycombinator.com/item?id=1438472 https://news.ycombinator.com/item?id=1438472
- FabHK 7y agoIt's always annoyed me that the blog post above didn't contain examples, and I'm grateful that someone posted a latter post that does contain examples: https://shinesolutions.com/2018/01/08/falsehoods-programmers-believe-about-names-with-examples/ https://shinesolutions.com/2018/01/08/falsehoods-programmers...
- cf0ed2aa-bdf5 7y agoAssuming what is and isn't valid for user inputs is a dangerous game because there are always exceptions. I ran into a similar issue with many online retailers when I was living in the inner city of Mannheim, Germany because a lot of online systems make assumptions on how a valid address looks. Addresses in Mannheim's inner city follow the format "Char Number, Number". "A1,1" is a valid address if you want to send a letter to the district court. A1 being the city block the court is located at and 1 being the house number within that block. I didn't get to do a lot of online shopping for years when I lived there.
- Andrew_nenakhov 7y agoSimple workaround would be putting in a human-readable long string. Anything like, "Daniel's residence, A1,1". Post people know how to read. Upd: reaction to this suggestion shows that some people don't understand how post office operates. They go to great lengths to understand where to deliver the mail/parcel. In most cases, addresses like "big yellow house with a red door overlooking the cliff near the lighthouse" would work. So the only challenge here is to get past the whatever dumb rule the service developer imposed on the address format. Likely it is just filter by string length.
- privong 7y agoPost people know how to read, but I think now most nail sorting/routing is done with computers and OCR. I sometimes get mail addressed to people who used to live at my address but have long since moved. I tried writing “return to sender, addressee not at this address” or similar things but the mail kept coming back to me. I finally went into the post office and they said that the machines would just rescan the address and send it right back to my address for delivery. So I think relying on postal employees to see/interpret things on address labels is no longer a viable approach in many places.
- Andrew_nenakhov 7y agoNo, not really. Sorting is always manual when automation fails. In your case, automation actually didn't fail, it just didn't recognize your additional instruction. Probably, you could have just patched the address with an easily removable piece of tape and that would definitely trigger a human attention, and delivery would go where it should
- dopkew 7y agoI have a family member with just one name, officially. We usually don't use surnames in our community. He has had problems registering his bike in India, with his name.
- lostlogin 7y agoThis is a great tests of systems - which field does it go in? First name? Middle? Last? It would not work well on systems I use.
- a3n 7y agoAs a person with one name and a programming background, I've always put my actual name in the last name field, assuming that that would usually be the most significant sorting field.
- big_chungus 7y agoWhat is registering a bike? Register with whom, and why?
- mangamadaiyan 7y ago"Bike" in India is short for "motorbike". OP's relative probably needs to register a newly bought motorcycle with the local transport authorities.
- hadrien01 7y agoThe French Minister for Digital is called Cédric O. Everytime I see his name I wonder how much problems he's had with digital systems.
- aasasd 7y agoOTOH must be a good incentive to fix a system when a programmer gets told that the minister can't use it.
- z2 7y agoAlso don't assume people can't have the same first and last name (Norwegian Air...). When their website failed to book my ticket, a customer rep told me to put NAMEMR as my first name. This then led to my ticket showing NAME MR MR. Surprisingly nobody batted an eye on international travel day, but it annoys me that their website product team decided to take it on themselves to take what I assume were Norwegian naming norms and improve on lax GDS constraints.
- a3n 7y agoMy entire "legal" name is "Aaron." (And now you know what my HN name means.) I was born with the usual three names. When I was thirty, years before 9/11 and DHS, I got a court order and dropped the middle and last. Because, OK? Never a problem, often a conversation. Sometimes I'd have to spend a little effort to be sure it said "Aaron" on my driver license. Other areas like credit cards and employment I've been more flexible, going by "A Aaron" or "Aaron Aaron," etc. SS used to call me "Aaron." At some point they renamed me to "UNK Aaron." All fine. Coming on two years ago, as part of a "pivot," I got my CDL, Commercial Driver License. Up to this point my DL said "Aaron." During training my learners permit said "Aaron." When it came time to take the CDL road test, the CDL office, separate in some way from the DMV, would not schedule my test. "Because there must be something in the first and last name fields on the driver license." Without investigating, I'm quite sure that they populate some CDL office record from some DMV record, and their software was written assuming that there must be two names and assuming that the DMV records would all have at least two names. But not three or more, because the programmer or requirements writer had personal experience with people without a middle name. So I had to go back to the DMV and get my driver license changed to something else. It too a while, phone calls, "can't you just ..." etc. The clerk finally agreed to list me as "Unknown Aaron." Which, note, is not my legal name, just what the DMV agreed to call me. So my legal name and "wallet" name are not the same. Now the CDL office recognized me as "Unknown Aaron." Took my test, got my permanent CDL. Which says "Unknown Aaron." Hired on with a company which knows me as "Unknown Aaron," because they have to use my CDL name because the feds know me that way now. Which means my health and other insurance knows me that way. Which means my doctors know me that way. So thanks, anonymous programmer.
- anotherevan 7y agoYou could go by "Aaron Nmn Nln" which would tongue-tie a lot of people. NMN = No Middle Name NLN = No Last Name
- gota 7y ago> I've been more flexible, going by "A Aaron" I'm sorry, but if I found that name IRL I'd have a hard time not laughing. Have you seen the Substitute Teacher sketch by Key and Peele? https://www.youtube.com/watch?v=Dd7FixvoKBw https://www.youtube.com/watch?v=Dd7FixvoKBw
- hcaz 7y agoDon't assume anything about names, let a user enter whatever they wish - https://shinesolutions.com/2018/01/08/falsehoods-programmers-believe-about-names-with-examples/ https://shinesolutions.com/2018/01/08/falsehoods-programmers...
- Pxtl 7y agoAlso don't assume these requirements come from developers. I've built form fields countless times and explained these rules to countless stakeholder and they always push back with "no, street address is a number" or "no, phone numbers must always conform to this format" and "no, everybody must have two names because I need to be able to sort the list by surname". And then the system launches and the complaints start to roll in to support.