Friendly reminder that if you're designing any kind of personal information form and you decide to:

1. Validate names for "bad words"
2. Put a minimum characters limit on names
3. Have two separate fields for "first" and "last" name

Then you're doing it wrong with a shitload of very western-minded assumptions that are not universal and will cause issues

@rail_ ah yes, the Scunthorpe problem returns yet again
@lonewolf225 @rail_ These days I think of it more as the Nuttaporn problem.
@rail_ 4. Apply the cursed [a-zA-Z] regex filter to any of the fields

@ananas that is just wrong beyond any forgiveness

5. Encode values in anything but UTF-8

@rail_ Hmm… That one I'm actually not quite sure of, though I might be biased due to my never-dying love for Java, which (somewhat exotically) went with UTF-16. It does take an extra byte for every character, but doesn't have a risk of growing to 3 or even 4 bytes for texts using only characters from the Chinese character set for example. I guess one can argue that *on a global scale* it's actually a saving. Then there is that perk of the emoticons to fit in a single "character" 
@ananas that's details, my point was more of a "don't use us-ascii"
@rail_ To hell with ASCII 🙏 🙏
@rail_ and it will fail even for other western names, because in computer science the assumption will be always translated to anglo, us-ascii
@mawhrin ah yes, my Hungarian friend, named Máté, had a lot of funny encounters because of it

@mawhrin @rail_ fun fact, my uncle had a very common (out at least used to be common when immigration happened) German last name: Dick.

With that spelling.

There were several people in my area that had trouble with work email and spam filters

@rail_ Case in point: Polla over here is a feminine given name, meanwhile in Spanish...
@rail_ there’s no correct way to store a name in a database, but the least wrong is “200 character utf-8 field you never match anything against”

@rail_ Even with a western-looking name, I had to correct a form where I entered my last name twice due to these two fields.

I never know what to enter when ordering things as my name might get converted into mojibake or my address might get truncated and fail delivery. A validation of "we can print anything we accept" would be useful if properly done.

@rail_ Or mandating second last names, usually a problem in Spanish-speaking countries. I have no problems with it, but my hubby (British) always does: Banks, the tax office, Social security, phone companies… there’s always an issue with his name.
@rail_ I would never ask you for your name. I'd only ask for a username ^^

But yes, I have had to code forms like that due to the form being designed by someone else
Falsehoods Programmers Believe About Names | Kalzumeus Software

Classic essay about how software routinely bumbles human names.

@rail_ if I can only have one name you’re doing it wrong
Falsehoods Programmers Believe About Names | Kalzumeus Software

Classic essay about how software routinely bumbles human names.

@rail_ Always worth a read in this regards: Falsehoods programmers believe about names.

https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/

Falsehoods Programmers Believe About Names | Kalzumeus Software

Classic essay about how software routinely bumbles human names.

@andy @rail_ Fry and Laurie once did a sketch on a similar topic https://youtu.be/hNoS2BU6bbQ?si=RVtrPQuwzCtk11QG
Funny Hugh Laurie & Stephen Fry comedy sketch! 'Your name, sir?' - BBC

YouTube
@rail_ Even within the west. At one evening job in the 90s I had to enter phoned-in orders to the company's sales software, that didn't allow special characters like, wait for it, hyphens in family names. In a country stuffed to the nads with double-barrelled family names. The pillocks.

@rail_ Wait, should we just have one field for full name?

What do you mean "validate names for bad words" like swears?

@sashin yes and yes

First because a lot of places don't use "last names" at all, or use them differently and a different order than you do. It should be a single field that does not require any nor put a limitation on number of space separations

Second, because your "swears" and other bad words can be valid names that people have, or can mean something completely different in other cultures

I wonder how many times Arnold Schwarzenegger had issues because of that ;p

@rail_ @sashin ideal case should be (if you need to collect this information) “what is your name” and “how should we refer to you i.e. Hello Dave”
@rail_ even worse than first and last name firleds: dissalowing spaces in those fields
@rail_ It’s frustrating when you avoid the two name fields, but then the services you interact still require it so you have to guess about where to split them. 🫠
@rail_ The mink with a middle name and middle initial (because someone had a form with both fields) peeks in
@rail_ Single character firstname haver here (yes, legally, it's on my ID), and I've actually had fewer problems than I initially anticipated, but whenever I do run into issues, I've never been able to get them to fix it...

@rail_

I thought we learned these lessons decades ago trying to parse the DSN list for submitted name comparisons after 9/11. I left that field and was kinda honestly kinda hoping that after 23 years this sort of thing would already have standardized solutions.

@rail_ first and last names are not even universal in "West".
@rail_ I hate that my app needs to ask for a split first and last name because my payment system needs this because some bank systems have to enforce this as well...
@rail_ Re: separate "first" and "last" names are all I've seen except for in card holder fields. Educate this western woman as to why separate first and last fields are a bad practice, please?

@we_are_spc people without a last name exist and it's not very uncommon

people with more than one last name exist and in many places it's very common

people with multiple first name exist and it's extremely common

what is a valid name depends on culture and individual person

there is no such a thing as an invalid name and it shouldn't be your job to try to validate them

good practice is one field for "Full name" and a nice touch is a separate, optional field for "How do you want to be referred to"

@rail_ I've seen the "preferred name" in paycom, but I can't remember if there was a first/last separated fields.

That's good to know, thank you. :)