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.
