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)
We have an employee whose last name is Null. He kills our employee lookup (2012)
151–160 of 245 posts
Re: We have an employee whose last name is Null. He kills our employee lookup (2012)
#152Earlier 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…
Re: We have an employee whose last name is Null. He kills our employee lookup (2012)
#153Earlier 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?
Re: We have an employee whose last name is Null. He kills our employee lookup (2012)
#154Earlier 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…
Re: We have an employee whose last name is Null. He kills our employee lookup (2012)
#155Earlier 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.
Re: We have an employee whose last name is Null. He kills our employee lookup (2012)
#156Earlier 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.
Re: We have an employee whose last name is Null. He kills our employee lookup (2012)
#157Earlier 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/
Re: We have an employee whose last name is Null. He kills our employee lookup (2012)
#158Earlier 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…
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)
#159Earlier 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…
Bzzzzt! Sorry…
http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...
Re: We have an employee whose last name is Null. He kills our employee lookup (2012)
#160A 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…