3 ms·
So first of all everyone has read "falsehoods programmers believe about names". And of course everyone knows we should just use "name" and that's it. Perhaps a
by alkonaut 3y ago
So first of all everyone has read "falsehoods programmers believe about names". And of course everyone knows we should just use "name" and that's it. Perhaps a greeting/displayname if we need to do "Hello $customer" in an email.
But still. There are often hard requirements that are impossible to reconcile with the "just store one name" idea.
As an example: you need to produce alphabetically sorted lists. It would rarely be acceptable to produce lists of people sorted by their given names in Western Europe for example. So as an example if you really do need to have BOTH "Doe, John" and "John Doe" what do you do in case you know at least 99% of users will have names following this format? Do you force people to enter their name twice? In that situation I would:
- Store it as a single name column, with more columns as required (greeting, sortable, ).
- Present a UX that is appropriate for the region of 99% users. So for western Europe show a "first name", "last name", but don't store that: just set the name column to "$firstname $lastname" and the index name column to "$lastname, $firstname" and greeting to "$firstname" for example. That way I at least let 99% of your users only input the name once.
- But (and this is important) offer an alternative way of specifying it for those who don't have a name that conforms to the format. You let just that small fraction of users enter a name/indexname/greeting instead.
And yes: the above ONLY applies if it's really a hard requirement to separate them, because the last name sorting was really a requirement. Of course there are other requirements that force other solutions. The "just one input" is the correct solution for all the cases where it is possible.
- Hackbraten 3y ago> It would rarely be acceptable to produce lists of people sorted by their given names in Western Europe for example. Luckily, it has become a bit uncommon to manually search a printed document by name. In times of GDPR, the days of printed lists of personal info posted on some bulletin board are pretty much over. For a list that is non-public, chances are you already have it on a device with a search feature.
- nitwit005 3y agoPresenting an alphabetically sorted list only really makes sense if you can force everyone to use a single alphabet.
- alkonaut 3y agoYes. What I’m talking about is of course a system where 100% use the same alphabet and 99.99% the same name format.
- ttepasse 3y agoEven sorting alphabetically sorted lists by last name differ in western cultures, in the case of particles in the last names. Some countries file “de Rohan”, “von Ruhr”, “van Rotterdam” and similar under “R”, others just under the first character of the string.
- alkonaut 3y agoHow does that work in countries where it is common (like in the Netherlands)? I imagine software handles it by pattern matching as when sorting artists as “Beatles, The”? To just match some known “de”, “van” or “van der”! Anywhere I know van der Whatever would just be sorted on “v” but that only works because almost no one has such a last name.