5 ms·
Which systems use the string "null" to represent a null value? That seems like a bad idea...
by calibas 2y ago
Which systems use the string "null" to represent a null value? That seems like a bad idea...
- jazzyjackson 2y agoI could see it happening with clumsy JSON parsing. in javascript, JSON.parse("null") would return null, and the string null would have to be JSON.parse('"null"').
- threeducks 2y agoA common source of "NULL" strings are CSVs. I personally had to deal with a database that only understood NULLs correctly when using QUOTE_NOTNULL, which was added to Python just last year: https://github.com/python/cpython/issues/113732 https://github.com/python/cpython/issues/113732 I've also heard of a fun database where the user "Geoffrey" was truncated to "G". I wonder why? (Hint: End of file)
- driggs 2y ago> I've also heard of a fun database where the user "Geoffrey" was truncated to "G". I wonder why? (Hint: End of file) Sorry, I don't buy that one. There's no way the ascii string "eof" - especially lower-cased - would be interpreted as the C macro EOF, which is typically represented as the int -1. Sounds like a tall tale unless you've got proof.
- somat 2y agoI could see a poorly coded stringly parsed interface (think sql) triggering on a mid span character sequence. but I agree, it would have to be a real mess of an interface. For example the client uses "eof" to separate or end queries.
- snailmailstare 2y agoI first had to figure out why the G stayed put if it was being treated as last line... I've seen some terrible things and wouldn't doubt that a lot of pages in say the travel industry have a 2%+ failure rate at recording a signup.
- deleted 2y ago[deleted]
- NoMoreNicksLeft 2y agoThere are more than a few legacy databases where a person's first name wouldn't be lowercased. I worked for a university awhile back, this is post-2010, and names were stored uppercase.
- threeducks 2y agoSorry, I don't have first-hand proof. But it seems that this issue is not rare: https://old.reddit.com/r/programminghorror/comments/4g70lj/someones_name_broke_our_code/ https://old.reddit.com/r/programminghorror/comments/4g70lj/s...
- Sohcahtoa82 2y agoCSV will go down as one of the greatest mistakes in computer programming.
- robin_reala 2y agoColdFusion, if I remember correctly.
- dartos 2y agoNever underestimate the amount of bad ideas in code produced by the lowest bidder.