Live data from Hacker News

We have an employee whose last name is Null. He kills our employee lookup (2012)

stackoverflow.com

151–160 of 245 posts

Re: We have an employee whose last name is Null. He kills our employee lookup (2012)

#151
post #39

Earlier quoted context omitted.

I have a friend named Nan, and I posted every "NaN" error I got in my code on her Facebook wall for about a year. She hated it.

plot twist, my friend's anglicized name is Nan, but in Vietnamese I think it is a number. (nth birth)

năm is number 5 in Vietnamese, not Nan

Re: We have an employee whose last name is Null. He kills our employee lookup (2012)

#152
post #77
post #54

Earlier quoted context omitted.

In our app we neither validate nor escape user strings for any free form text (eg. "names" and descriptions)[1]. We only validate the max length. If text is truly free form then you don't need to validate or white list anything. Just make sure it's valid UTF-8 (or whatever encoding you're using) and escape it when you display it . That combined with using prepared statements with bind variables (aka named parameters)…

"Just make sure it's valid UTF-8 (or whatever encoding you're using) and escape it when you display it." I've lately been coming around to the belief that anyone who uses the term "sanitize" in this domain, as in, "sanitize user input" really doesn't know what they are talking about (at least on average). The approach you describe is the generally correct approach; you need to ensure that the proper levels of escapin…

It's a shame there's such a proximity in terminology between 'sanitize' and 'sanity check'. I wonder if that's where this whole confusion began in the first place. Yes, it is extremely unlikely that a user's given name contains a tag, but there are few reasons why your sofware should really care about it on a technical level - least of all if the way you choose to care about it leads to it also complaining when someone claims their name is O'Reilly. The correct response to someone claiming their name is "'; DROP TABLE Users --" should, ideally, be to say "Are you really sure about that?" but defer to the human decision on whether it's really the right thing to do.

Re: We have an employee whose last name is Null. He kills our employee lookup (2012)

#153
post #144

Earlier quoted context omitted.

I've never understood why people entering data into a system enter an initial. It's a partial entry. You wouldn't enter a date of birth as 3. On further thought, actually, they do. Then dismiss all the error messages and quit the program to get past the system keeping them in the field waiting for completion. Users seem hell bent on breaking our databases.

Do you think it's impossible that someone's middle name is only one letter long?

Ok, more accurately, people enter names into our database as an initial., as in they stick in a period. Such as John Andrew Doe becomes Doe^John^A., the period is not part of their name. I agree that its possible that is someone's name, but I am 100% certain that every instance I have encountered is incorrect. The various manufactures software we deal with either get confused by middle names or drop them. They also commonly assume that having 2 names in the first name field means that one is a middle name, and drop it. This isn't useful. I have never encountered someone with a single letter name in my workplace (first, last, anything) and so hadn't considered it. I am confident of this as I compare what every person writes on a form as their name with what our system says.

Re: We have an employee whose last name is Null. He kills our employee lookup (2012)

#154

Earlier quoted context omitted.

Growing up, my parents called me by my middle name, as I share a first name with my dad. (I'd rather be an Edward than a Ralph anyway.) When giving my name to someone, I tell them I'm Edward , as telling them I'm R. Edward just sounds pretentious. But if I'm beginning a relationship with a doctor's office or lawyer, or filling in a tax form, it's Ralph E. Lastname, because that's what's on my birth certificate and SS…

My name is Kim and I'm a male. Try convincing Americans (and other English speaking countries) about that... One example: Many years ago I subscribed to TIME and filled out a form where I checked "Mr." Apparently the person who typed in my name decided to "correct" this error and I became a "Mrs."... and I wasn't even married :-) The company I work at has offices in different cities, so most of the communication are…

I went to school with a male Kim in Aus. Never even realised it could be a girls name until the 80s when there were several female singers called Kim. Lots of male names seem to become girls names. Ashley is another that seems to have been lost in living memory. Apparently Shirley was once a male name and I am not joking. Between that and boys once wearing dresses until breaching along with pink clothes and long hair and time travel must be really confusing.

Re: We have an employee whose last name is Null. He kills our employee lookup (2012)

#155

Earlier quoted context omitted.

For a few years my airplane boarding passes said I was PAULA JUNGWIRTH because A is my middle initial. I got a few questions trying to board. I've noticed the last couple years that they print with a space now.

I've never understood why people entering data into a system enter an initial. It's a partial entry. You wouldn't enter a date of birth as 3. On further thought, actually, they do. Then dismiss all the error messages and quit the program to get past the system keeping them in the field waiting for completion. Users seem hell bent on breaking our databases.

J Strother Moore[1,2]. Ok, it's his first name.

[1] http://en.wikipedia.org/wiki/J_Strother_Moore

[2] http://www.cs.utexas.edu/~moore/

Re: We have an employee whose last name is Null. He kills our employee lookup (2012)

#156

Earlier quoted context omitted.

I've never understood why people entering data into a system enter an initial. It's a partial entry. You wouldn't enter a date of birth as 3. On further thought, actually, they do. Then dismiss all the error messages and quit the program to get past the system keeping them in the field waiting for completion. Users seem hell bent on breaking our databases.

I frequently have to enter my first initial and middle name as my "first name". Why? Because that is how it appears in numerous official places, such as my credit card. The users aren't broken, your database (and your assumptions about names) is.

The data base has errors and faulty assumptions, yes. I have some too, but I do not allow names entered into a big medical system to be anything other than the persons name, minimum of first name and last name, but I go over every record that passes through our scanners and enter middle names too. We have an AKA field where the patient can be called what ever the want, characters and numbers allowed. This is not stuck into medical image dicom headers but appears on the information system which is used when talking to patients or browsing records. Dicom files area transmitted across hospital, out information system data isn't but does transmit reports with a limited amount of patient data on them. Screw ups with identification happen too often already (once is too many) and matter too much to have a load of bad data in the system. Abbreviate anything at great risk. We have lots of people with the same name and same date of birth already, so extreme care is needed.

Re: We have an employee whose last name is Null. He kills our employee lookup (2012)

#157

Earlier quoted context omitted.

I've never understood why people entering data into a system enter an initial. It's a partial entry. You wouldn't enter a date of birth as 3. On further thought, actually, they do. Then dismiss all the error messages and quit the program to get past the system keeping them in the field waiting for completion. Users seem hell bent on breaking our databases.

J Strother Moore[1,2]. Ok, it's his first name. [1] http://en.wikipedia.org/wiki/J_Strother_Moore [2] http://www.cs.utexas.edu/~moore/

That example came along fast. I didn't expect an Anglo-American example (assumption based on links) and I wonder about the origin? The lack of a period makes it somewhat simpler for system handling, but I wouldn't bet on it sailing through without issue.

Re: We have an employee whose last name is Null. He kills our employee lookup (2012)

#158
post #94

Earlier quoted context omitted.

I'm actually curious now, was your (or whoever became the victim of this code) "Japanese name" not in the system in katakana or something?

That was imprecision because I was trying to avoid the quick discussion of Japanese orthography. Like most systems in Japan dealing with names, there are separate fields for 漢字名 and カナ名. (Some systems also have ローマ字名.) Japanese systems have wide, wide variability in what they do for 漢字名 for people who, ahem, don't have one. Some repeat the カナ名. Some do so but use half-width kana (半角 vs. 全角). Some managers who believe…

Could this have been solved by using "外人第一" as a suffix or instead of the romaji/katakana name?

I once tried to apply for a Japanese credit card online about 10 years ago (certainly things have changed with some banks sine then). IIRC the form would not accept romaji and my kana name was too long for the kanji input field.

This was painfully frustrating at the time but helped frame my approach to forms and DB specification when I got into web development (e.g. always using UTF8 in MySQL, full name as a single field in some applications, etc.).

Re: We have an employee whose last name is Null. He kills our employee lookup (2012)

#159

Earlier quoted context omitted.

I frequently have to enter my first initial and middle name as my "first name". Why? Because that is how it appears in numerous official places, such as my credit card. The users aren't broken, your database (and your assumptions about names) is.

The data base has errors and faulty assumptions, yes. I have some too, but I do not allow names entered into a big medical system to be anything other than the persons name, minimum of first name and last name, but I go over every record that passes through our scanners and enter middle names too. We have an AKA field where the patient can be called what ever the want, characters and numbers allowed. This is not stuc…

"minimum of first name and last name"

Bzzzzt! Sorry…

http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...

https://en.wikipedia.org/wiki/Mononymous_person

Re: We have an employee whose last name is Null. He kills our employee lookup (2012)

#160
post #53

A Japanese company once made the decision that they needed "virtual" employees in a particular system, for example to support e.g. adding a job to the org chart before that position had been filled (and another dozen use cases), so they had the clever idea "Hey, if we need to do this, we'll just input their 'name in Japanese' as one of a dozen status flags, like XX_JOB_REQUEST or XX_INCOMING_TRANSFER." One developer…

Many systems in China depend on your Chinese name and identification number. Suffice it to say, foreigners who work in China don't have either of these: a made up Chinese name is not meaningful or legal (China also lacks any kind of kana), a passport number is not a "valid" ID number and changes every 10 years anyways. I don't get to use many online services accordingly, and every year there is some problem with how they handle my last name (MC DIRMID, there is a freaking space after the MC in my passport, causes all sorts of problems).
Post reply on HN