Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
QuarkJets
Sep 8, 2008

CPColin posted:

The horse I've been through the desert on would beg to differ.

That horse has a name it just doesn't like you

Adbot
ADBOT LOVES YOU

Doom Mathematic
Sep 2, 2008
You know how it is when you've been riding the same horse for that long without ever being properly introduced and it just becomes awkward to ask.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Volguus posted:



That's true, when you have to interface with dinosaur era system, you do what you have to do. But way too often we see newly created applications that are stand alone and ask for first and last name even though they really shouldn't have a need for it.

What if you need to support sorting by last name? What if the last name contains spaces? What if some people include their middle name or initial and others don't? What if you're dealing with a culture where family name comes first? What if you're dealing with a culture where last names are patronymic (Iceland!)?

The distinction between a given name and a family name is broadly useful, different across different cultures, and generally needs to be captured.

New Yorp New Yorp fucked around with this message at 02:43 on Mar 8, 2021

Jazerus
May 24, 2011


New Yorp New Yorp posted:

What if you need to support sorting by last name? What if the last name contains spaces? What if some people include their middle name or initial and others don't? What if you're dealing with a culture where family name comes first? What if you're dealing with a culture where last names are patronymic (Iceland!)?

The distinction between a given name and a family name is broadly useful, different across different cultures, and generally needs to be captured.

i would simply not do any of those things

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Jazerus posted:

i would simply not do any of those things

OK, well, your boss/internal client/external client wants you to, so...

Jazerus
May 24, 2011


Volmarias posted:

OK, well, your boss/internal client/external client wants you to, so...
:thejoke:

CPColin
Sep 9, 2003

Big ol' smile.

QuarkJets posted:

That horse has a name it just doesn't like you

How dare :argh:

Volguus
Mar 3, 2009

New Yorp New Yorp posted:

What if you need to support sorting by last name?

You sort by name. You do not sort by last name since you don't have one.

New Yorp New Yorp posted:

What if the last name contains spaces?
Not an issue. It can contain whatever characters it wants.

New Yorp New Yorp posted:

What if some people include their middle name or initial and others don't?
Again, simply not an issue

New Yorp New Yorp posted:

What if you're dealing with a culture where family name comes first?

See, there, you solved it because you ask for their name. Not the first, not the last, not the middle one (or all 5 middle names). The full one. You solve all the (name) problems in one simple design choice.

New Yorp New Yorp posted:

What if you're dealing with a culture where last names are patronymic (Iceland!)?
You're laughing all the way to the bank, because you made a sane decision that did away with all the complexities of human names.

New Yorp New Yorp posted:

The distinction between a given name and a family name is broadly useful, different across different cultures, and generally needs to be captured.

Such as? Where would that distinction be useful? That was my inquiry/statement: valid reason to capture the first/last names. Needing to sort by last name is not a valid reason. You can sort by name just fine. However the user decides to enter it, it's completely up to them. Needing to interface with old systems is a ... constraint. And therefore a valid reason since you cannot do anything about it (and to be fair, probably that's the smallest sin an application will do when it has to integrate with old systems).


Volmarias posted:

OK, well, your boss/internal client/external client wants you to, so...

You can tell them that you can sort by name. Ascending and Descending. There. 2 options I bet they didn't even think about :).

Dylan16807
May 12, 2010

Volguus posted:

You sort by name. You do not sort by last name since you don't have one.

Not an issue. It can contain whatever characters it wants.

Again, simply not an issue


See, there, you solved it because you ask for their name. Not the first, not the last, not the middle one (or all 5 middle names). The full one. You solve all the (name) problems in one simple design choice.

You're laughing all the way to the bank, because you made a sane decision that did away with all the complexities of human names.


Such as? Where would that distinction be useful? That was my inquiry/statement: valid reason to capture the first/last names. Needing to sort by last name is not a valid reason. You can sort by name just fine. However the user decides to enter it, it's completely up to them. Needing to interface with old systems is a ... constraint. And therefore a valid reason since you cannot do anything about it (and to be fair, probably that's the smallest sin an application will do when it has to integrate with old systems).


You can tell them that you can sort by name. Ascending and Descending. There. 2 options I bet they didn't even think about :).

That's a good step one. Then step two can be using UTC time everywhere instead of time zones, and step three can be using lat/lon instead of addresses. So much complexity avoided!

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Volguus posted:

Such as? Where would that distinction be useful? That was my inquiry/statement: valid reason to capture the first/last names. Needing to sort by last name is not a valid reason. You can sort by name just fine. However the user decides to enter it, it's completely up to them. Needing to interface with old systems is a ... constraint. And therefore a valid reason since you cannot do anything about it (and to be fair, probably that's the smallest sin an application will do when it has to integrate with old systems).

Every software system I've ever worked on where names are being captured, it's either necessary or useful to be able to sort and search by family name. You can't just search on a "name" field in its entirety because that's going to give false positives on any nontrivial dataset -- ex. "Oliver" can be a given name or a family name.

If you've never needed to do that and can't imagine why anyone would need or want to do it, I don't know what to tell you that will convince you. I know there are edge cases and I've read that old blog post about bad assumptions programmers make about names (and I agree with the spirit of it), but the simple fact remains that most software that deals with names will, at some point, need the ability to either visualize or extract information based on family name, and cramming the entire name into a single field is going to make that effectively impossible.

Impotence
Nov 8, 2010
Lipstick Apathy

New Yorp New Yorp posted:

Every software system I've ever worked on where names are being captured, it's either necessary or useful to be able to sort and search by family name. You can't just search on a "name" field in its entirety because that's going to give false positives on any nontrivial dataset -- ex. "Oliver" can be a given name or a family name.

If you've never needed to do that and can't imagine why anyone would need or want to do it, I don't know what to tell you that will convince you. I know there are edge cases and I've read that old blog post about bad assumptions programmers make about names (and I agree with the spirit of it), but the simple fact remains that most software that deals with names will, at some point, need the ability to either visualize or extract information based on family name, and cramming the entire name into a single field is going to make that effectively impossible.

of course, this also kind of matters where it's used. if you had were doing software that would only deal with indonesians, a family name field is effectively pointless, and foreign software generally results in people typing a space, period, hyphen, or putting the first name twice

Volguus
Mar 3, 2009

Dylan16807 posted:

That's a good step one. Then step two can be using UTC time everywhere instead of time zones, and step three can be using lat/lon instead of addresses. So much complexity avoided!

See, you're getting it. Though, I' m not sure I agree with lat/long part since, one could envision a hypothetical situation with the city moving 100 Street X a few blocks down and the existing building becomes 200 Street X. Still, storing the address string surely cannot be that hard. In countries like Costa Rica they don't have a standardised address system, no street names, no house numbers in places, a complete mess.


New Yorp New Yorp posted:

Every software system I've ever worked on where names are being captured, it's either necessary or useful to be able to sort and search by family name. You can't just search on a "name" field in its entirety because that's going to give false positives on any nontrivial dataset -- ex. "Oliver" can be a given name or a family name.

If you've never needed to do that and can't imagine why anyone would need or want to do it, I don't know what to tell you that will convince you. I know there are edge cases and I've read that old blog post about bad assumptions programmers make about names (and I agree with the spirit of it), but the simple fact remains that most software that deals with names will, at some point, need the ability to either visualize or extract information based on family name, and cramming the entire name into a single field is going to make that effectively impossible.

Well, surely you can make an example that absolutely needs all the Bobs side by side, since you've seen it. I'm curious.
I've dealt with things like this in governmental applications, where, in addition to having to interface with systems built and designed eons earlier, the government had its rules and we just had to follow them. Nonsensical, idiotic rules, but nonetheless. But as I said, if you're not in that business, if you're making that app that sells a yet another candy crash clone, there is absolutely no need to succumb to inertia. "We've always done it that way" should not be an accepted reason.

Volguus fucked around with this message at 05:46 on Mar 8, 2021

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Volguus posted:

Well, surely you can make an example that absolutely needs all the Bobs side by side, since you've seen it. I'm curious.
I've dealt with things like this in governmental applications, where, in addition to having to interface with systems built and designed eons earlier, the government had its rules and we just had to follow them. Nonsensical, idiotic rules, but nonetheless. But as I said, if you're not in that business, if you're making that app that sells a yet another candy crash clone, there is absolutely no need to succumb to inertia. "We've always done it that way" should not be an accepted reason.

I feel like you're being intentionally contrarian for no reason. Wanting to search and/or sort by family name will come up literally any time you have a big list of names and want to find someone but you don't remember their exact name.

"I think his name was Bob, and his last name was something that sounds like Katz. Katzenberger? Kasparian? Something like that, I don't know." So the easiest way to jog your memory is to sort the family name alphabetically and look through the "K"s and see if any of those names jog your memory. And then you discover the guy's name was actually Robert Kesper and you were in the right ballpark phonetically but off alphabetically in a way that nothing other than sorting and browsing would be able to help you accomplish.

This happens literally every day with people I work with and our CRM system. It would be completely unusable software for them without family name being a distinct field.

Foxfire_
Nov 8, 2010

Volguus posted:

Well, surely you can make an example that absolutely needs all the Bobs side by side, since you've seen it. I'm curious.
I've dealt with things like this in governmental applications, where, in addition to having to interface with systems built and designed eons earlier, the government had its rules and we just had to follow them. Nonsensical, idiotic rules, but nonetheless. But as I said, if you're not in that business, if you're making that app that sells a yet another candy crash clone, there is absolutely no need to succumb to inertia. "We've always done it that way" should not be an accepted reason.

QuarkJets
Sep 8, 2008

Volguus posted:

You sort by name. You do not sort by last name since you don't have one.

Not an issue. It can contain whatever characters it wants.

Again, simply not an issue


See, there, you solved it because you ask for their name. Not the first, not the last, not the middle one (or all 5 middle names). The full one. You solve all the (name) problems in one simple design choice.

You're laughing all the way to the bank, because you made a sane decision that did away with all the complexities of human names.


Such as? Where would that distinction be useful? That was my inquiry/statement: valid reason to capture the first/last names. Needing to sort by last name is not a valid reason. You can sort by name just fine. However the user decides to enter it, it's completely up to them. Needing to interface with old systems is a ... constraint. And therefore a valid reason since you cannot do anything about it (and to be fair, probably that's the smallest sin an application will do when it has to integrate with old systems).


You can tell them that you can sort by name. Ascending and Descending. There. 2 options I bet they didn't even think about :).

Oh god, the horror is coming from inside the thread!

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

"Just make the search box take a regex and then teach 65 year old non-technical sales and marketing people regular expressions, duh"

QuarkJets
Sep 8, 2008

I'm seeing lines of reasoning here that are also used by people who try to roll their own crypto. "I personally have been unable to find any vulnerabilities in my algorithm, therefore it has no vulnerabilities" == "I personally cannot imagine a downside to storing names as one big string, therefore there is no downside"

Volguus
Mar 3, 2009
And what's the problem with just searching normally for a name? And sorting? why wouldn't that accomplish the same thing?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

QuarkJets posted:

Oh god, the horror is coming from inside the thread!

Yes but that's been true since the thread began

Jazerus
May 24, 2011


Volguus posted:

And what's the problem with just searching normally for a name? And sorting? why wouldn't that accomplish the same thing?

because real-world institutions of basically all kinds love to do things like "sort employees alphabetically by last name"

i agree with you that if you are taking in a name, and operating on that name purely as an identifying token whose contents and format you are uninterested in, then a single name field makes plenty of sense. however, under what circumstances are you taking in someone's real name in the first place while being wholly uninterested in the actual name itself?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I wonder if many specifications to store names as some arbitrary set of components don't actually need to be specified that way?

QuarkJets posted:

I'm seeing lines of reasoning here that are also used by people who try to roll their own crypto. "I personally have been unable to find any vulnerabilities in my algorithm, therefore it has no vulnerabilities" == "I personally cannot imagine a downside to storing names as one big string, therefore there is no downside"

Storing a name without doing a bad job splitting it into components is very similar to leaking sensitive information, yes, well done.

QuarkJets
Sep 8, 2008

It's inefficient to use names to identify people anyway, integers are much better. Names can contain weird characters and are bulky to store, integers are much cleaner and more efficient. I refer to everyone by a number that I assign to them when I meet them for the first time, and if they ask me to use their name then I just calmly explain the advantages of integer identifiers

Xerophyte
Mar 17, 2008

This space intentionally left blank

QuarkJets posted:

It's inefficient to use names to identify people anyway, integers are much better. Names can contain weird characters and are bulky to store, integers are much cleaner and more efficient. I refer to everyone by a number that I assign to them when I meet them for the first time, and if they ask me to use their name then I just calmly explain the advantages of integer identifiers

I am reminded of a coworker who posted a picture of their new baby holding up a card with a string of hexadecimals on the company Slack, commenting "we haven't settled on a name yet, so for now we assigned her a UUID".

One Eye Open
Sep 19, 2006
Am I awake?

QuarkJets posted:

It's inefficient to use names to identify people anyway, integers are much better. Names can contain weird characters and are bulky to store, integers are much cleaner and more efficient. I refer to everyone by a number that I assign to them when I meet them for the first time, and if they ask me to use their name then I just calmly explain the advantages of integer identifiers

Athas
Aug 6, 2007

fuck that joker

Jazerus posted:

under what circumstances are you taking in someone's real name in the first place while being wholly uninterested in the actual name itself?

Whenever you want to put it on a shipping label, or on a profile website, or just tell others what someone's name is. To me, doing operations on names is the exotic edge case. It's mainly a (not really) unique identifier which can sometimes be decomposed in highly culture-specific ways.

Similarly, it bothers me when address forms have a mandatory "state" field. Not every country is a federation. I don't have any administrative or political unit interposed between my city and my country.

redleader
Aug 18, 2005

Engage according to operational parameters
just use first + last names. humans have been bending to meet the arbitrary and inflexible rules of computers for at least the last half century, and you bucking that trend isn't going to change anything. plus anyone with a name that doesn't fit neatly into first + last name will have come up with some system that works sufficiently for their purposes

Xarn
Jun 26, 2015

New Yorp New Yorp posted:

"Just make the search box take a regex and then teach 65 year old non-technical sales and marketing people regular expressions, duh"

Now you get it. :v:


(I genuinely wish more search boxes took standard regex expressions)

NtotheTC
Dec 31, 2007


It's a little bit weird that people here think localisation efforts start and end with timezone. Whether a single input for name is the way to go I'm not sure but going "if those crazy furr'ners like their stupid names so much they can make their own system!" is pretty dense.

The internet solved this problem almost instantly anyway: forums handles for everyone

Xerophyte
Mar 17, 2008

This space intentionally left blank
It's more that making assumptions on names -- such as them being easily divided into two words -- is the opposite of localizing. For instance I, like most swedes, have multiple official first names (e.g. "John Bob Smith"). They're all on my passport and all my Swedish documentation, but you'd only use one of them to address me. The legal first in my case, but lots of people use their legal 2nd or 3rd.

When I moved to the US I dutifully wrote down both my first names as usual and as this matched my passport no one in the inspection process complained ... with the likely inevitable result that some of my documentation was forever addressed to "JOHNBOB SMITH" by some system that handled spaces separating multiple first names in the dumbest way possible, and half my immigration-related mail never got to me. I asked the DMV how I could go about changing it when renewing my driver's license and they looked like I'd asked them how to pluck the moon from the sky. (E: Admittedly this seems to be how the DMV responds to any and all questions and requests.)

This is not to say that they shouldn't have tried to extract a last name and similar. For instance, it's perfectly reasonable for the US to require names be transliterated to the Latin alphabet in official systems, so people in the US can actually read it. It is to say that names are hard, and you should avoid encoding your local naming convention or assume much about how names are structured without a good, practical reason to do so. The closer you get to names being arbitrary strings, the fewer name-related localization headaches you'll suffer.

Xerophyte fucked around with this message at 13:18 on Mar 8, 2021

Tei
Feb 19, 2011

Names are not unique identifiers. I bet in many companies theres more than one John Smith working for one department.

How dumb is to have non-unique names for people? kinda dumb. But thats what user_id PRIMARY KEY is for. Just store the name of people on whatever format you are happy with, like you store their phone number or the name of their first pet.

biznatchio
Mar 31, 2001


Buglord
I really think everyone's overlooking the perfectly reasonable option of using Lotus Notes to store people's names and building your application as an extension within.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
I think this is one of those things where everyone argues past each other for pages and pages because they've all seen different implementations of the general concept of "storage of human names in a computer system", and the different failure modes that arise.

Tei
Feb 19, 2011

biznatchio posted:

I really think everyone's overlooking the perfectly reasonable option of using Lotus Notes to store people's names and building your application as an extension within.

Or use "Discourse" has a database, storing the data has posts with json in it.

QuarkJets
Sep 8, 2008

There's no point in having records that separate an employee's name from their address and phone number, so we're just going to store all of that information in one long string.

Tei
Feb 19, 2011

QuarkJets posted:

There's no point in having records that separate an employee's name from their address and phone number, so we're just going to store all of that information in one long string.

Outdated.

Just use a bloom filter.
https://en.wikipedia.org/wiki/Bloom_filter

So when "John@foo.com" try to login, you can ask the bloom filter. "Do you know John@foo.com?". And it will answer yes or not.

smackfu
Jun 7, 2004

Tei posted:

Names are not unique identifiers. I bet in many companies theres more than one John Smith working for one department.

My employer decided to use middle names everywhere to make people’s names unique. This is weird and you shouldn’t do it.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Individuals should be always determined by the combination of country code + arbitrary unique string provided by that country's demographic services.

Their human names, on the other side, should be fully localised for maximum comfort and protection of local culture. Mr. John Smith (personal ID: US-564386326), upon landing in Paris, should get used to being addressed at all times as Jean Ferrier.

Loezi
Dec 18, 2012

Never buy the cheap stuff

NihilCredo posted:

Individuals should be always determined by the combination of country code + arbitrary unique string provided by that country's demographic services.

Their human names, on the other side, should be fully localised for maximum comfort and protection of local culture. Mr. John Smith (personal ID: US-564386326), upon landing in Paris, should get used to being addressed at all times as Jean Ferrier.

Just use OIDs you barbarian.

Tei
Feb 19, 2011

Idea for a encryption method: replace the first 127 characters of ASCII by symbols from the windows Wingdings font that kind of look similar. Use this every time workers names show in a document, so if a attacker Copy & Paste the names of the employees, they would get #/R45 instead of john

Adbot
ADBOT LOVES YOU

hbag
Feb 13, 2021

fellas
we are overlooking the obvious solution:
hire a STEM startup to re-invent phrenology for the 5 billionth time so they can use "machine learning" to identify each of your employees

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply