NOT_TRUE_OR_FALSE

|

A big thread on The Daily WTF has opened up on the topic of tri-state booleans. A majority of folks seem to be rushing to the defense of today's offender, who has introduced a constant named NOT_TRUE_OR_FALSE into his code. This kind of abuse is very common and has always driven me nuts.

There is one voice of reason (with a lame handle, "Dude Guy") amidst the madness, though:

This is just [the] good old problem of representing unknown information on a database, on which many people have written a fair amount, of which many, many more have read nothing. One classic problem: there is a difference between using a third value to represent "the real-world entity represented by this record has a value for this, but it is unknown," "the entity represented could have a value for this in the real world, but it actually happens not to have one," and "the real world is such that the entity described can't have a value for this." In short, people tend to systematically confuse data that represents facts about the real-world entities [with] questions and metadata about the completeness of the representation.

Thank you, Dude Guy, whoever you are.

About

My name is Patrick Calahan.

I live in San Francisco.

I do product development and consulting on Java and Business Intelligence.

This is my blog.

Contact

About this Entry

This page contains a single entry by published on February 22, 2006 12:04 PM.

Starburst was the previous entry in this blog.

Massively Multiplayer Pong is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.01