The SQL NULL; How Computer Nerdery Can Ease Your Life

(NOTE: Based on time elapsed since the posting of this entry, the BS-o-meter calculates this is 4.824% likely to be something that Ferrett now regrets.)

Bear with me while I fog y’all up with nerdiness. But trust me. It comes back around to giving you a concept that might make your life a little easier.
(Assuming you don’t have this concept down already, in which case, hey, it’s like putting on that “Greatest Hits” album of old favorites.)
Anyway. Computers store data. If you give a business your name, they’re going to want your address. If you give a business your address, they’re going to want a phone number to call. If you give them a phone number to call, they’re going to want an email address to spam you…
And so on.
When computers store that data, they can store the number you gave them: 555-555-5555. That gets plunked down into the “phone number” field in their storage.
Or, if you lie and say you don’t have a phone, you’re a homeless man who will never contact them again, they will dutifully enter a blank space in that field. That means, definitively, “This customer does not have a phone number.”
Yet if you’re a comp-sci major, you’ll remember the third value that can go in that field:
NULL.
NULL means “We don’t know.”
Putting a NULL in the phone number means, “This customer might have a phone number, they might not, but we have no current way of knowing what it is.” A customer service rep might enter that if you didn’t answer all their questions, but they wanted to keep your address.
A “don’t know” is different than a “Doesn’t.” A customer rating a movie as “Haven’t seen” is actually different than a customer not having told us whether they’ve seen this movie or not. And if you’re doing queries of data, you often want to be able to look at what you don’t know.
And NULL “don’t-know” values get treated weirdly, particularly in math. What’s 2 + NULL? Well, if you turn that into 2 + “We don’t know”, the answer is obviously “We still don’t know” – which means that any equation that involves a NULL in it emerges as the mathematical equivalent of a shrug. We don’t know!
And the way this nerdery applies to ordinary life is that I said this on Twitter the other day:
“It’s always weird when total strangers tell me they’re disappointed in me. I only get worried when people I respect tell me I’ve fucked up.”
To which someone replied:
“Just because you don’t know someone doesn’t mean they don’t have a valid point.”
And I thought, “That’s potential NULL behavior.”
Admittedly, I phrased it wrong – I should have said “I only get worried when people I respect say they’re disappointed,” as the feedback of strangers can be of deep concern when they present valid reasons – but the mathematical point is that most people seem to think there’s only two ways to go:
1) The disappointment of these people I’ve never interacted with is something to be concerned about, or:
2) The disappointment of these people I’ve never interacted with *is not* something to be concerned about.
Me? I get by with a healthy dosage of NULL.
I don’t know these people. I cannot say whether their judgment is sound enough for me to be concerned about one way or the other by the withdrawal of their approval – at least not without research I’m not willing to do right now. I don’t have to cling to a binary judgment that this is good or bad – I can simply say UNKNOWN VALUE, and treat it as such.
NULLs are really handy in all sorts of places.

  • Is my ex-girlfriend a better person now? NULL. (I’m not willing to hang out with them and find out, but maybe they’ve improved. Who knows? They hurt me enough in the past that I’m unwilling to risk it.)
  • Is this person who said a dumb thing online truly as a bigot in every way? NULL. (They said one dumb thing, but everyone fucks up once in a while. Then again, maybe investigation would turn up a lot of other dumb things they’ve said that leads to a reasonable conclusion they *are* that bad. Yet with only one data point, all we can logically say is “They said this dumb thing for unknown reasons.”)
  • Is this blogger as good as they present themselves online? NULL. (As I know all too well, it’s easy to look good when you control the stage!)

And I think once you internalize a bit of NULL-ness, you relax as you realize that you don’t need to have a snap judgment on everything.
Fitting every unknown into a “yes” or “no” gets exhausting, anyway. You start to get attached to that answer. Once you’ve decided on your answer with your limited data, your mind starts to defend it, and then suddenly that unknown person who’s disappointed in you slots firmly into one category or another. If it turns out that someone who you’ve categorized as “not worth your time” starts following up with other good points, you fight the data (“This person’s saying things I respect!”) because you’ve come to a conclusion (“They’re not worth listening to!”) and everyone hates to be proven wrong.
Whereas with a NULL, I’m literally not saying whether the disappointment of someone I’ve never met is worthwhile or not. It could be either way. But I talk to a lot of strangers, and if I followed up on every unknown in my life, I’d never get anything done.
Leaving it unknown is fine. With the NULL, I can wait for further data to present itself, if it does, and then form other decisions from there.
Learn to love the NULL. You do not have to possess an answer for everything. And your life gets a lot easier when you realize, “Hey, I don’t know, and I may not necessarily have to know, and this ambiguous state is okay.”  You can free up a lot of cycles withholding judgment, enabling you more energy to go investigate the things that do matter deeply to you.
And you can do things without having to have a foregone conclusion. As I write this, is this a really obvious thing to say? Or is it something that might be of use to enough people that it’s worth publishing?
As I hit the submit button, my answer is NULL.  And that, too, is okay.

All Comments Will Be Moderated. Comments From Fake Or Throwaway Accounts Will Never Be approved.