
My last name makes me invisible to Computers (2015) - traviswingo
https://www.wired.com/2015/11/null#tpw
======
DavidWoof
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 string. This has
nothing to do with null being a reserved word in many languages, I'll bet the
forms that aren't accepting 'null' aren't accepting 'none' or 'empty' either.

~~~
ajuc
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 :)

~~~
ufmace
That's insane.

I've known Java to be a bit verbose, but I thought it was mostly a reasonable
language aside from that. I might have expected something like that from
Javascript or PHP. Never in my wildest dreams would I have thought that boring
old Java would interpret a null cast to a string as a literal string "null"
when combining strings. Even Ruby and Python don't do that - they throw type
mismatch errors instead. C# treats it as empty string.

~~~
DSMan195276
Ehh, I don't really think this is a huge deal personally. Keep in mind that it
is not that `(string)null` gives you the "null" string, or
`((string)null).ToString()` gives you the null string. You have to use actual
string concatenation to get it (Or as others have pointed out,
`String.ToValue(null)`). Point being, it isn't/shouldn't be messing up your
regular comparisons (Unless you turn it into a string beforehand), and you
really shouldn't be checking for stuff like `null` against a string literal
anyway - it's meant for displaying a human readable string, not an unambiguous
string that could be converted back at a later time. If you wanted that then
you should use proper serialization techniques rather then just concatenating
a bunch of values.

~~~
Zak
It's insane in that Java pretends to have strong, static typing, then does
things like that.

~~~
Spivak
Overloading the plus operator for strings was probably a mistake in the
language but that's hardly a condemnation of their type system.

~~~
Zak
A lot of languages overload + to mean concatenate. I think that's a mistake,
however...

In Python:

    
    
        "abc" + None
        TypeError: cannot concatenate 'str' and 'NoneType' objects
        
        "abc".join(None)
        TypeError: can only join an iterable
    

In Ruby

    
    
        "abc" + nil
        TypeError: no implicit conversion of nil into String
    

In Lua

    
    
        = "abc" .. Nil
        attempt to concatenate global 'Nil' (a nil value)
    

But not Java. Java implicitly tries to coerce the provided value to be a
string, which seems out of place in a language that values type safety. That
all types might also be null also seems out of place in a language with
strong, static typing, but that's been discussed to death. The problem is
compounded by the fact that null is actually converted to "null" instead of an
empty string.

~~~
Too
On the other hand, it's easier to get into this situation in Python than Java.

    
    
        bar = "bar" 
        foo = "foo"
        foo_bar = foo + baar   # intentional typo (baar will be None)
    

In Java this would be a compiler error, but python accepts it until the
program is being run.

~~~
Zak
That's a NameError in Python: undefined variables don't have a value, not even
None. It won't be caught until runtime since there's no AOT compiler in
Python, but it's the same kind of error it is in Java.

My claim isn't that Python is safer overall than Java. Instead, it's that
Java, a language that is mostly type safe, most of the time should not have
these two potentially surprising behaviors:

1\. The standard string concatenation operator does implicit coercion rather
than rejecting an input that isn't a string. There should be a builtin to make
a string from any value no matter what for logging and debugging, but that
shouldn't be the standard concatenation operator.

2\. This is more controversial, but strongly statically typed languages should
not allow arbitrary values to be null. That sabotages one of the major
strengths of strong static typing. Instead, there should be an option type to
make it explicit. For something familiar to most programmers, SQL does this.

------
joejerryronnie
Reminds me of the time we ordered our high school football jerseys. We filled
out a form listing the requested size and spelling of our last name to be
printed on the back of our jersey. A couple of weeks later, all the jerseys
were delivered and we excitedly opened up the packing boxes to hand them out.
Imaging the surprise and ensuing hilarity when our good friend, Marshall
Blank's jersey came out of the box with no name printed on it whatsoever.

------
jmcdiesel
My old Manager's last name is Blank. The sad thing, given blank isnt a
reserved word at all, is he has the same problem. I think its EventBright or
Ticketmaster, i forget, but one of those sites wont accept "Blank" as his last
name, literally with the message of "Last name can not be blank" ...

------
tyingq
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...](http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-
believe-about-names/)

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

~~~
pjungwir
If you really want some fun, try explaining to people the difference between
modern Greek tonos (e.g. ή, Unicode 03ae) and ancient Greek oxia (e.g. ή,
Unicode 1f75). Or in UTF-8:

    
    
        paul@tal:~$ od --format=x1z tmp/tonos-oxia
        0000000 74 6f 6e 6f 73 3a 20 ce ae 0a 6f 78 69 61 3a 20  >tonos: ...oxia: <
        0000020 20 e1 bd b5 0a                                   > ....<
    

It's super fun when you are the only tech person in a Classics grad program
and everyone else is turning in papers that look like ransom notes, because
every fourth vowel has a different x-height from all the other letters. :-)

Here are the two Unicode ranges (PDF):

modern Greek:
[http://unicode.org/charts/PDF/U0370.pdf](http://unicode.org/charts/PDF/U0370.pdf)

ancient Greek:
[http://unicode.org/charts/PDF/U1F00.pdf](http://unicode.org/charts/PDF/U1F00.pdf)

Then again, try explaining to tech people the difference between ή and ἠ and
how you can get ἤ or ᾔ. :-)

~~~
Grustaf
You're not saying the classicists confuse the smooth breathing with the acute
accent, right? Only they can't figure out how to typeset them?

How do you enter them nowadays by the way? In the early days of the internet
before unicode there were special fonts from SIL for example that first of all
were using Latin characters (you'd type W and it would look like Ω) and
secondly I think had the diacritics as separate characters, so the font would
combine them. It was messy but at least you could type it on a normal
keyboard. You could even read it in its ASCII form, most of the hacks were
pretty reasonable.

~~~
pjungwir
Not smooth breathing and acute, but Unicode has _two_ codepoints for acute
accents (sort of). One is the modern Greek tonos, which often looks just like
an acute accent but sometimes appears as a dot or straight vertical line, and
the other codepoint is the ancient Greek oxia (the ancient term for the acute
accent), which appears with all the other marks and their combinations (grave,
circumflex, smooth/rough breathing, iota subscript).

Personally I type Greek using a vim keymap file, usually when writing LaTeX. I
believe my keymap file is influenced by those older non-Unicode fonts, because
I type w for ω and ;h for ή and >~h| for ᾖ. But my fellow students would
mostly use Word. I don't know how they would type the letters, but commonly
they would mix the tonos letters with everything else. I think what was
happening is that Word would automatically substitute fonts that offered those
codepoints, so it would end up showing Times for the letters with tonos and
Palatino for the others (or something like that). Hence the ransom note
effect.

------
jlgaddis
One of my LLCs is named "Null Ventures LLC". I sometimes get things via snail
mail that are addressed in interesting ways. The most common is simply
"<space>Ventures LLC". Unlike the author, I've never had issues (AFAIK,
anyways) receiving e-mail to the domain.

------
rukenshia
previous discussion: Hello, I’m Mr. Null. My Name Makes Me Invisible to
Computers -
[https://news.ycombinator.com/item?id=12426315](https://news.ycombinator.com/item?id=12426315)

------
amenghra
Reminds me the "NO PLATE" license plate story:
[http://www.snopes.com/autos/law/noplate.asp](http://www.snopes.com/autos/law/noplate.asp)

~~~
anomie31
Why didn't they just null the field?

------
ebro
Reminds me of running into this bug [1] at work that caused a few minutes of
head scratching. Couldn't make any changes to a user's profile as their
surname contained eval.

[1]
[https://quickview.cloudapps.cisco.com/quickview/bug/CSCut083...](https://quickview.cloudapps.cisco.com/quickview/bug/CSCut08386)

------
jmull
I 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. And that companies that have these old systems are proactively
filtering user input to prevent causing these old system to choke... It sounds
like the filter is case-insensitive, though, which would be too aggressive for
the case I'm thinking of. Maybe they are (mis)using a bad word filter for
this, which would tend to be aggressive.

~~~
glic3rinu
I believe the problem might be more common when exporting data from one system
to another. I've written code to migrate (and merge) large datasets from old
legacy systems. I needed quite a lot of heuristics and "best-effort"
transformations in order to deal with data inconsistencies... mostly string
manipulations where it's not hard to imagine bugs like this happening.

~~~
jmull
Ah, so it's _your_ fault. Got it!

;-)

------
jpindar
Well, you all wanted weak and dynamic typing...

------
cdevs
I'm trying to think how this would be a problem and it wouldn't directly be a
issue created by company but could be a issue in companies we deal with
passing around large databases of different types on people in America. It's
common we have to deal with a pipe delimited set of large data and after
loading it I'm sure my boss could see last name null in MySQL and go "let's
delete all "null" names.

------
petraeus
TLDR; It doesn't make you invisible only there are some badly coded apps out
there that typecast null to strings, wired article cliackbait

------
mywittyname
Does someone maintain a comprehensive list of names you should validate
against?

~~~
kalleboo
Not only names per-se, but for testing string handling in general I remember
this was posted to HN a while back [https://github.com/minimaxir/big-list-of-
naughty-strings](https://github.com/minimaxir/big-list-of-naughty-strings)

------
stephenr
what languages don't distinguish between literal null and a string with
content "null".

More importantly, who the fuck used such monstrosities?

~~~
intopieces
Oh, let me tell you about the saga of Mr Curl trying to update his billing
information at a company I used to work for...

~~~
stephenr
I don't understand. Are you agreeing with me or suggesting a string with the
contents "curl" will somehow cause the server to execute the curl command?

~~~
intopieces
This happened. I was working tech support for a company with a very old
billing database. Customer was attempting to update his billing information
with a new credit card and was immediately getting an error - Forbidden.

Turned out it was his last name, Curl, that was causing the issue. The system
was throwing an exception because it interpreted the customer's entry as
attempting to execute the curl command.

We ended up having him put "JR" at the end of his last name to prevent it.

------
tresp
obligatory xkcd [https://www.xkcd.com/327/](https://www.xkcd.com/327/)

~~~
AznHisoka
This has been overshared too many times.

~~~
amenghra
Obligatory: [https://xkcd.com/1053/](https://xkcd.com/1053/)

~~~
mark-r
I'm one of the 10000 people seeing this for the first time today, thanks!

------
SubiculumCode
NULL

------
gervase
Title could use a (2015) tag.

------
backordr
brb...changing my surname to "null".

~~~
isostatic
Good luck with that. If computers can't take it, how will you register it in
the first place?

