When Your Last Name Is Null, Nothing Works (www.wsj.com)
from otter@lemmy.ca to programming@programming.dev on 21 Feb 06:54
https://lemmy.ca/post/39487287

The word, used by computer scientists to mean ‘no value,’ has created long-running challenges

#programming

threaded - newest

remotelove@lemmy.ca on 21 Feb 07:19 next collapse

Who the hell writes if ‘null’? If it’s a thing, what language would interpret a string like that?

SpaceNoodle@lemmy.world on 21 Feb 08:47 next collapse

Fucking JavaScript

sir_pronoun@lemmy.world on 21 Feb 09:13 next collapse

Srsly?

GoodEye8@lemm.ee on 21 Feb 09:59 collapse

Javascript is fun. The video takes a few jabs at ruby and then gives a glimpse into the insanity that is Javascript.

Lemjukes@lemm.ee on 21 Feb 12:10 collapse

More of this please

dneaves@lemmy.world on 21 Feb 12:59 collapse

!![] + !![] == 2

kamiheku@sopuli.xyz on 21 Feb 10:15 collapse

No it doesn’t?

> Boolean(null)
false
> Boolean('null')
true
> null == 'null'
false
ursakhiin@beehaw.org on 21 Feb 11:45 collapse

I’d bet it’s less simple input sanitizing and more 2 mistakes made separately because they don’t know any better.

  1. The input field converting everything to a string indiscriminately
  2. Because they did 1, converting everything back to the assumed type

If the front end Dev makes the first mistake, null would be sent in the body as “null”. Then on the backend, somebody might even be binding the variables correctly, but before hand realizing they have to deal with the market and rather than just have a conversation undoes it in their own code.

solrize@lemmy.world on 21 Feb 07:19 next collapse

Wait til they meet my friend Little Bobby Tables.

Schal330@lemmy.world on 21 Feb 11:35 collapse

At this point I would think most people know, but for those who don’t:

xkcd.com/327

einkorn@feddit.org on 21 Feb 07:22 next collapse

When Your Last Name Is Null, Nothing Works

No, when people DON’T PROPERLY SANITIZE THEIR USER INPUT, nothing works!!!

Looks like little Bobby Tables has some extended family.

PhobosAnomaly@feddit.uk on 21 Feb 07:24 next collapse

Taking the issue at face value, I wonder what Johnny Null’s workaround would be for his (or their) name?

N’ull? Nul-l? \Null? Null? JohnnyN ull?

drunkosaurus@lemmy.dbzer0.com on 21 Feb 08:42 next collapse

Definitely not N’ull, that would trigger a SQL error when it can’t interpret the ull after the string delimiter.

0x0@programming.dev on 21 Feb 11:05 next collapse

–Null

bravesilvernest@lemmy.ml on 21 Feb 12:50 collapse

If they’re not sanitizing that, they deserve to have their system broken lol

VerifiedSource@sh.itjust.works on 21 Feb 09:46 collapse

NuII works

Spoiler

Upper case i

NABDad@lemmy.world on 21 Feb 10:37 next collapse

Representatives for the internet provider she had used in her old apartment initially told her they couldn’t cancel her account because there was no last name associated with it.

She had been paying the company for months. She has since switched internet providers.

Are people this silly? Just stop paying them. They’ll figure out how to cancel the account.

Pieisawesome@lemmy.dbzer0.com on 21 Feb 14:42 collapse

They might report you to a credit agency or keep your deposit

piccolo@sh.itjust.works on 21 Feb 15:14 collapse

“We’re sending you to collections”

Oh so you have my last name?

“…no…”

0x0@programming.dev on 21 Feb 10:58 next collapse

This seems to be old news, and paywalled.

Edit: gee, thanks MSN. The article i’d read was about the license plate.

Morgan Null, in black, with her parents and brother, all Nulls. lol

Not that rare of a name apparently…

pHr34kY@lemmy.world on 21 Feb 11:56 next collapse

I’ve seen XML parsers that will convert element content from strings to native types by default. So “0” becomes an int, “true” becomes a boolean, and “null” becomes an actual null. I had to take extra steps to keep everything as a string unless explicitly told not to.

JSON does not have this problem, BTW.

calcopiritus@lemmy.world on 21 Feb 12:09 collapse

I don’t think anyone actually chooses XML. There’s no reason to use it over JSON unless you need to.

ChairmanMeow@programming.dev on 21 Feb 12:12 next collapse

The entirety of the banking world uses XML very heavily, as it’s part of the SWIFT standards.

calcopiritus@lemmy.world on 21 Feb 14:22 collapse

I didn’t say that it’s not used. I say that you shouldn’t if you have the option.

If the entire X world uses Y technology. You have no choice other than using Y technology.

piccolo@sh.itjust.works on 21 Feb 15:10 next collapse

Really? Right in front of my AJAX?

brian@programming.dev on 22 Feb 09:54 collapse

json is fine as a serialization format for things that need to be text, but it’s not great as something that gets edited by hand.

not that I enjoy xml, but writing long strings in json is even worse. xml I can write multiline strings as a first class entity.

I can add a comment to an xml document, json I have to write something hacky like “//”: “my comment” and hope whatever is consuming it doesn’t care.

there’s just as many problems with json parsers, since most but not all of them treat numbers as js numbers, which are basically floats. you can’t rely on an arbitrary consumer having support to parse ints above a certain size so you just have to make everything a string and hope.

json allows duplicate keys, but they get overridden by the last occurrence. you can’t round trip json without losing something. you can’t rely on just seeing a key value in json text and that being correct since there could be another later. doesn’t come up often but it’s there.

[deleted] on 21 Feb 13:19 next collapse

.

MonkderVierte@lemmy.ml on 21 Feb 13:22 next collapse

archive.is/2gDhN

Templa@beehaw.org on 21 Feb 17:52 collapse

archive.ph/2gDhN also works

infeeeee@lemm.ee on 21 Feb 13:55 next collapse

This topic pops up in random news sites like every 5 years, and usually the conclusion is people with these names have less and less problems, as systems evolve.

Nowadays names which looks like some vulgar words cause more problems, it’s called the Scunthorpe problem from the city of Scunthorpe. As this is a shitty article, this actual problem is not even mentioned, classic.

y0kai@lemmy.dbzer0.com on 21 Feb 18:05 collapse

Lol one of the characters in my D&D group is named Farthard (pronounced Far-thard) and his steed is named Shithead (pronounced Sha-theed)

cupcakezealot@lemmy.blahaj.zone on 21 Feb 14:06 next collapse

little bobby null

Amputret@lemmy.dbzer0.com on 21 Feb 17:16 collapse

Anyone got a non-paywall link? I’m changing my name soon and this is highly relevant to my interests.