• Benzaholic (unregistered)

    And how might we map this to numeric values? 1, 0, 42?

    (I couldn't pass up the chance for my very first comment on TDWTF to be a possible first on a subject.)

  • Seb (unregistered)

    I think he meant to call the enum "bull"

  • Ken Greene (unregistered)

    Ya also gotta love the way that "True"s value is zero in that enum as well - so if you do a:

    Bool check = True; if(check) { // blah blah blah }

    It will always fail.

    Or even: Bool launchNukes = False; if(launchNukes)...

    It's all fun and games 'til someone loses an eye!

  • John Bigboote (cs)

    Less is more, and this is the haiku of WTFs.

  • bcat (unregistered)

    May I be the first to say: brillant!

  • richdiggins (unregistered)

    the real WTF is that I am at work today!

  • rezna (unregistered) in reply to richdiggins
    Anonymous:
    the real WTF is that I am at work today!

    well i've been in work also on saturday and sunday, and i plan to work tommorow as well.

    P.S. i'm not american ;)

  • Pyromancer (unregistered) in reply to rezna

    Dang! That one never gets old

  • BiggBru (cs)

    <font face="Georgia">What is Truth? There's only one entity that can not only define, but redefine True Truth.</font>

    <font face="Georgia">The White House.</font>

    <font face="Georgia">&gt;BiggBru</font>

  • lemon (unregistered) in reply to rezna
    Anonymous:
    Anonymous:
    the real WTF is that I am at work today!

    well i've been in work also on saturday and sunday, and i plan to work tommorow as well.

    P.S. i'm not american ;)



    I work today - I'm Canadia. We should get today off but my employer gave me friday off instead (Sat. was Canada Day)

  • Grovesy (unregistered) in reply to lemon

    Ahh classic.

    Who remembers the 'NotTrueOrFalse' one?

  • Kazan (unregistered) in reply to BiggBru
    BiggBru:

    <font face="Georgia">What is Truth? There's only one entity that can not only define, but redefine True Truth.</font>

    <font face="Georgia">The White House.</font>

    <font face="Georgia">&gt;BiggBru</font>



    off to the reeducation camp with you!




    captcha: whiskey
  • Anton (unregistered)

    Which is the chain of thought that makes you think:

    - When you open a file you can return a true if everything is correct

    - False if anything went wrong (network timeout, locked file,...)

    - FileNotFound if:

       - When used in a function that opens a file and the fie doesn't exist

       - When used in a mission critical database and you want your customers to sign for 24-7 support, example:

             - Hello, I'm trying to record a new order and the system keeps giving a FileNotFound error

             - Do you have a backup? (that was my preferred question when I worked at a help desk)

  • Guido (unregistered) in reply to Anton

    I'm not sure if this guy thought about philosophical implications of logic values and what truth values really mean, but it isn't entirely clear and evident that there's only "true" and "false" in logic - although for binary-only computer systems, it is quite convenient to assume so.

    Have a look here (Wikipedia) for some pointers into the direction of modal logic and other systems that include a third logical value.

  • JBL (cs) in reply to Benzaholic
    Anonymous:

    And how might we map this to numeric values? 1, 0, 42?

    (I couldn't pass up the chance for my very first comment on TDWTF to be a possible first on a subject.)

    In my distant past, I heard of a tribe somewhere that uses 1, 2 and "many." Though the odd physicist or banker might argue, I often wonder whether our system is an improvement. (For instance, they don't get overflow errors.)
  • ChiefCrazyTalk (unregistered) in reply to richdiggins
    Anonymous:
    the real WTF is that I am at work today!

    The real WTF is that I'm unemployed and the guys whose code is so horrible that it makes this web site are not.

  • Spacen (unregistered) in reply to Guido

    There isn't anything much wrong with that enum that I can see. Logic doesn't have to be true or false.

    Nothing wrong with saying: It's true, it's false, or we don't know.

    Oval uses 6 logic results that can be combined with other results ( http://tinyurl.com/h9yc2 )

    look for <font face="Times" size="3"><span style="font-size: 18px; font-family: Times;">== DirectivesType ==</span></font>

  • André (unregistered) in reply to Grovesy

    Well, in Progress 4GL a boolean variable (called logical) can be true, false or undefined (displayed as ?).
    Sometimes this can be useful.
    At least you can forbid undefined values in the database.

  • Looce (unregistered)
    Alex Papadimoulis:

    With most Americans (including myself) enjoying a long, Indepdence Day Weekend, here's another classic ...

    enum Bool 
    { 
        True, 
        False, 
        FileNotFound 
    };

    Aha! I finally found FileNotFound!

    But then, if I found FileNotFound, does the third enum member become FoundFileNotFound? Or does the file become found? My eyes! They're burning! The goggles, they do nothing!

    Captcha = paula :D

  • rezna (unregistered) in reply to lemon
    Anonymous:
    Anonymous:
    Anonymous:
    the real WTF is that I am at work today!

    well i've been in work also on saturday and sunday, and i plan to work tommorow as well.

    P.S. i'm not american ;)



    I work today - I'm Canadia. We should get today off but my employer gave me friday off instead (Sat. was Canada Day)

    we have our "czech days" on 5th and 6th - but i'll work as well. i think this illness is called workoholism ;)

  • Calli Arcale (unregistered)

    Lovely.  ;-)  Presumably this is how the coder in question attempted to handle error conditions.  If he thinks of enough error conditions, Bool could come to have quite a few values....

    It also reminds me of my own WTF: int passfail.  Apart from being stupidly named, passfail could have three values.  Alas, I do not remember what they were.  It's been seven years, and the versions of the code preserving my stupidity are no longer kept around in an easy-to-access location.  (Thank goodness!)

  • Marcos Dione (unregistered)

    ... and I won't sucumb to your UnknownException trichotomies!

  • lucky luke (cs) in reply to ChiefCrazyTalk
    Anonymous:
    Anonymous:
    the real WTF is that I am at work today!

    The real WTF is that I'm unemployed and the guys whose code is so horrible that it makes this web site are not.



    hmmm... i wonder why?? maybe if you learned proper grammar you would be employed ;)

  • ParkinT (cs)
    Alex Papadimoulis:

     

    enum Bool 
    { 
        True, 
        False, 
        FileNotFound 
    };

     

    There are 10 types of people..

    • Those who understand binary
    • Those who don't

     

  • ParkinT (cs) in reply to Looce
    Anonymous:
    Alex Papadimoulis:

    With most Americans (including myself) enjoying a long, Indepdence Day Weekend, here's another classic ...

    enum Bool 
    { 
        True, 
        False, 
        FileNotFound 
    };

    Aha! I finally found FileNotFound!

    But then, if I found FileNotFound, does the third enum member become FoundFileNotFound? Or does the file become found? My eyes! They're burning! The goggles, they do nothing!

    Captcha = paula :D

    If you set out to fail and are successful, then what have you done?

  • Looce (unregistered) in reply to lucky luke

    lucky luke:
    Anonymous:
    Anonymous:
    the real WTF is that I am at work today!
    The real WTF is that I'm unemployed and the guys whose code is so horrible that it makes this web site are not.


    hmmm... i wonder why?? maybe if you learned proper grammar you would be employed ;)

    That message has correct grammar.

    '(The real WTF) is [[that I'm unemployed] and [((the guys) whose code is [so horrible that it makes this web site]) are not]].'

  • dept non style dep (unregistered) in reply to ParkinT
    Maybe this enhancement can work:

    redefine enum Bool
    {
    True: Bool.True,
    False: Bool.False,
    NoTrue: !Bool.True;
    NoFalse: !Bool.False;
    NoTrueOrFalse: !Bool.True or !Bool.False;
    };

    --Tei
  • diGriz (cs)

    I would've thought it would be

    <font face="Courier New">enum Bool<br>{<br>    True,<br>    False,<br>    Maybe,<br>    Dunno,<br>    What<br>};<br><br></font>

  • Looce (unregistered) in reply to ParkinT
    ParkinT:

    If you set out to fail and are successful, then what have you done?

    <font face="Courier New" size="2">enum Bool {<br>&nbsp;&nbsp;&nbsp;Success,<br>&nbsp;&nbsp;&nbsp;Failure,<br>&nbsp;&nbsp;&nbsp;FailureToSucceed,<br>&nbsp;&nbsp;&nbsp;SuccessInFailing<br>}</font>

    Captcha = truthiness :) How fitting.
  • John Smallberries (cs) in reply to lemon
    Anonymous:
    Anonymous:
    Anonymous:
    the real WTF is that I am at work today!

    well i've been in work also on saturday and sunday, and i plan to work tommorow as well.

    P.S. i'm not american ;)



    I work today - I'm Canadia. We should get today off but my employer gave me friday off instead (Sat. was Canada Day)

    Well, I worked Saturday, Sunday, today and will work tomorrow. And I'm an American.

    Now that's a WTF. Aren't we supposed to be lazy?

  • Reeeeeaaaaaaly? (cs) in reply to Benzaholic
    Anonymous:

    And how might we map this to numeric values? 1, 0, 42?

    (I couldn't pass up the chance for my very first comment on TDWTF to be a possible first on a subject.)

    May I inquire: what is the significance of '42' ? Obviously a running joke I missed...

  • Reeeeeaaaaaaly? (cs) in reply to ChiefCrazyTalk

    Anonymous:
    Anonymous:
    the real WTF is that I am at work today!
    The real WTF is that I'm unemployed and the guys whose code is so horrible that it makes this web site are not.

    You win!

  • marvin_rabbit (cs) in reply to Looce
    Anonymous:

    lucky luke:
    Anonymous:
    Anonymous:
    the real WTF is that I am at work today!
    The real WTF is that I'm unemployed and the guys whose code is so horrible that it makes this web site are not.


    hmmm... i wonder why?? maybe if you learned proper grammar you would be employed ;)

    That message has correct grammar.

    '(The real WTF) is [[that I'm unemployed] and [((the guys) whose code is [so horrible that it makes this web site]) are not]].'


    So, If I'm working on a project and writing horrible code...  If I can manage to repeatedly make it a little bit more horrible, eventually it reach a point that a "Community Server" message board will suddenly appear.

    Yeah, I'll buy that.
  • Zaphod Beeblebrox (unregistered) in reply to Reeeeeaaaaaaly?

    Read Hitchhiker's Guide to the Galaxy, or see Wikipedia:

    http://en.wikipedia.org/wiki/42_%28number%29#In_pop_culture

  • John Smallberries (cs) in reply to Reeeeeaaaaaaly?
    Reeeeeaaaaaaly?:
    Anonymous:

    And how might we map this to numeric values? 1, 0, 42?

    (I couldn't pass up the chance for my very first comment on TDWTF to be a possible first on a subject.)

    May I inquire: what is the significance of '42' ? Obviously a running joke I missed...



    http://en.wikipedia.org/wiki/The_Answer_to_Life,_the_Universe,_and_Everything
  • Reeeeeaaaaaaly? (cs) in reply to lucky luke

    lucky luke:
    Anonymous:
    Anonymous:
    the real WTF is that I am at work today!
    The real WTF is that I'm unemployed and the guys whose code is so horrible that it makes this web site are not.


    hmmm... i wonder why?? maybe if you learned proper grammar you would be employed ;)

    What's wrong with the grammar? It's a little bit of a run-on sentence, but it's grammatically correct.

  • diGriz (cs) in reply to Reeeeeaaaaaaly?
    Reeeeeaaaaaaly?:
    Anonymous:

    And how might we map this to numeric values? 1, 0, 42?

    (I couldn't pass up the chance for my very first comment on TDWTF to be a possible first on a subject.)

    May I inquire: what is the significance of '42' ? Obviously a running joke I missed...


    You should read this book: http://www.amazon.com/gp/product/0345391802
  • Reeeeeaaaaaaly? (cs) in reply to Looce
    Anonymous:

    lucky luke:
    Anonymous:
    Anonymous:
    the real WTF is that I am at work today!
    The real WTF is that I'm unemployed and the guys whose code is so horrible that it makes this web site are not.


    hmmm... i wonder why?? maybe if you learned proper grammar you would be employed ;)

    That message has correct grammar.

    '(The real WTF) is [[that I'm unemployed] and [((the guys) whose code is [so horrible that it makes this web site]) are not]].'

    I've never seen anyone fully parenthesize a sentence before - I'm impressed :)

  • Reeeeeaaaaaaly? (cs) in reply to diGriz

    diGriz:
    I would've thought it would be

    <font face="Courier New">enum Bool<br>{<br>&nbsp;&nbsp;&nbsp; True,<br>&nbsp;&nbsp;&nbsp; False,<br>&nbsp;&nbsp;&nbsp; Maybe,<br>&nbsp;&nbsp;&nbsp; Dunno,<br>&nbsp;&nbsp;&nbsp; <strong><u>What</u></strong><br>};<br><br></font>

    Come on now, do it right:

    WTF

  • diGriz (cs) in reply to Reeeeeaaaaaaly?
    Reeeeeaaaaaaly?:

    diGriz:
    I would've thought it would be

    <font face="Courier New">enum Bool<br>{<br>&nbsp;&nbsp;&nbsp; True,<br>&nbsp;&nbsp;&nbsp; False,<br>&nbsp;&nbsp;&nbsp; Maybe,<br>&nbsp;&nbsp;&nbsp; Dunno,<br>&nbsp;&nbsp;&nbsp; <strong><u>What</u></strong><br>};<br><br></font>

    Come on now, do it right:

    WTF

    Originally, I was thinking of Eh, but then I thought: what the hell...
  • Eq (unregistered)

    I think it's a bit soon to be repeating things that were posted so recently. Most readers probably still remember them well! (Ha ha, the captcha word is "billgates".)

  • Looce (unregistered) in reply to Eq

    Anonymous:
    I think it's a bit soon to be repeating things that were posted so recently. Most readers probably still remember them well! (Ha ha, the captcha word is "billgates".)

    That's for sure, given that this particular WTF (FileNotFound) has turned into a running joke.

    But do you remember the "[file name] is already exist. Are you file update?" dialog in a Pop-up Potpourri? I tink not. :)

    Captcha = quality

  • Looce (unregistered) in reply to Looce

    "I tink not": think

  • richdiggins (unregistered) in reply to rezna

    obviously, you make more than I...

    time != money

  • JBL (cs) in reply to diGriz
    diGriz:
    Reeeeeaaaaaaly?:

    diGriz:
    I would've thought it would be

    <font face="Courier New">enum Bool<br>{<br>&nbsp;&nbsp;&nbsp; True,<br>&nbsp;&nbsp;&nbsp; False,<br>&nbsp;&nbsp;&nbsp; Maybe,<br>&nbsp;&nbsp;&nbsp; Dunno,<br>&nbsp;&nbsp;&nbsp; <strong><u>What</u></strong><br>};<br><br></font>

    Come on now, do it right:

    WTF

    Originally, I was thinking of Eh, but then I thought: what the hell...
    What were those last three words again? (OK, that last one word?) Er, yes, I see now.

    Every so often, someone asks what "RTFM" or some such stands for. I tell them, "Read The Manual." Sometimes they get it, sometimes they don't...
  • lurker (unregistered) in reply to lucky luke
    lucky luke:
    Anonymous:
    Anonymous:
    the real WTF is that I am at work today!

    The real WTF is that I'm unemployed and the guys whose code is so horrible that it makes this web site are not.



    hmmm... i wonder why?? maybe if you learned proper grammar you would be employed ;)


    The real WTF?! here is that your grammar is only marginally better.

  • pfworks (unregistered) in reply to BiggBru
    BiggBru:

    <font face="Georgia">What is Truth? There's only one entity that can not only define, but redefine True Truth.</font>

    <font face="Georgia">The White House.</font>

    <font face="Georgia">>BiggBru</font>

    Yes, Clinton did do this so well.

  • azaris (unregistered)
    Alex Papadimoulis:

    The problem with "logic" is that it makes things out to be nothing but simple dualities. Proponents of logic want us to believe that everything is true or false, black or white, yes or no, paper or plastic, etc.



    This claim is a minor WTF in itself, since logicians study numerous alternative forms of logic, many of which have more than two truth values (even infinitely many different truth values).
  • triso (cs) in reply to ChiefCrazyTalk
    Anonymous:
    Anonymous:
    the real WTF is that I am at work today!

    The real WTF is that I'm unemployed and the guys whose code is so horrible that it makes this web site are not.

    <font size="5">D</font>on't fret!  With the quality of code shown here, there should be quite a few openings coming up.

  • verilog (unregistered) in reply to azaris
    Anonymous:
    Alex Papadimoulis:

    The problem with "logic" is that it makes things out to be nothing but simple dualities. Proponents of logic want us to believe that everything is true or false, black or white, yes or no, paper or plastic, etc.



    This claim is a minor WTF in itself, since logicians study numerous alternative forms of logic, many of which have more than two truth values (even infinitely many different truth values).


    Even in computing verilog has the 'X' state (and even 'Z' - but I don't think that really counts)

Leave a comment on “Classic WTF - What is Truth?”

Log In or post as a guest

Replying to comment #:

« Return to Article