- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
last!
Admin
If 4 is NULL, then NULL can't be NULL, but by definition NULL is NULL... I'm confused.
Admin
It's just like... whoa...
And what are the "0", negative and NULL values supposed to mean?
Admin
Beware though, "NULL" is not NULL...
Admin
What about 6? Sometimes?
Admin
Unknown is not equal to NULL? who came up with this?
Admin
It's a WTF alright, but it aint that funny IMO >:<br>
However, I would be interested in what the difference between NULL and "Not Specified" is..? And all the other variants of "No".
Admin
As long as he remembers the new cover sheets for the TPS Reports, he'll be fine.
Admin
Interesting that Is_TPS_Reportable has a value of NULL for some cases and 4 for others.
What is an unenforced foreign key anyway? Looks like it should've been enforced.
So, where is the query that he wrote to produce this report?
Looks like he had to jump through hoops to do it.
Admin
#define NULL 4
if(IsNotFalse(NULL))
{
Pizza=Bad;
}
Admin
last post!
Admin
how about the fact that there's a -1 in the cases table that isn't defined in the lookup table... isn't that also not specified or unknown or other...
Admin
This reminds me of my favorite IRC quote:
Person A: You can't tell me that there's one bit of difference between a space and a null.
Person B: That's precisely the difference between a space and a null.
Admin
That's what's meant by "foreign key(unenforced)"...
Admin
<FONT size=4>The joins of inner earth </FONT>
<FONT size=4>T</FONT>hree keys (-1, 0, null) for the left-outer-Elves under the sky
Seven for the YN-Dwarf-lookups in their text "unknown"
Null four Dummy Row, doomed to lie
One for the Table Cases on his tps_reportable throne
<FONT size=4>N</FONT><FONT size=3>o Field to rule them all, One Other Query to find them,
One Join Not Specified to bring them all and in the darkness bind them....</FONT>
Admin
Well, since the specification says produce a report of all those that are TPS_Reportable, then any value but 1/Yes can be ignored. Anything that's not 'Yes' must be 'No', even if it's NULL or 4/NULL. Life can't be that easy, though, I bet...
Admin
Pardon my french but would that not be a byte?
Admin
That's fantastic. *applauds*
Admin
[O]Step 1: Get a rose which has good petals to pluck
Step 2: Say the following. Pluck a petal while saying each statement...
Step 3: Stop for a moment and ponder the possiblities. (A real blank space here, so to say.) Pluck another petal, you've earned it.
Step 4: Repeat steps 2-3 until you're out of petals. Shouldn't be long.. Or is it?? I don't know, I can't say...
Admin
It's so simple. The numbers: 0, 1, 2, 4 are all powers of 2, so they correspond to different bits in the machine word. Assuming that int has 32-bits on the target architecture, we have a 32-valued logic system. It is intuitionistic as well (no law of excluded middle), as -1 tags all bits!
Admin
They forgot FileNotFound.
Admin
What about 6? Sometimes?
It should be obvious: There is no rule #6!<p>
Admin
I'm confused - how do I represent 'File not found' with this system?
Is that what the missing 6 value is for?
Admin
<FONT face="Courier New">I'm sure Alex forgot to include this row:</FONT>
<FONT face="Courier New">| 6 | None of your business, pal! |</FONT>
<FONT face="Courier New">Now I'm starting to understand why DBA's get such a bad rep...</FONT>
Admin
This is hardly a wtf, just bad engineering. Perhaps requirements once dictated several different states, then reduced it, then became "is reportable" which invalidated the originally mandated options outlined by the client, at which case the programmer left and let someone else bother with it.
Either way, this is something that could be redesigned and repaired within a day, possibly even 2 hours. I want to see a WTF that'd make Baby Jesus cry, dammit! [pi]
Admin
Originally attributed to Larry Wall.
Admin
<font size="2">Anyone else think we should get Paul and Paula together? Maybe she can take over his contract for him?
Hey, hey, Paula...
</font>
Admin
The "unknown" option is going to be the kicker because it will likely need some cross referencing with something else that is just as bad as anything you could imagine in order to determine whether or not it will need to be shown on the report.
Admin
The origin of 0 and -1 might make sense if the front end for this database involved Visual Basic. For some reason, VB takes the integer value of true to be -1 instead of 1 and thus 0 and -1 correspond to VB's false and true.
It may be that some VB code somewhere is just converting a boolean value to an integer and then passing it to the database. This complicates things, as one now has to determine if this is indeed the case since records with a -1 value would need to be included in the report if it is.
Admin
not getting the 1 bit difference thing... in ascii at least (what i thought it was refering to) 0 is null and 32 is space... not a bit, but like a bit and then some. technically the only difference is the one bit that is turned on at that spot...i'm probably thinking too hard on this. anyone care to help me out?
Admin
I know that I'd want to take a look at how many records have those "outlier" values, and what those records look like. For example, does the "-1" entry appear in a lot of records? Are they "junk" records? It's seriously messed up, but there could still be hope that, say, all but a couple of the records are "1s" and "2s" (Yes and No).
You don't want to know how messed up other real-life databases are that help manage national infrastructure for multi-billion dollar companies.
Admin
00 == 00000000
32 == 00100000
Admin
Some versions of BASIC only have bitwise AND, OR and NOT, so (NOT 0) = -1.
Admin
There are 10 types of people in this world. Those that understand binary jokes, and those who don't.
Admin
48 (ascii code for "0") = 001100000 (also only one bit different)
Admin
ASCII 0 is NUL, not "null". Four letter words were too expensive back then. Come to think about it - four letter words are still quite expensive!
Admin
What the heck do you think a WTF is?
Admin
could someone explain the difference between "not specified", NULL and "unknown"?
Admin
This is something that made me say F (I usually cut out "WT"), so IMO it's a WTF in the most literal meaning of WTF.
Admin
I am totally on board with this WTF. Our schema is filled with this crap. I love trying to find out which table it is supposed to be referring to (if any) when the column names are different.
Admin
In answer to a Yes/No prompt, these answers might be accepted:
Yes Yes
No No
_blank_ Not Specified
_return_ NULL
Sure Other
Maybe Other
sasdff Unknown
Makes perfect sense.
Admin
It's a great WTF, but it's the NULL foreign key value that makes this a classic!
Admin
Obvious WTF, this is not nearly a complete list:
It's misssing the following:
8. isTrue
9. isFalse
10. FileNotFound
11. isNotTrue
12. isNotFalse
13. TrueWhenFalse
14. FalseWhenTrue
........
Admin
You're on the right track. 6 means "Missing Data", so obviously, it's...
Admin
I would say that "not specified" and NULL are empty values. "unknown" and "other" are non empty values that are not yes or no. Of course I also would have thought that Is_TPS_Reportable would have been Yes/No exclusively...
On another note, I am sure I would be ROTFL, but I am missing the insides of the FileNotFound. I am assuming its an old WTF?
Cross fingers, hopes quoting works.
Admin
Admin
"Constraints? We ain't got no constraints. We don't need no constraints.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
I don't have to show you any stinking constraints!"
-or-
"These aren't the contraints you're looking for."
Admin
Does "Not Specified" equal "Maybe"? Maybe it means "Sometimes"
Admin
FileNotFound is the third possible boolean value, along with True and False. While they don't teach this third possible boolean option in most of your "conventional" educational institutes, we've found some out of the box thinking in previous WTFs that showed production applications of this concept.
<font color="Red"> Something didn't quite work out ...
- CAPTCHA Validation Incorrect </font>
Admin
"Unknown" clearly implies that the value which should be in the field is not known by any mortal agency. While "not specified" implies that the value is known, it is simply not given here, possibly because the user could not possibly comprehend it. The fact that there is a seperate "NULL" from an actual SQL NULL value shows that it is a special sort of "NULL", which implies both that there is no such value and that your query for it is obviously deluded in the extreme. Such a value only showcases the users own ignorance for asking such a silly question in the first place.
These are three easily distinguishable cases, as is obvious to anybody experienced in bureaucracy.