Live data from Hacker News

NULL license plate not such a bright idea

knrs.iheart.com

101–110 of 484 posts

Re: NULL license plate not such a bright idea

#101
post #24

Earlier quoted context omitted.

Nah, because it's not unsanitized SQL at fault, but people writing a literal NULL in the license plate field when there isn't one.

Actually, I think it's doubtful the folks at the private processing facility are actually writing 'NULL', but my guess is the DB field is just not set (i.e. left as NULL), and then when the info is read out somewhere it's just printed as the string literal value.

I'd guess that there is a CSV step involved.

Re: NULL license plate not such a bright idea

#102
post #66
post #42

Earlier quoted context omitted.

On top of that, if anything, forcing the government to fix it's bad code ( insert snarky ambiguity between software code and legal code ) can't be a bad thing. I'd buy the guy a beer.

The problem is it's a "a privately operated citation processing center" that's causing the problem. They might even be instructed to hand-enter a NULL for these cases. I'm don't really see an incentive for the govt agency to do anything about it. It's no skin off their nose. They'll just keep sending the tickets.

Don't you have some kind of illegal prosecution laws? In my home country people could go to jail for that.

Re: NULL license plate not such a bright idea

#103
post #24
post #4

This is funny. I wonder what would happen if you could put a 'NOT ' in front of your plate number... would everyone but you get a ticket?

Nah, because it's not unsanitized SQL at fault, but people writing a literal NULL in the license plate field when there isn't one.

I doubt that. Normal people do not tend to use the word NULL at all.

What this usually is is the result of systems that talk to systems that talk to systems that talk to systems, all in different legacy formats never written to be interchange formats. One system has true SQL NULLs, the next system down the chain only accepts strings for that field, NULL gets written as the most sensible string, and then from that point on all downstream systems can't tell the difference between the original system having had an SQL NULL or having had the string NULL.

Re: NULL license plate not such a bright idea

#104

I have a family member who's license plate started with "&". The DMV accepts it, plates were ordered online fine, but police systems can't handle it apparently, to my family members ultimate discomfort. I commonly joke it probably gets the individual out of automated tickers for speeding and red lights, but when an officer pulls them over we sometimes need to explain that the "&" is dropped in the system (or so we've…

Looks like you can't have the character '&' on a personalized license plate in WA: https://fortress.wa.gov/dol/extdriveses/NoLogon/_/

Re: NULL license plate not such a bright idea

#105

This isn't even a coding error, NULL is apparently valid license plate, and for some reason there is a private processing center typing it in to the government system. First of all they are accidentally committing fraud (libel?) against this guy. But more importantly, why is there a private processing center? Don't the officers type this in as they fill out the ticket? or even just scan the plates? If there aren't pl…

> This isn't even a coding error, NULL is apparently valid license plate, and for some reason there is a private processing center typing it in to the government system.

I would take that with a grain of salt. The linked article on a talk-radio site, and was likely intended as a wacky news bite that the hosts breeze through and then make jokes about. I figured the exact technical details of what is causing the problem was lost in translation. More likely that they were leaving the plate blank, and then the backend software was confusing null database fields with the string "NULL".

Re: NULL license plate not such a bright idea

#106
post #13

Shout out to all the Python programmers from the other frontpage thread who are responsible for bugs like this with their crappy scripting languages.

NULL is in much more widespread use then Python. C and C++ have implementations where NULL == NULL. https://www.infoq.com/presentations/Null-References-The-Bill...

Re: NULL license plate not such a bright idea

#107
post #13

Shout out to all the Python programmers from the other frontpage thread who are responsible for bugs like this with their crappy scripting languages.

Well - Python doesn’t use NULL, to be clear.

In the other notorious scripting language JavaScript it's also spelled

    null
Which makes for a bit of funny because

    NULL is not defined

Re: NULL license plate not such a bright idea

#108
post #97

Earlier quoted context omitted.

Actually, I think it's doubtful the folks at the private processing facility are actually writing 'NULL', but my guess is the DB field is just not set (i.e. left as NULL), and then when the info is read out somewhere it's just printed as the string literal value.

Wouldn't their license plate be in quotes, though? 'NULL' != NULL

As my other comment points out, this is probably systems talking to systems talking to systems talking to systems to the nth degree. So even if the first system did in fact distinguish the NULL case from the string case, it only takes one system in the chain to be incapable of representing the difference to permanently and unrecoverably wreck it for all downstream systems.

What are the odds at least one system silently filters out apostrophes as invalid characters in license plate fields? Pretty good. These systems are often unattended, unmonitored processes often maintained by people who either can't fix errors upstream, or don't even want to, so these conversions are often written extremely permissively, trying to get through the data with whatever heuristics are necessary for the process to just Keep Working.

Re: NULL license plate not such a bright idea

#109
post #103
post #24

Earlier quoted context omitted.

Nah, because it's not unsanitized SQL at fault, but people writing a literal NULL in the license plate field when there isn't one.

I doubt that. Normal people do not tend to use the word NULL at all. What this usually is is the result of systems that talk to systems that talk to systems that talk to systems, all in different legacy formats never written to be interchange formats. One system has true SQL NULLs, the next system down the chain only accepts strings for that field, NULL gets written as the most sensible string, and then from that poi…

Did you read the article? It literally says people at a private citation outfit put NULL in the license plate field when there is no number available.

Re: NULL license plate not such a bright idea

#110
post #79

This isn't even a coding error, NULL is apparently valid license plate, and for some reason there is a private processing center typing it in to the government system. First of all they are accidentally committing fraud (libel?) against this guy. But more importantly, why is there a private processing center? Don't the officers type this in as they fill out the ticket? or even just scan the plates? If there aren't pl…

Brand new cars don't yet have plates. Granted, most states now have dealer-printed labels with an identifier on them, but still, new cars don't immediately have plates when they roll off the lot.

When I lived in West Virginia, recently sold cars did not have temporary tags. It was very common to see hand-scrawled signs "TAF" in the back windows. TAF stood for "Tags Applied For."

I'm not sure if that's still happening.

Post reply on HN