Representative Line: National Exclamations

Date:

Share:

Carlos and Claire found themselves supporting a 3rd party logistics package, called IniFreight. Like most "enterprise" software, it was expensive, unreliable, and incredibly complicated. It had also been owned by four different companies during the time Carlos had supported it, as its various owners underwent a series of acquisitions. It kept them busy, which is better than being bored.

One day, Claire asked Carlos, "In SQL, what does an exclamation point mean?"

"Like, as a negation? I don't think most SQL dialects support that."

"No, like-" and Claire showed him the query.

select * from valuation where origin_country < '!'

"IniFreight, I presume?" Carlos asked.

"Yeah. I assume this means, 'where origin country isn't blank?' But why not just check for NOT NULL?"

The why was easy to answer: origin_country had a constraint which prohibited nulls. But the input field didn't do a trim, so the field did allow whitespace only strings. The ! is the first printable, non-whitespace character in ASCII (which is what their database was using, because it was built before "support wide character sets" was a common desire).

Unfortunately, this means that my micronation, which is simply spelled with the ASCII character 0x07 will never show up in their database. You might not think you're familiar with my country, but trust me- it'll ring a bell.

[Advertisement]
Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!

Source link

Subscribe to our magazine

━ more like this

Scan, Sign, and Manage Your Documents Right From Your Phone

Disclosure: Our goal is to feature products and services that we think you'll find...

‘”No OT! No exceptions!”. Sure thing boss man’: New manager bans all overtime, leading to understaffed production lines, losing $120,000 in a day, and...

The fantasy that planning replaces people is why plants stall, why teams burn out, and why bosses with slogans last a quarter, not a...

Fashion People are Swapping Sambas For Keen’s Jasper Trainers

I spend my days tracking trends, and usually, when a new style lands on my radar, I can quickly trace its origins and understand...

Perfecting the Girl’s Night Out Look

Ever since having my baby girl 5 months ago, there have been many days where I admittedly didn't put myself first. Okay, so maybe...

Today’s NYT Strands Hints, Answer and Help for Aug. 31 #546

Looking for the most recent Strands answer? Click here for our daily Strands hints, as well as our daily answers and hints for The New...