I have seen apps that choke on much more common names. Like O'Brian. This post is a classic on various name issues: http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...
Tangentially related (rule 9); my girlfriend's surname contains an 'é'. I have yet to see a year go by without receiving mail having 'é' on the address label where the é should be. Explanation: echo "é" | iconv -t utf8 -f iso8859-15 We're Dutch, and the é is part of our language, and even part of the legacy character encoding standard everyone used before Unicode's widespread adoption. This is just a matter of code…
My last name makes me invisible to Computers (2015)
51–60 of 140 posts
Re: My last name makes me invisible to Computers (2015)
#52I don't get what's happening at the low-level for this to be a problem. It seems like you'd have to do something pretty stupid at the coding level to introduce a problem with "Null" by mistake . I'm sure it happens, but not more of an occasional issue. My best guess is that there are common old databases that did not have a first class null type where it was common practice to use the string "NULL" for that purpose.…
I think JavaScript is the biggest offender here. So this check would fail: if (lastName.toLowerCase() != null)
Re: My last name makes me invisible to Computers (2015)
#53I have seen apps that choke on much more common names. Like O'Brian. This post is a classic on various name issues: http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...
Tangentially related (rule 9); my girlfriend's surname contains an 'é'. I have yet to see a year go by without receiving mail having 'é' on the address label where the é should be. Explanation: echo "é" | iconv -t utf8 -f iso8859-15 We're Dutch, and the é is part of our language, and even part of the legacy character encoding standard everyone used before Unicode's widespread adoption. This is just a matter of code…
Re: My last name makes me invisible to Computers (2015)
#54I have seen apps that choke on much more common names. Like O'Brian. This post is a classic on various name issues: http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...
Hyphens too. Source: have a hyphenated last name. "No special characters in this field".
Re: My last name makes me invisible to Computers (2015)
#55Earlier quoted context omitted.
In java + operator on strings works like this: Object a = null; String s = "foo bar " + a; // s == "foo bar null" So, it's possible to get "null" as a string downstream, when some variable that should be non-nulleable - was null. If you find such a bug and incompetently fix it by checking for "null" downstream instead of checking before turning variables into strings - you have the error from the article. Especially…
Sure – that's just casting a null type as a string. So I guess if you have a comparison that somehow casts null to a string before comparing, you could run into this issue, but that's still bad programming. I used to own null@myundergrad.edu as an email alias (with my real university, not that generic .edu, of course) and I got all sorts of interesting things... but that was very intentional on my part.
See:
"null".equals((String)null) //false
"null".equals((String)null+"") //true
System.out.print((String)null) // throws NPE
System.out.println((String)null) // prints "null", I guess because it appends "\n" insideRe: My last name makes me invisible to Computers (2015)
#56Earlier quoted context omitted.
Hyphens too. Source: have a hyphenated last name. "No special characters in this field".
I get that with periods in a street name. Like when I write "123 Main St.", and the web site checks against the USPS's database, it will either reject it outright for having "special" characters, or will say, "We didn't find that, but we found this similar address - '123 Main St', which should we use?" It's so fucking dumb.
Ups and FedEx charge shippers ~$15 for each instance where they have to address correct.
So, yeah, the period thing is dumb, but automated correction is hard. Even experts, like SmartyStreets get it wrong often.
Re: My last name makes me invisible to Computers (2015)
#57Re: My last name makes me invisible to Computers (2015)
#58Re: My last name makes me invisible to Computers (2015)
#59Earlier quoted context omitted.
Sure – that's just casting a null type as a string. So I guess if you have a comparison that somehow casts null to a string before comparing, you could run into this issue, but that's still bad programming. I used to own null@myundergrad.edu as an email alias (with my real university, not that generic .edu, of course) and I got all sorts of interesting things... but that was very intentional on my part.
Funnily enough - it's not the null-> String conversion, it's the "+" operator. That was at one point subject of heated debate in my previous job :) See: "null".equals((String)null) //false "null".equals((String)null+"") //true System.out.print((String)null) // throws NPE System.out.println((String)null) // prints "null", I guess because it appends "\n" inside
Re: My last name makes me invisible to Computers (2015)
#60Earlier quoted context omitted.
Funnily enough - it's not the null-> String conversion, it's the "+" operator. That was at one point subject of heated debate in my previous job :) See: "null".equals((String)null) //false "null".equals((String)null+"") //true System.out.print((String)null) // throws NPE System.out.println((String)null) // prints "null", I guess because it appends "\n" inside
Right, but that operator is implicitly casting the null object to a string type – it has to, in a strict sense... some other languages would raise an error (and many would do the same as Java).
BTW there's another "fun" gotcha, when you interface java code and oracle database which consider empty string and null to be the same thing. Depending on how you handle data from database you end up with null, "", or "null" :)