• (cs) in reply to An apprentice

    Anonymous:
    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!

    Now there's a 'holisitic' approach to the problem.  One which would make Douglas Adams proud!

     

     

    ------------------------------

    If debugging is the process of removing errors,

    programming must be the process of inserting them

  • (cs) in reply to Rick

    This is similar to the choice I give many of my clients (particularly those who are impatiently pushing for shorter deadlines):

    You can have it:

    <FONT size=4>   . Cheap</FONT>

    <FONT size=4>   . Fast</FONT>

    <FONT size=4>   . Right</FONT>

    <FONT size=5>    Choose any two.</FONT>

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


    What the heck do you think a WTF is?


    a wtf occurs when good engineering goes bad.  not just bad engineering....
  • (cs)
    Alex Papadimoulis:

    > SELECT * FROM [YN_Lookups]
     +----+---------------+
     | ID | Text          |
     +----+---------------+
     | 1  | Yes           |
     | 2  | No            |
     | 3  | Not Specified |
     | 4  | NULL          |
     | 5  | Other         |
     | 7  | Unknown       |
     +----+---------------+
    I think they're missing some values.
    8. Maybe
    9. Could be.
    10. Answer hazy. Try again later.
    11. Mu.
    12. Cmdr Taco.
    By the way: what do you suppose happened to 6?
  • (cs) in reply to sao

    Reading through the comments, it's becoming clear that the programmer had remarkable forsight to use INT. It won't be long before one needs to represent over 256 values.

    NULL - ?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

    0 - Zero<o:p></o:p>

    1 - Yes<o:p></o:p>

    2 - No<o:p></o:p>

    3 - Not Specified<o:p></o:p>

    4 - NULL<o:p></o:p>

    5 - NUL<o:p></o:p>

    6 - There is NO Value #6<o:p></o:p>

    7 - Blank<o:p></o:p>

    8 - Empty<o:p></o:p>

    9 - Nothing<o:p></o:p>

    10 - Nil<o:p></o:p>

    11 - Zip<o:p></o:p>

    12 - Unassigned<o:p></o:p>

    13 - Indeterminate<o:p></o:p>

    14 - Unknown<o:p></o:p>

    15 - Unknowable<o:p></o:p>

    16 - Beyond human comprehension<o:p></o:p>

    17 - Maybe<o:p></o:p>

    18 - Partially<o:p></o:p>

    19 - Sometimes<o:p></o:p>

    20 - Yes and No<o:p></o:p>

    21 - Says “no” but means “yes”<o:p></o:p>

    22 - Quantum mechanical<o:p></o:p>

    23 - Missing<o:p></o:p>

    24 - Lost<o:p></o:p>

    25 - File not found<o:p></o:p>

    26 - No Carrier<o:p></o:p>

    27 - I forgot<o:p></o:p>

    28 - Didn't get the email<o:p></o:p>

    29 - The dog ate it<o:p></o:p>

    30 - Invalid value entered<o:p></o:p>

    31 - Unrecognized value entered<o:p></o:p>

    32 - Blatantly absurd value entered<o:p></o:p>

    33 - User had head up his/her ass<o:p></o:p>

    34 - Non-value<o:p></o:p>

    35 - Imaginary value<o:p></o:p>

    36 - Drug-induced hallucination<o:p></o:p>

    37 - It’s a value, Captain, but not as we know it<o:p></o:p>

    38 - This is not the value you are looking for<o:p></o:p>

    39 - Value corrupted<o:p></o:p>

    40 - Value corrupted absolutely<o:p></o:p>

    41 - Untrustworthy value <o:p></o:p>

    42 - Downright evil value<o:p></o:p>

    43 - Worthless value<o:p></o:p>

    44 - Invaluable value<o:p></o:p>

    45 - Family value<o:p></o:p>

    46 - This isn’t really a value<o:p></o:p>

    47 - This isn’t really a field<o:p></o:p>

    48 - This is not my beautiful house<o:p></o:p>

    49 - This is not my beautiful wife<o:p></o:p>

    50 - Error 50<o:p></o:p>

    51 - Error 51<o:p></o:p>

    52 - Etc.<o:p></o:p>

    -1 - Not otherwise specified<o:p></o:p>

    --Rank

  • (cs) in reply to sammybaby
    Somebodys name I cant remember:
    By the way: what do you suppose happened to 6?


    It was probably a status so horrible they decided to remove it from their database.  Something like "Budget Under Review" or "Flowers in May".  So they deleted it, and didn't reseed their identity.
  • bit (unregistered) 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?

    0 ----> 0000 0000 32 ----> 0001 0000

    Just one bit of difference.

  • bit (unregistered) 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?

    0 ----> 0000 0000 32 ----> 0001 0000

    Just one bit of difference.

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


    Yeah... was thinking one bit of difference must mean 00000000 to 00000001... Didn't really occur to me that it could be something other than the least significant bit...
  • (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?

    00 ----> 0000 0000 32 ----> 0010 0000

    Just one bit of difference.

  • d (unregistered) in reply to bit
    Anonymous:
    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?

    0 ----> 0000 0000 32 ----> 0001 0000

    Just one bit of difference.




    ummm, your off by 1

    0010 0000

  • d (unregistered) in reply to bit

    3rd times the charm!!

    Too bad your quotes don't work for you  :(

  • diaphanein (unregistered) in reply to Alexis de Torquemada

    Alexis de Torquemada:
    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!

    Sorry, I'm a little drunk and seemed to have slurred my typing.  I stand corrected.  Cheers! [B]

  • (cs) in reply to d
    Anonymous:
    3rd times the charm!!

    Too bad your quotes don't work for you  :(

    I kept getting errors, but the answers got posted anyway. Even the wrong ones. :)

    Did quoting work this time? Lessee.

  • dasmb (unregistered)

    Allow me to play Devil's Advocate, and claim this is actually an amazingly well modelled piece of fuzzy visibility that tells me everything I need to know about the input procedure.

    Let's assume we closely modelling a boolean field that may, or may not, have been specified and if specified, may or may not have been specified in a parsable format.

    Yes and No are obvious well-parsed cases and the only ones we can really reliably test for.

    A case where the field is absent in the input is also modelled -- as Not Specified.

    However, what if the parser can't parse the input? 

    Well, null tells us that the parser was invoked, but there was no data available -- somebody specified the field, but left it blank.

    Other informs us we received a declared exception to the boolean case -- "Sometimes" or "Maybe" or some other case that's linguistically related to verity, but has no place in our system.

    And Unknown...well, some joker saw the "Is Reportable" field and decided to enter his favorite goalie's name.

    Given a reference to this lookup table, I can now report on how many records are true or false...and how many failed verification and why.  Not clean, I admit, but powerful.

    As for the null and -1 values?  Sounds like a braindead contractor underestimating the power of our fuzzy boolean input field!

  • (cs) in reply to bit
    bit:
    Anonymous:
    3rd times the charm!!

    Too bad your quotes don't work for you  :(

    I kept getting errors, but the answers got posted anyway. Even the wrong ones. :)

    Did quoting work this time? Lessee.

    Why oh God? Why?

  • Gorm Braarvig (unregistered) in reply to Mustafa

    Pardon my alignment, but I hope it's 8 bytes. 64 bit/8 bits per byte...

  • (cs) in reply to GoatCheez

    Not to beat a dead horse (too late) but the difference between null and space in ASCII is 1 if you're referring to the Hamming Distance.

    (Nobody had mentioned it by name yet.)

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

    To all those who didn't get it: Zero (no matter how many bits or whether you mean binary zero or ASCII zero) is not NULL. However, many database systems use "is-NULL" bitfields to mark columns as NULL, so the difference between NULL and non-NULL is always the corresponding bit in this bitfield. Depending on the database the size of the row may shrink too, because some database may not allocate space for fields that are NULL. Others might still allocate the space, because when a (fixed-size) field starts on the same offset for every row, then some queries can be done faster, especially when a table-scan, sort or something similar is necessary.

    Databases are fun.

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

    Sir, I bow to your greatness, you got me rolling on the floor in real life

  • (cs) in reply to toxik

    0 = no
    1 = yes
    Null = Unknown.

    what's the big deal here?  Some one just over engineered it.  lol

  • (cs) in reply to hotzenplotz

    p.s.: the ASCII 'NUL' also is not NULL -- e.g. I can store an ASCII 'NUL' into a char or varchar field. That field would NOT be NULL! And if you think you're smart, just try it.

  • Sloop John B (unregistered)

    My nomination for #6:

    "The truth!  You don't want to know the truth!"

  • Jeremy (unregistered) in reply to hotzenplotz

    Also, lots of databases use empty strings to store NULL's and a single space to store empty strings, by trimming trailing spaces whenever the value is retrieved. And of course a string is usually terminated by a 0 byte.

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



    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.


    Actually, there are 10 types of people:
    • Those who don't understand binary jokes
    • Those who understand binary jokes, and think they're clever, because they always assume that any numeric string containing only 0s and 1s must be a base-two representation
    • Those who understand binary jokes, but think they're flawed, because they realize that a numeric string containing digits from 0 through k could be in any base as long as it's greater than k
    Membership in the latter 10 types also corresponds pretty closely to these 10 types:
    • Those who think the "1 + 1 = 3, for very large values of 1" joke is clever
    • Those who get the whole "treating a numeric string as a variable" joke, and do think that's clever, but are bothered by the "very large values" part. (No: for a very large value of 1, like, say, a million, the expression equals two million, not 3 (unless we're also using a very large value of 3); it only equals three for one specific value of 1.)
    I guess the last type could be further broken down into 10 types, making a total of 10 types:
    • Those who are perfectly aware of the issues I'm complaining about, but think the jokes are clever anyway (and that I'm being annoyingly pedantic)
    • Those who understand that nerd jokes only work when stated correctly (and that pedantry can itself be one of the highest forms of humor)

    <font size=-1>Oh yeah -- self-introduction: been reading for a few months and posted anonymously a couple times; registered a few weeks ago, but didn't actually post until now. Is this where I'm supposed to make my obligatory complaint about the crappy forum software and its lack of a preview button?</font>

  • Suomynona (unregistered) in reply to Rank Amateur
    Rank Amateur:

    (snipped excellent list)


    Great list, with plenty of room for expansion! I'm coopting that for my "InsightfulErrorMessages" module in my next Access project!  But I have a couple observations. The value for NULL would be:

    NULL - "This value intentionally left blank."


    and as for 42,


    42 - Downright evil value


    How can this possibly be so?


    Stoffel:

    (Hamming Distance, NIST DADS site)



    That's a great site Stoffel!


    ammoQ:

    48 (ascii code for "0") = 001100000  (also only one bit different)



    You got an extra significant zero there buddy, that's a reverse quote (#96). But isn't that two bits different from a NUL?


    Michael Bolton:

    No, it's just a coincidence!



    <o:p></o:p>

    Actually this whole table is a WTF! Why is there even a question? You always have to do your TPS Reports!! Didn't you get the memo?
  • Aeriscors (unregistered)

    A bit overdesigned but not especially stupid. If the answer is not a boolean he could have written the text un the Cases table but this version is more secured because of the verification on the FK.
    The only two things I don't understand is WTF there is a "NULL" line in the second table. It is a doubled bloom with the "Not Specified"  one, and WTF  he doesn't  enforce the foreign key, since it cause funny things to happend (like the NULL and -1 line) .
    I guess this is a lame trick to store an other information in this field, maybe. In conclusion the idea is not so bad but realisation sucks.

  • (cs) in reply to Suomynona
    Anonymous:

    ammoQ:

    48 (ascii code for "0") = 001100000  (also only one bit different)



    You got an extra significant zero there buddy, that's a reverse quote (#96).



    right... but in this 9-bit-per byte representation, the rightmost bit is the parity bit and therefore not significant (j/k)



     But isn't that two bits different from a NUL?



    The original quote was:

    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.

    														</span></div></BLOCKQUOTE><br>
    

     coincidentally, "Null" is the German word for Zero.

  • Dan (unregistered) in reply to ParkinT
    ParkinT:

    This is similar to the choice I give many of my clients (particularly those who are impatiently pushing for shorter deadlines):

    You can have it:

    <font size="4">   . Cheap</font>

    <font size="4">   . Fast</font>

    <font size="4">   . Right</font>

    <font size="5">    Choose any two.</font>


    I prefer to give them : Expensive. Unhurried. Wrong. Exclude two.



  • javaxman (unregistered)

    let me guess... the contract was for a government agency?

  • (cs)

    And don't forget

    <FONT face="Courier New" size=2>| 12 | Yuri      |</FONT>

    <FONT face="Courier New" size=2>(http://www.thedailywtf.com/forums/44872/ShowPost.aspx)</FONT>

  • (cs) in reply to Otto
    Otto:

    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.

    Excellent.

    And that's what you get for arguing WTFery with a Sicilian.

    (I've gotta watch that again sometime soon)

  • (cs)

    I'm betting there's more than one TPS Report... and the field 'Is_TPS_Reportable' is really only *part* of a secret formula that when compared against the lookup, reveals the true business rule of TPS reports.

    Also too coincidental - the 'Days Open' field could be resolved to a day-of-the week, which could point to one of options in the lookup table.

    Besides, you can always add three to the 'Is_TPS_Reportable' value to fall safely with the range of lookup values, ( albeit you'll never get to 'Yes', probably a ruse ).

    There's more here than meets the eye... this smacks of intrigue and secret agents.

  • (cs) in reply to sao

    sao:
    Ytram:
    Anonymous:
    This is hardly a wtf, just bad engineering.


    What the heck do you think a WTF is?


    a wtf occurs when good engineering goes bad.  not just bad engineering....

    or when bad engineering goes worse ...

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

    I thought that was "There 11 kinds of people in the world, those that know how to count in binary and those that don't." 

  • (cs)

    Yup, This could work...  Let's first resolve the Days Open value to a day-of-the-week.  Let's consider the -1 as a shift between date systems. Some systems starting Sunday, others Monday.  With that, Monday(1) is always resolved to Sunday(0). So.. Is_TPS_Reportable will return a true TPS report *rule* when 1 is added at the end.

    That could gives us the TPS report business rule:

    Monday(1): always report.
    Tuesday(2): no report.
    Wednesday(3): one of the midweek reports (TBA).
    Thursday(4): no report.
    Friday(5): always the other report.
    Saturday(6): never report. ( nobody does TPS on Saturday)
    Sunday(7): waiting for direction from corporate.

  • (cs) in reply to hotzenplotz
    hotzenplotz:
    p.s.: the ASCII 'NUL' also is not NULL -- e.g. I can store an ASCII 'NUL' into a char or varchar field. That field would NOT be NULL! And if you think you're smart, just try it.

    I have a donut hole

    Rumor has it quotes work in IE...

  • (cs) in reply to chrismcb
    Otto:

    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.



    It's not a matter of comprehension, because if you can't comprehend something, it can hardly be said that you know it and, hence, it would be unknown, so that falls into the previous category.

    The "not specified" to me clearly means that while the value is known, it's being kept secret. The reasons why this would be is numerous, and I would suggest that the designer refactor the design to include another column in the table (or whatever the "technical" DB term is) with another foregin key that indicates why it's being kept secret, be it national security reasons, being held for blackmail, etc.


    (BTW, in addition to the more common WTFs mentioned about this forum software, does it strike anyone as odd that I can post with the name EvanED even when I'm not logged in (purely out of laziness) and despite being registered for a while?)
  • (cs) in reply to EvanED
    EvanED:
    Otto:

    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.



    It's not a matter of comprehension, because if you can't comprehend something, it can hardly be said that you know it and, hence, it would be unknown, so that falls into the previous category.

    The "not specified" to me clearly means that while the value is known, it's being kept secret. The reasons why this would be is numerous, and I would suggest that the designer refactor the design to include another column in the table (or whatever the "technical" DB term is) with another foregin key that indicates why it's being kept secret, be it national security reasons, being held for blackmail, etc.

    Not Specified - implies an option *is* available.
    Unknown - implies an option *may* be available.
    Null- implies *no* options are available.

  • (cs) in reply to olddog

    or this:

    Not Specified - implies an option *is* available.
    Unknown - implies an option *may* be available.
    False - implies *no* options are available.
    Null - make no implication.

  • Zygo Blaxell (unregistered) in reply to BiggBru


    | 6  | Rows that magically disappear when inner-joined with YN_Lookups   |
  • Satan (unregistered) in reply to Zygo Blaxell

    OK, this is F'd up, but its not really difficult - just take the rows where the value is 1 ('Yes") and ignore everything else.  Sometimes a little judgement goes a long way, Paul! ;-)

  • (cs) in reply to Satan

    Anonymous:
    OK, this is F'd up, but its not really difficult - just take the rows where the value is 1 ('Yes") and ignore everything else.  Sometimes a little judgement goes a long way, Paul! ;-)

    Don't the other values make you the least bit curious?

  • Yes, No, I'm not sure (unregistered)

    To me, NULL is No.
     i.e. . . .  '\0' is the  the same as 0
    Hasn't failed me yet, in 20 years of C

    "Not Specified" -- "Other" -- "Unknown" would all map to the same thing.

    Maybe there should have been
    | 8  | Remove from all further consideration




  • Yes, No, I'm not sure (unregistered) in reply to ChiefCrazyTalk
    Anonymous:
    As long as he remembers the new cover sheets for the TPS Reports, he'll be fine.


    LOL

    And a taxi chit for the printer, too
  • Yes, No, I'm not sure (unregistered) in reply to ParkinT

    Old Printer's Joke.

    Bin There. . .   not BinLada


  • Yes, No, I'm not sure (unregistered) in reply to bit

    Yessssss Bit is on the bit.

    three's a charm!

  • Yes, No, I'm not sure (unregistered) in reply to hotzenplotz

    Oh Yeah?   Tell it to the register!

  • DrDoom (unregistered)

    Produce a report that will list the Case Number, Officer Name, and Days Open for all remote offices where the case is TPS Reportable. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

    This is just a thought that I came up within 30 seconds when I first looked at the problem.<o:p></o:p>

    SELECT  * From OfficeDetails where  Is_TPS_Reportable = 1; or<o:p></o:p>

    SELECT  * From OfficeDetails where  Is_TPS_Reportable = "yes"; <o:p></o:p>

    Depends on value that is actually stored there. Who cares if someone placed Null in text field in some other part of the data abase. If you think there is a problem, mention it to them but I fail to see how this is complicated. <o:p></o:p>

  • Yes, No, I'm not sure (unregistered) in reply to Yes, No, I'm not sure
    Anonymous:
    Oh Yeah?   Tell it to the register!



    This software truly is a WTF

Leave a comment on “Yessssssss! Noooooooo!”

Log In or post as a guest

Replying to comment #:

« Return to Article