Nulls are Evil


Nulls terrify me.


There is something passive aggressive about them.  It’s not just that they lurk there in the darkness, unknown, unobserved, biding their time, showing up at the worst possible moments with shotguns blazing, blowing holes into my programs.  It’s more than that.  It’s something more insidious, deep and unsettling.  


I truly believe nulls are evil.  And not you average run-of-the-mill bad-for-you-like-donuts evil.  I’m talking ground-shaking, god-forsaken, burning eye of Mordor evil.  There is a quality about them that cannot be denied.  A null is a power unto itself, a dark primitive energy, a grey void of nothingness that consumes everything.  Dare not look into one lest you go blind. Dare not try to understand one lest you go mad.


I did look once.  I saw beyond the event horizon and peered into the truth.  I saw the absence of being, the uncertainty, the ambiguousness.  I realized then that nulls were truly unknowable.  That they weren’t actually nothing, nor were they anything in particular.  They were any and all, yet still undefined, unpinnable.  Always potential, never anything real; the energy of all they could be and yet never will. 


That’s what makes them so dangerous.  They don’t just sit there, satisfied with their un-being.  They reach out, surround, and permeate. They are like pariahs, vampires, feeding off everything that is missing, becoming the sum of all that is not there, filling the in-between, becoming the echo of everything left unsaid.


Nulls are antimatter.


Comments (21)

  1. Jerry says:

    <grin>Dude, what a zero of a blog entry</grin>

  2. The Contrarian says:

    I must disagree. Nulls transcend not only truth but the injustice of structure. They represent the ability of man to overcome the academic constraints of normalism. They are the bar-benders of databases incarcerated out of sight of performance’s polite society, whilst null-wielding, website-supporting data layers drink from the overflowing cup of denormalized structures.

    Nulls click their heels and take flight, soaring over the cries of anguished DBAs, with near-imperceptible beats of flexible, lightweight wings.

    Canutic procrastinators sit self-satisfied whilst the majestic white-crested tide advances unknowably towards them, its strength born of the tumultuous forces present yet unseen within its troughts. The humble developer approaching such magnificence has but a simple choice to make: surf, or sink.

  3. Don Demsak says:

    Nulls can’t be anti-matter, since anti-matter is still something, and null is the absence of everything.

    Nulls are a vacuum, and you know nature abhors a vacuum.

  4. Jim says:

    Was it too much coffee, a long stack trace, or a late night that caused this blog?

  5. Matt,

    i assume you would be the perfect person to help me in my struggles concerning non-nullable types be added to the clr asap. even a [NonNullable] attribute would be extremely helpful – it would make nullpointer errors, a major industrie problem, go away in a second…

    given the current hooply about nullable types (whoever though _that_ would be helpful… ?) – adding non-nullable should be trivial for the clr guys.

    WM_<G>

    thomas woelfer

  6. Matt says:

    Agreed.

    There is something inately incorrect about storing "nothing" or the "absence of something" in your data model and especially your database. When has the assumption of "If it doesn’t exist, THEN IT SHOULD NOT EXIST" change into "If it doesn’t exist, MARK IT AS NULL."

    Now, I’m not religious to the point of NEVER using them; but they are, at least, a harbringer of pause and a catalyst to momentarily say "Are we doing something wrong here?"

  7. I have to admit, antimatter was a bit of a stretch.

  8. jonnosan says:

    Relax. Embrace the void. Coalesce, even.

  9. Coalescence? That’s just pretending the problem does not exist, converting nulls into meta-nulls.

  10. Null Vader says:

    Join the dark side, Matt.

  11. Richard@Home says:

    Just a minor point:

    Null doesn’t mean ‘nothing’, it means ‘unknown’ – and there is definitely a need to differentiate between the two.

    If something is nothing, it’s value is known (it’s value is nothing). If it is not known then it’s not nothing until its been confirmed. Then it would be nothing, not Null.

    Ouch, my head hurts.

  12. Glenn Morton says:

    i have almost finsihed developing a id3 library, however; for every method that parses in a stream as a parameter i check to see if the stream is null, is this good practice, over kill, or not necessary at all?? any help would be much appreciated?

    thanks

    glenn morton

  13. Diego says:

    <i>Richard@Home wrote:

    Null doesn’t mean ‘nothing’, it means ‘unknown’ – and there is definitely a need to differentiate between the two. </i>

    I almost disagree. A null value represents a row that should not exist, in a table that should exist but doesn’t. Hence, and following relational theory, null means "there is no element in this set that corresponds to the primary key trough the mapping function".

    IMO, if this translates better to “unknown” or to “nothing” depends on the semantics of the column.

    In most cases, I rather prefer allowing for a default value of “0” (meaning "Undefined") to my codified columns than to allow for nulls.

    On some other cases, like a MiddleName column, I would allow for null values, but even then, it is likely that assuming a meaning of "nothing" for a null value is safe.

  14. Моё предыдущее сообщение о try/catch/finally вызвало много эмоций и споров. Толь

  15. Моё предыдущее сообщение о try/catch/finally вызвало много эмоций и споров. Толь

  16. Моё предыдущее сообщение о try/catch/finally вызвало много эмоций и споров. Толь

  17. Моё предыдущее сообщение о try/catch/finally вызвало много эмоций и споров. Толь

  18. Моё предыдущее сообщение о try/catch/finally вызвало много эмоций и споров. Толь

  19. Моё предыдущее сообщение о try/catch/finally вызвало много эмоций и споров. Толь

Skip to main content