
An employee, whose last name is Null, kills our employee lookup app - willvarfar
http://stackoverflow.com/questions/4456438/how-can-i-pass-the-string-null-through-wsdl-soap-from-as3-to-coldfusion-web
======
NelsonMinar
This is funny, but it's also a real world example of the kind of encoding
nightmare that made SOAP RPC encoding really awkward. Various SOAP toolkits
used to serialize a missing value as the empty string, or a literal value like
"null" or 0, or all sorts of awfulness. I think the correct thing for the spec
is to set xsi:nil="true" as an attribute on the XML tag in question, but IIRC
about half the toolkits didn't understand that.

(I speak in the past tense of SOAP because I am an optimist.)

~~~
wpietri
Wow. I love that the S stands for Simple. "You keep using that word. I do not
think it means what you think it means."

~~~
haberman
Indeed it does:
[http://wanderingbarque.com/nonintersecting/2006/11/15/the-s-...](http://wanderingbarque.com/nonintersecting/2006/11/15/the-
s-stands-for-simple/)

~~~
Roboprog
God, I love that rant.

"I trust that the guys who wrote this have been shot." :-)

People who all run the same version of Visual Studio think SOAP is awesome.
Get handed somebody else's "whiz-dull" a few times, and see how much fun it is
to generate a working client using a different brand/version client stack.

~~~
jakejake
I had the pleasure of writing a client for a SOAP service in a
Titanium/JavaScript app not too long ago. If you don't have visual studio
generating those proxy classes for you then indeed it's a huge pain.

------
billybob
I have joked that I might change my name to Sample User, develop a piece of
land in the country, and name my road Example Avenue, taking address 123. This
would make me impervious to datamining, because my results would always be
thrown out.

But a last name of 'Null' may be even better. :)

~~~
aqme28
On the contrary, you'd probably receive a lot of "test" mail that leaked
through.

~~~
lifeformed
I wonder if the guys who own asdf.com ever check the email going through
asdf@asdf.com

~~~
jaredsohn
They do (or at least have in the past). <http://www.asdf.com/asdfemail.html>.
Interestingly, their real e-mail address is jklsemicolon@asdf.com

------
ShabbyDoo
I once worked for a medical records software company. We received a bug report
that a particular patient's record could not be viewed. Our support engineer
remoted into the client's site and asked the secretary for the patient's name.
It was Bobby Null. You can imagine what sort of underlying assumption about
String serialization led to this issue. [A preemptive aside: We had proper
confidentiality agreements in place. No HIPAA rules were violated.]

~~~
jsprinkles
Doesn't telling us the patient's name violate HIPAA in itself?

~~~
kijin
Methinks the "Bobby" part is fictional. Probably a reference to Bobby Tables.

~~~
ShabbyDoo
I wasn't that clever.

~~~
lazugod
You lose plausible deniability by admitting that.

------
wpietri
My favorite along these lines:

<http://caterina.net/archive/001011.html>

Flickr cofounder Caterina Fake couldn't fly on Northwest Airlines because
their system silently deleted her tickets.

------
cafard
Sort of weirdly classical, like Odysseus identifying himself to the Cyclops as
"Noman".

~~~
MrJagil
Or the schizophrenic in Hitchcocks "Psycho" called Norman.

------
ColinDabritz
We should add these to the list!

[http://www.kalzumeus.com/2010/06/17/falsehoods-
programmers-b...](http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-
believe-about-names/)

* No one has a name that is a reserved system keyword (Null, Nan, Unknown...)

~~~
read_wharf
I have received mail from SSA addressed to <myname> Unknown, because of
confusion over my name.

------
zbowling
My license plate when I live in Texas was "NULL". I never got a ticket when
running the toll booth and the camera OCR'd my license plate.

~~~
ars
<http://www.snopes.com/autos/law/noplate.asp>

------
rdtsc
Mr Null, the uncle of famous Bobby Tables.

<http://xkcd.com/327/>

~~~
MichaelApproved
Have a look at the response headers from any reddit page
<http://www.reddit.com/> and you'll see:

 _Server '; DROP TABLE servertypes; --_

I thought it was some sort of bug or attack and reported it to them. Here's
the response I got:

 _"It's a nod to<http://xkcd.com/327/>

Hope you parameterized your queries ;)"_

I love when companies do fun things like this.

------
ScottBurson
This is probably a direct consequence of the fact that XML (unlike
S-expressions, or JSON) fails to be self-describing. See [PDF]:
[http://homepages.inf.ed.ac.uk/wadler/papers/xml-
essence/xml-...](http://homepages.inf.ed.ac.uk/wadler/papers/xml-essence/xml-
essence.pdf)

~~~
Nitramp
XML is self-describing, it just so happens that XML's data model is not
identical (and actually not even close) to SOAP's data model, or the typical
programming language's data model.

XML itself only describes a text encoding, XML infoset describes node labeled
trees, possibly graphs through xml:id and idref.

Unlike JSON it doesn't have a concept of null, it only has absence of a node.
The authors of SOAP just invented a truly terrible way of mapping XML into a
programming language's constructs (which are typically edge labeled trees with
typed nodes).

XML is actually a decent data format for markup. Using it for other purposes
(RPC format, configuration files, ...) usually doesn't end well.

~~~
epochwolf
With xml, I thought <tag/> was null and <tag></tag> was an empty string.

~~~
ScottBurson
No, those two forms are equivalent: both indicate an empty string.

------
septerr
19k in parking tickets for XXXXXXX license plate -
[http://blog.al.com/spotnews/2009/10/the_price_of_vanity_plat...](http://blog.al.com/spotnews/2009/10/the_price_of_vanity_plates_xxx.html)

I heard of similar story of a student in Birmingham whose license plate was
'null'.

------
piinbinary
It's probably a good time to bring up "Falsehoods Programmers Believe About
Names": [http://www.kalzumeus.com/2010/06/17/falsehoods-
programmers-b...](http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-
believe-about-names/)

------
hughw
This fellow Adam <https://twitter.com/#!/undefined> signed up for twitter as
"undefined", scaring up twitter bugs like this one: "While visiting websites
like Twitter & ESPN, the webpage will suddenly switch to the twitter page of
the username 'undefined', who is not one of my twitter friends or
followers"...
[https://getsatisfaction.com/twitter/topics/when_i_visit_twit...](https://getsatisfaction.com/twitter/topics/when_i_visit_twitter_the_webpage_inexplicably_changes_to_a_user_named_undefined_adam_croot).

------
aidos
Ironic considering that the language behind (coldfusion) doesn't even have a
concept of null (it just uses empty string).

------
vitomd
Well my last name have a ñ . So for example my credit card have a weird
character like "&" . Others just change to n. My last name crash a educational
site when I registered

~~~
TazeTSchnitzel
Could you not replace it with 'ny' or something similar?

~~~
kragen
Using a name other than your official legal name is frowned upon in many
contexts. In some countries, although not the US, it's actually illegal under
many circumstances.

------
joeyh
Something that worries me about perl to no end is tests like:

if ($lastname) { ... }

This fails when $lastname="0". But I am constantly seeing perl code that does
it.

~~~
toyg
It's not Perl. I recently had a conversation with a friend who didn't like me
using "if myvar == 0:" or "if myvar is 0:" in python code rather than "if
myvar:". Call me paranoid, but i like to be as explicit as possible in my
checks, you never know when magic conversion tricks (which are often platform-
or implementation-dependant) will end up biting you in the ass.

~~~
kragen
Python is a little better than Perl or PHP on this; it won't treat the string
"0" as false. It does, however, treat both 0 and None as false, and also 0.0
== 0 == False, which is the same kind of potential bug.

Generally I find that Python's avoidance of implicit string type conversions
means that I almost never have this kind of bug in my Python.

On another note, `myvar is 0` is undefined behavior; Python implementations
can perfectly legitimately return False for that even if myvar is, in fact,
the integer 0. Try this, in Python 2.7.3:

    
    
      >>> x = 257
      >>> x is 257
      False
      >>> x = 257; x is 257
      True
      >>> 257 is 2**8 + 1
      False
      >>> 256 is 2**8
      True
      >>> x = 256
      >>> x is 256
      True
    

That's because `is` denotes object identity, not value equality, and for
immutable objects like integers, strings, and tuples of immutable objects,
object identity is fair game for optimization. In the above, "is" gives us a
fascinating window into the particular optimization decisions taken by the
CPython 2.7.3 interpreter. But, child, if you want your code's behavior to
depend on some problem domain instead of interpreter optimizations, don't use
"is" to compare integers!

~~~
toyg
Yes child, check this out:
<http://lateral.netmanagers.com.ar/weblog/posts/BB979.html> , in particular my
comment from two months ago.
[http://lateral.netmanagers.com.ar/weblog/posts/BB979.html#co...](http://lateral.netmanagers.com.ar/weblog/posts/BB979.html#comment-424219673)
and see where I'm coming from.

------
gabrtv
<http://stopsoap.com/>

------
funkeemonk
17 years ago, when I got my second Internet account with my ISP, I filled in
these 3 names for my choice of email address on their paper signup form.

root@ , nobody@ and daemon@

They gave me "daemon". I've terminated that account long ago, but last I
checked (6 years ago?), I could still retrieve emails and dial in using a
modem using that account.

------
why-el
This is hilarious. Seriously, the question votes were being incremented live.
:)

------
gouranga
This is exactly why you should never mix data and code/markup. When the
semantic barrier is broken, all shit breaks loose.

I've always wondered if SICP style scheme would cause these sort of problems.

~~~
ars
It's more an issue of in-band or out-of-band signaling.

It's hard to do in-band signaling properly, but often time you only have a
single data channel and then you have no choice.

------
lifeisstillgood
I believe that these errors are so common they represent a Cognitive bias on
the part of programmers. At some point every developer wants to execute a one
line command and have the system "do something". If they cannot get that one
line, then they have two options. - Wrap up more abstraction code, until one
line executes (the SOAP solution), or think deeply about what you are trying
to do and take things away until one line is clear and obvious (The REST
solution)

------
ufo
Dear god, so many deleted answers from people trying to be funny instead of
informative! (I am counting 4 from the last hour and 3 more from the previous
years)

------
joejohnson
I think this is a joke, possibly inspired by the XKCD comic (link posted in
the stackoverflow comments). The string "Null" would not cause this behavior.

~~~
pohl
I have personally encountered "Null" as a surname in system used by job
applicants world-wide. The system's session layer encodes absent values as the
string "null" at some point. The Null clan is the only problematic case, and
they are numerous enough that the maintainers are aware of the problem but not
so numerous to fix the session layer.

I wish I could listen in on a dinner conversation at Null house. They must
have an interesting perspective about computers.

------
wunderland
Is this real? I don't really understand what language they're discussing here,
but wouldn't the string "Null" be distinct from the protected Null?

~~~
function_seven
Not when naive serialization turns both of those into the same string "Null",
which the other end deserializes into the keyword.

------
gbog
At least your employee has a last name. I had an Indonesian hacker in my team,
he had no last name...

It is all about assumptions. OP assumed nobody would be called Null.
MusicBrainz index assumes no band chose to name themselves "Various Artists"
or "[unknown]". These are advisable but how to not assume that people have
last names?

------
philwelch
It once took me more time than I would like to admit to realize that the
string "false" is still true.

------
ChemicalHarm
I wonder if the "employee" is a doctor. Something similar showed up on
TheDailyWTF back in 2007:

<http://thedailywtf.com/Articles/Paging_Dr_0x2e__Null.aspx>

------
charlieok
Naturally the very first thing I did when opening this discussion thread was
search the page for “bobby tables” and “xkcd”. Of course, there were already
three separate mentions of that comic in the thread.

~~~
connor
Me too. Bobby tables is classic.

<http://xkcd.com/327/>

------
appleaintbad
And this is why it is a bad idea to look for null or nil as a value
representation in place of text or number. Instead, use a different
representation, like an empty or non-existent element/attribute, etc.

------
drudru11
Funny, just watched monsters inc last night and saw a guy named Jonathan Null
in the credits. Also, Tom Duff was there too.

------
Madintelligence
I have problems using a data analysis software where the stock ticker data
from a company is "NAN"

------
ahlemk
It's actually one of my friends database challenge. Indeed it is a funny fact

------
codergirl
I wish I could upvote this twice.

------
based2
type or untype?

------
mthreat
In other news, employee with last name NaN gets a huge paycheck due to
software glitch...

~~~
btown
Nan is actually a legitimate name (<http://en.wikipedia.org/wiki/Nan>) so if
you're putting everything into upper case and not sanitizing, you're gonna
have a bad time.

~~~
mthreat
Patio11's article "Falsehoods Programmers Believe About Names"

[http://www.kalzumeus.com/2010/06/17/falsehoods-
programmers-b...](http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-
believe-about-names/)

~~~
famousactress
This post reminded me of that also. I find myself sending someone that post
every quarter or so :)

------
robwgibbons
This is what bounties are for.

------
jaxn
The post is from December 2010 with no follow-up. It was likely a joke. HN got
trolled.

~~~
ChrisClark
There is a followup explaining how he solved the problem. Right there on the
page.

------
theorique
But is his first name Bobby?

~~~
scovetta
Little Bobby'); DROP TABLE Students;-- Null, always getting into trouble!

~~~
lani
little bobby tables we call him ....

------
marcieoum
Ahaha that's amazing!

