Live data from Hacker News

My last name makes me invisible to Computers (2015)

wired.com

21–30 of 140 posts

Re: My last name makes me invisible to Computers (2015)

#21

I've been programming for over a quarter century, and I feel pretty confident that I've never written anything that could confuse 'null' with NULL. I can't even think of a language that would let you easily do this. If web forms aren't accepting NULL, then somebody probably specifically programmed the word 'null' into a filter of disallowed entries. Probably to stop clerks from entering the word 'null' to mean empty…

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 if you check ignoring the case.

BTW guess how I know it's working like that :)

Re: My last name makes me invisible to Computers (2015)

#22
post #2

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...

It's not always a computer problem. I have an O' name. There have been many college educated adults I've had to explain the difference between a quote ("), an apostrophe ('), and whatever the hell you call the character under the tilde (`). I kid, it's the grave.

Re: My last name makes me invisible to Computers (2015)

#23
post #2

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...

Hyphens too.

Source: have a hyphenated last name. "No special characters in this field".

Re: My last name makes me invisible to Computers (2015)

#24
post #13

Earlier quoted context omitted.

Javascript lets you do it if you use the equality (==) instead of the identity (===).. i think.

Just tested (in the node CLI console) and that doesn't seem to be the case. Edit: It's true in PHP though. :-/

>Edit: It's true in PHP though. :-/

Can you post exactly what you did in PHP that shows "NULL" is equal to NULL? There's quite a few approaches like ==, ===, and is_null(). I can't get any to think "NULL" is NULL, though I imagine I'm missing something.

Re: My last name makes me invisible to Computers (2015)

#26
post #12

I've been programming for over a quarter century, and I feel pretty confident that I've never written anything that could confuse 'null' with NULL. I can't even think of a language that would let you easily do this. If web forms aren't accepting NULL, then somebody probably specifically programmed the word 'null' into a filter of disallowed entries. Probably to stop clerks from entering the word 'null' to mean empty…

Here's an example where it creeps in: https://issues.apache.org/jira/browse/FLEX-33644

Relevant excerpt:

    var nullXML:XML = null;
    if (nullXML == null) { trace("Some XML is null"); }
    
    nullXML == null is true!
That's... impressive.

Re: My last name makes me invisible to Computers (2015)

#28
post #23
post #2

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...

Hyphens too. Source: have a hyphenated last name. "No special characters in this field".

I'll bet it was an airline. The underlying field type for names in a PNR in the TPF os only allows A-Z and space.

Re: My last name makes me invisible to Computers (2015)

#30
post #26
post #12

Earlier quoted context omitted.

Here's an example where it creeps in: https://issues.apache.org/jira/browse/FLEX-33644

Relevant excerpt: var nullXML:XML = null ; if (nullXML == null) { trace("Some XML is null"); } nullXML == null is true! That's... impressive.

Bug is still unclosed too.
Post reply on HN