• poster (unregistered)

    last!

  • (cs)

    If 4 is NULL, then NULL can't be NULL, but by definition NULL is NULL... I'm confused.

  • (cs)

    It's just like... whoa...

    And what are the "0", negative and NULL values supposed to mean?

  • (cs) in reply to hash
    hash:
    If 4 is NULL, then NULL can't be NULL, but by definition NULL is NULL... I'm confused.

    Beware though, "NULL" is not NULL...

  • seriously_wtf (unregistered) in reply to masklinn
    masklinn:

    It's just like... whoa...

    And what are the "0", negative and NULL values supposed to mean?



    What about 6?  Sometimes?
  • (cs) in reply to seriously_wtf

    Unknown is not equal to NULL? who came up with this?

  • toxik (unregistered)

    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".

  • ChiefCrazyTalk (unregistered) in reply to poster

    As long as he remembers the new cover sheets for the TPS Reports, he'll be fine.

  • (cs)

    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.

  • (cs) in reply to ChiefCrazyTalk

    #define NULL 4

    if(IsNotFalse(NULL))

    {

       Pizza=Bad;

    }

     

  • Anonymous (unregistered) in reply to ferrengi

    last post!

  • Pedro (unregistered)

    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... 

  • diaphanein (unregistered) in reply to masklinn
    masklinn:
    hash:
    If 4 is NULL, then NULL can't be NULL, but by definition NULL is NULL... I'm confused.

    Beware though, "NULL" is not NULL...

    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.

  • (cs) in reply to Pedro
    Anonymous:
    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... 


    That's what's meant by "foreign key(unenforced)"...
  • (cs)

    <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>

  • (cs)

    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...

  • Mustafa (unregistered) in reply to diaphanein
    Anonymous:

    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.

    Pardon my french but would that not be a byte?

  • (cs) in reply to OneFactor
    OneFactor:

    <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>



    That's fantastic.  *applauds*
  • Sloop John B (unregistered)

    [O]Step 1:  Get a rose which has good petals to pluck

    Step 2:  Say the following. Pluck a petal while saying each statement...

    • "I don't know"
    • "It's unspecified"
    • "It's a blank to me"

    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...

     

     

  • An apprentice (unregistered)

    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!

  • Nimrand (unregistered) in reply to Sloop John B

    They forgot FileNotFound.

  • Waterford0069 (unregistered) in reply to seriously_wtf

    What about 6? Sometimes?

    It should be obvious: There is no rule #6!<p>

  • (cs)

    I'm confused - how do I represent 'File not found' with this system? 

    Is that what the missing 6 value is for?

  • (cs)

    <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>

  • JC (unregistered) in reply to ChiefCrazyTalk

    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]

  • black_rock (unregistered) in reply to diaphanein
    Anonymous:
    masklinn:
    hash:
    If 4 is NULL, then NULL can't be NULL, but by definition NULL is NULL... I'm confused.

    Beware though, "NULL" is not NULL...

    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.

    Originally attributed to Larry Wall.

  • (cs) in reply to OneFactor

    <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>

  • d (unregistered) in reply to sinistral
    sinistral:
    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...


    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.

  • (cs)

    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.

  • (cs) in reply to diaphanein
    Anonymous:
    masklinn:
    hash:
    If 4 is NULL, then NULL can't be NULL, but by definition NULL is NULL... I'm confused.

    Beware though, "NULL" is not NULL...

    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.



    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?
  • (cs) in reply to An apprentice

    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.

  • d (unregistered) in reply to GoatCheez

    00 == 00000000
    32 == 00100000

  • (cs) in reply to limelight
    limelight:

    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.



    Some versions of BASIC only have bitwise AND, OR and NOT, so (NOT 0) = -1.
  • DaveNY (unregistered) in reply to GoatCheez
    GoatCheez:
    Anonymous:
    masklinn:
    hash:
    If 4 is NULL, then NULL can't be NULL, but by definition NULL is NULL... I'm confused.

    Beware though, "NULL" is not NULL...

    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.



    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?


    There are 10 types of people in this world. Those that understand binary jokes, and those who don't.
  • (cs) in reply to d
    Anonymous:
    00 == 00000000
    32 == 00100000


    48 (ascii code for "0") = 001100000  (also only one bit different)
  • (cs) in reply to GoatCheez
    GoatCheez:
    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?


    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!

  • (cs) in reply to JC
    Anonymous:
    This is hardly a wtf, just bad engineering.


    What the heck do you think a WTF is?
  • (cs)
    Alex Papadimoulis:
    > SELECT * FROM [YN_Lookups]
     +----+---------------+
     | ID | Text          |
     +----+---------------+
     | 1  | Yes           |
     | 2  | No            |
     | 3  | Not Specified |
     | 4  | NULL          |
     | 5  | Other         |
     | 7  | Unknown       |
     +----+---------------+


    could someone explain the difference between "not specified", NULL and "unknown"?
  • (cs) in reply to JC
    JC:
    This is hardly a wtf, just bad engineering.


    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.
  • (cs)

    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.

  • (cs) in reply to t-bone
    t-bone:
    Alex Papadimoulis:
    > SELECT * FROM [YN_Lookups]
     +----+---------------+
     | ID | Text          |
     +----+---------------+
     | 1  | Yes           |
     | 2  | No            |
     | 3  | Not Specified |
     | 4  | NULL          |
     | 5  | Other         |
     | 7  | Unknown       |
     +----+---------------+


    could someone explain the difference between "not specified", NULL and "unknown"?

    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.
  • (cs) in reply to Rick

    It's a great WTF, but it's the NULL foreign key value that makes this a classic!

  • 3A (unregistered)
    Alex Papadimoulis:

     +----+---------------+
     | ID | Text          |
     +----+---------------+
     | 1  | Yes           |
     | 2  | No            |
     | 3  | Not Specified |
     | 4  | NULL          |
     | 5  | Other         |
     | 7  | Unknown       |
     +----+---------------+

    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

    ........

  • (cs) in reply to Slacker

    Slacker:
    I'm confused - how do I represent 'File not found' with this system? 
    Is that what the missing 6 value is for?

    You're on the right track. 6 means "Missing Data", so obviously, it's...

  • (cs) in reply to t-bone

    t-bone:

    could someone explain the difference between "not specified", NULL and "unknown"?

     

    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.

  • John (unregistered) in reply to 3A
    1. Brillant
  • (cs)

    "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."

  • (cs)

    Does "Not Specified" equal "Maybe"? Maybe it means "Sometimes"

  • joe_bruin (unregistered) in reply to chrismcb
    chrismcb:

    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?



    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>
  • (cs) in reply to t-bone

    t-bone:

    could someone explain the difference between "not specified", NULL and "unknown"?

    "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.

     

Leave a comment on “Yessssssss! Noooooooo!”

Log In or post as a guest

Replying to comment #:

« Return to Article