4 ms·
I was working on a personal project recently which involved importing lots of Japanese names into a database for my app. I had originally made a "person" table
by favorited 7y ago
I was working on a personal project recently which involved importing lots of Japanese names into a database for my app. I had originally made a "person" table with columns for "given_name" and "family_name" – but ended up going with a combined "name" column because I couldn't find a reliable way to determine if data from different sources was using the given-first or family-first convention (and I was automatically importing some of it, so I couldn't make case-by-case decisions).
This was just a fun app for personal use, so it wasn't the end of the world to just punt on the data, but it was frustrating nonetheless.
- caymanjim 7y agoWhenever I'm on a team building something new, I've fought hard to stop people from splitting names into first/last. There's simply no right way to do it. In addition to conventions like family name first in Japan, Spanish naming conventions create confusion (First Paternal_Family Maternal_Family), and there are rare outliers like mononyms as well. There is almost no use case--aside from perhaps a genealogy site--where splitting the name provides any benefit.
- favorited 7y agoInteresting! I wouldn't have thought that would be best practice, but in spending a little time trying to learn more (this page from W3[0] was really enlightening), it makes perfect sense why "only split if you absolutely need to" is good advice. [0]https://www.w3.org/International/questions/qa-personal-names https://www.w3.org/International/questions/qa-personal-names
- aikinai 7y agoWhat about sorting, reordering (as in the article), or allowing the user to pick preferred order? Also allowing other data such as phonetic name to be applied per name (again useful for sorting and other features). There are tons of reasons to split names and I’m just a basic user of contacts apps. This all comes to mind immediately since Apple splits names and Google doesn’t, making Apple products much more useful and elegant with Japanese names.
- imgabe 7y agoWhenever I'm making an app I do "full name" and "nickname" or "address_as" fields. It solves a lot of problems.
- favorited 7y agoThat's pretty much where I landed too. When I make the query to populate my models, I just go `coalesce(preferred_name, full_name) as name`.
- ink_13 7y agoAh, you have discovered one of the Falsehoods Programmers Believe About Names[0]. [0]:https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-...
- aikinai 7y agoOP specifically said “Japanese names” which are bound by strict registry policies and do not have any exceptions.