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

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

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

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

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

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

  • (cs)
    Alex Papadimoulis:

     

    enum Bool 
    { 
        True, 
        False, 
        FileNotFound 
    };

     

    There are 10 types of people..

    • Those who understand binary
    • Those who don't

     

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

    I would've thought it would be

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

    </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 {
       Success,
       Failure,
       FailureToSucceed,
       SuccessInFailing
    }</FONT>

    Captcha = truthiness :) How fitting.
  • (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?

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

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

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

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

  • (cs) in reply to diGriz

    diGriz:
    I would've thought it would be

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

    </FONT>

    Come on now, do it right:

    WTF

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

    diGriz:
    I would've thought it would be

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

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

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

    diGriz:
    I would've thought it would be

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

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

    What is Truth?
    Baby don't hurt me
    Don't hurt me
    No more

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


    Hmmm... what is the difference between fuzzy logic and the theory of probability?
  • steveth (unregistered)

    Why is everybody freaking out about the definition of logic?  The name of the enum is Bool, which is short for boolean. From dictionary.com :

    1. Of or relating to a logical combinatorial system treating variables, such as propositions and computer logic elements, through the operators AND, OR, NOT, and XOR: a browser that supports Boolean searches.
    2. Of or relating to a data type or variable in a programming language that can have one of two values, true or false.
    The WTF is the redefinition of what a boolean is.  As far as I can tell, it violates both parts of the definition--so much for readable code.

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

Log In or post as a guest

Replying to comment #:

« Return to Article