• anonym (unregistered)

    if isIntentegerInRange(1, 1, 1) print frist

  • GiG (unregistered)

    isNull("WTF?") == isNotNull("WTF?");

  • Oxin (unregistered)

    I never thought I'd see a function that implies a boolean return value simply return the hex code for red as a string. Mind boggling.

  • SR (unregistered)
    public static boolean isCommentnteFrist(String commentnte) {
        // probably not by now
    }
  • sjakie (unregistered) in reply to SR
    SR:
    public static boolean isCommentnteFrist(String commentnte) {
        // probably not by now
    }

    You forgot the result:

    public static boolean isCommentnteFrist(String commentnte) {

    // probably not by now
    throw new RetardedDeveloperException(false);
    

    }

  • (cs)

    An intenteger is for when you really mean that one number.

  • (cs) in reply to sjakie
    sjakie:

    You forgot the result:

    public static boolean isCommentnteFrist(String commentnte) {

    // probably not by now
    throw new RetardedDeveloperException(false);
    

    }

    I particularly like the boolean parameter and its implications. Does "false" mean the developer happens not to be retarded? Wouldn't that exception then be silently swallowed? And what is the correct exception handling policy for this kind of exception, particularly when issued with a true parameter? Delete the developer's hard disk?

  • (cs)

    I use intentegers all the time intententionally.

  • Anonymous (unregistered)

    This sort of code is like a recurring nightmare. I can't even count the number of times I've seen this crap before and it's a foregone conclusion that I'll see it again. Note to HR: stop hiring these people FFS! You are the reason we must suffer these fools!

  • eViLegion (unregistered) in reply to Oxin
    Oxin:
    I never thought I'd see a function that implies a boolean return value simply return the hex code for red as a string. Mind boggling.

    Yeah, I choked when I saw that.

  • sjakie (unregistered) in reply to TheRider
    TheRider:
    sjakie:

    You forgot the result:

    public static boolean isCommentnteFrist(String commentnte) {

    // probably not by now
    throw new RetardedDeveloperException(false);
    

    }

    I particularly like the boolean parameter and its implications. Does "false" mean the developer happens not to be retarded? Wouldn't that exception then be silently swallowed? And what is the correct exception handling policy for this kind of exception, particularly when issued with a true parameter? Delete the developer's hard disk?

    I see your confusion, but apparently you haven't worked with nte methods before, or with the Integernte framework. Any experienced retarded developer knows that, right!

    Just for clarity:

    public static boolean isCommentnteFrist(String commentnte) {

    // probably not by now
    throw new RetardedDeveloperException(false);
    

    }

    public static boolean isCommentFrist(String commentnte) {

    // probably not by now
    throw new RetardedDeveloperException(true);
    

    }

    Obviously any RetardedDeveloperException ultimately causes one of your CPU cores to be used for melting marshmallows by chipmunks on LSD.

  • (cs)

    It's not an additional "nte" it's an additional "ent", made to work on trees.

  • (cs) in reply to TheRider
    TheRider:
    sjakie:

    You forgot the result:

    public static boolean isCommentnteFrist(String commentnte) {

    // probably not by now
    throw new RetardedDeveloperException(false);
    

    }

    I particularly like the boolean parameter and its implications. Does "false" mean the developer happens not to be retarded? Wouldn't that exception then be silently swallowed? And what is the correct exception handling policy for this kind of exception, particularly when issued with a true parameter? Delete the developer's hard disk?

    Correct handling policy pattern for RetardedDeveloperException:

      try {
         lameDeveloperCode();
      } catch (RetardedDeveloperException e) {
         if (e.isRetarded() {
            goodDeveloperCode();
         } else {
            throw new RetardedDeveloperFib(e);
         }
      }
    
  • grzlbrmft (unregistered)

    Oh cool, I just added this to my code repository.

    ... the RetardedDeveloperException.

  • stringyIntegers (unregistered) in reply to anonym
    anonym:
    if isIntentegerInRange("one", 1, 1) print frist
    anonym:
    if isIntentegerInRange("0001", 1, 1) print frist
    anonym:
    if isIntentegerInRange("1", 1, 1) print frist

    Aren't these more likely? It checks a string against the range.

  • (cs)

    First code snippet for a long time where every function along the way all I could think to myself was [image]

  • SR (unregistered) in reply to grzlbrmft
    grzlbrmft:
    Oh cool, I just added this to my code repository.

    ... the RetardedDeveloperException.

    Good man. Just make sure it handles FILE_NOT_FOUND correctly.

  • Sean (unregistered) in reply to sjakie
    sjakie:
    SR:
    public static boolean isCommentnteFrist(String commentnte) {
        // probably not by now
    }
    You forgot the result:

    public static boolean isCommentnteFrist(String commentnte) { // probably not by now throw new RetardedDeveloperException(false); }

    In keeping with the theme, shouldn't that be...

    public static object isCommentnteFrist(String commentnte) { 
        // probably not by now 
        return new RetardedDeveloperException(false); 
    }
  • (cs)

    I don't see the WTF. As far as I can see, this developer is ahead of all of us. Who among us could write a method that checks not the integer that we pass in, but the integer that we intended to pass in? This is an ESP library. I'm in awe.

  • sjakie (unregistered) in reply to spxza
    spxza:
    It's not an additional "nte" it's an additional "ent", made to work on trees.

    Oh sorry, must have misread that.

    Never liked the ent framework, reminds me too much of Hobbit++ not to mention ring buffers and ELF-Eventhandling.

  • Sanity (unregistered)

    And yet... isNull(x) == isNotNull(x). That can't be good.

  • Steve the Cynic (unregistered) in reply to sjakie
    sjakie:
    SR:
    public static boolean isCommentnteFrist(String commentnte) {
        // probably not by now
    }

    You forgot the result:

    public static boolean isCommentnteFrist(String commentnte) {

    // probably not by now
    throw new RetardedDeveloperException(false);
    

    }

    In these politically correct days, of course, we must:

      throw new DifferentlyEnabledDeveloperException(false);
    

    And, of course, retarded developers aren't new:

    function defenestrate()
    {
      throw old RetardedDeveloper(out_the_window);
    }
    

    abbas: Mediaeval Latin abbot, Arabic name, etc.

    [2]

  • You didn't see me right (unregistered)

    Thank you dailywtf for confirming once again that whatever happens, I'll never write code as bad as an isEmpty function that returns either an empty string or the hex code for red. Thank you for reaffirming my belief in myself.

  • monkeyPushButton (unregistered) in reply to Sean
    Sean:
    sjakie:
    SR:
    public static boolean isCommentnteFrist(String commentnte) {
        // probably not by now
    }
    You forgot the result:

    public static boolean isCommentnteFrist(String commentnte) { // probably not by now throw new RetardedDeveloperException(false); }

    In keeping with the theme, shouldn't that be...

    public static object isCommentnteFrist(String commentnte) { 
        // probably not by now 
        return new RetardedDeveloperException(false); 
    }
    I'd just like to return retarded developers. Anyone have an address on that?
  • KimmoS (unregistered) in reply to Sanity

    The Tao master once explained the nature of x to a young student.

    "Is x Null?" asked the Student.

    "Is x not Null?" asked the Master in turn.

    The Student was enlightened.

  • (cs) in reply to Oxin
    Oxin:
    I never thought I'd see a function that implies a boolean return value simply return the hex code for red as a string. Mind boggling.
    As opposed to FileNotFound? You must be new! Welcome!
  • (cs) in reply to anonym
    anonym:
    if isIntentegerInRange(1, 1, 1) print frist
    You sir fail just as bad as the guy in the article. The first element is a string...

    isIntegerInRante("1",1,1) would at least compile.

  • Sean (unregistered) in reply to monkeyPushButton
    monkeyPushButton:
    Sean:
    sjakie:
    SR:
    public static boolean isCommentnteFrist(String commentnte) {
        // probably not by now
    }
    You forgot the result:

    public static boolean isCommentnteFrist(String commentnte) { // probably not by now throw new RetardedDeveloperException(false); }

    In keeping with the theme, shouldn't that be...

    public static object isCommentnteFrist(String commentnte) { 
        // probably not by now 
        return new RetardedDeveloperException(false); 
    }
    I'd just like to return retarded developers. Anyone have an address on that?

    RTFA!!! It is clearly 0xFF0000.

  • (cs) in reply to KimmoS
    KimmoS:
    The Tao master once explained the nature of x to a young student.

    "Is x Null?" asked the Student.

    "Is x not Null?" asked the Master in turn.

    The Student was enlightened.

    Mu!

    Null is the value that is not a value. To ask what it's value nature is is to deny its Null nature, and yet it is a value nonetheless. Compare with NaN in IEEE floating point.

  • Chi Happens (unregistered)

    I'm implementing this in my code, I think it's grand.

    public bool IsTrue(boolean TrueOrFalse) { bool Error = false; if(TrueOrFalse == true) { Error = false; } return Error; }

    but it didn't seem to work right, so I made another public bool IsTrue(boolean TrueOrFalse) { bool Error = false; if(TrueOrFalse.ToString().ToUpper() == "TRUE") { Error = true; } return Error; }

    this one seems to work better.

    ;)

  • (cs)

    I read "public sad String isNull()" Poor, public, sad, static function :(

  • sjakie (unregistered) in reply to Sean
    Sean:
    RTFA!!! It is clearly 0xFF0000.

    Clearly? You are so terribly mistaken, retarded developers use Hexentdecimal addressing. The first occurrence of a retarded developer might more likely be at 0xWTF001FRIST42. Although that one might be on a crack pipe...

  • Anonymous Coward (unregistered) in reply to Sanity
    Sanity:
    And yet... isNull(x) == isNotNull(x). That can't be good.
    That ban be good:

    if( isNull(x) == isNotNull(x) ) print("this is a quantum computer");

  • (cs) in reply to amischiefr
    amischiefr:
    anonym:
    if isIntentegerInRange(1, 1, 1) print frist
    You sir fail just as bad as the guy in the article. The first element is a string...

    isIntegerInRante("1",1,1) would at least compile.

    Missed that. Surely it should be isStrintegerInRange? (and isStrintentegerInRange for the differently abled)

  • (cs)

    Clearly it's supposed to be "in-ten-tegers" because you know some number systems go up to 11.

  • Peanut Gallery (unregistered) in reply to eViLegion
    eViLegion:
    Oxin:
    I never thought I'd see a function that implies a boolean return value simply return the hex code for red as a string. Mind boggling.

    Yeah, I choked when I saw that.

    Maybe they forgot to mention the programmer was only 9 years old and got his job the old fashion way (nepotism).

  • Anonymous (unregistered) in reply to amischiefr
    amischiefr:
    anonym:
    if isIntentegerInRange(1, 1, 1) print frist
    You sir fail just as bad as the guy in the article. The first element is a string...

    isIntegerInRante("1",1,1) would at least compile.

    =D That's funny... And kind of ironic

  • Anonymous (unregistered)

    You hurt codes feelings, code is sad =(

  • BSDGuy (unregistered) in reply to grzlbrmft

    Same here, I wonder if FreeBSD dev is willing to mentor me in implementing said exception in C...

  • BSDGuy (unregistered) in reply to BSDGuy

    on second thought, that code hurts my head way too much and I need coffee. WTG retard coder (Monkey at keyboard?)!

  • (cs) in reply to Anonymous
    Anonymous:
    This sort of code is like a recurring nightmare. I can't even count the number of times I've seen this crap before and it's a foregone conclusion that I'll see it again. Note to HR: stop hiring these people FFS! You are the reason we must suffer these fools!
    Note to hiring managers: stop letting HR screen your candidates FFS! You are the reason we must suffer these fools!
  • Good Intenteger (unregistered) in reply to anonym
    anonym:
    if isIntentegerInRange(1, 1, 1) print frist

    I prefer this:

    if isIntentegerInRange(1.ToString(), 1, 1){}

  • (cs)

    if isInTENTegerInRange(1, 1, 1) //To Do: Come up with witty comment about Irish Girl

  • (cs)

    I saw this code the other day from a developer who thought he was clever for using ternary syntax:

    $myBooleanValue = ($param==1)?"true":"false";

    The best part? He justified it because the code someone else had written was expecting a string value of "true" or "false" for $myBooleanValue.

  • BD (unregistered)

    This is one of the better ones I've seen lately.

    A seemingly-boolean function that returns the hex code for red? A function with a parameter named "integer" that is actually a String?

  • Drew (unregistered) in reply to Good Intenteger

    This isn't enterprisey enough.

    IntegerRangeFinderFactory f = new IntegerRangeFinderFactory("pie", 27, new Thing()); IntegerRangeFinder rf = f.getIntegerRangeFinder("left", "KHAN!!!"); if(rf.createIntegerRangeFinderFinder().finder().cleft().isIntentegerInRange(IntegerStringMakerDoohickeyMaBob.parseTheFrackinIntegerIntoaString(1), 1, 1) { try { throw moreCode(); } catch(NotEnoughCodeException e) { throw new RetardedDeveloperException(e, "Lies!"); } finally { stillNotEnoughCode(moar_code_plx, DailyWTF.WOODEN_TABLE); } }

  • (cs) in reply to BSDGuy
    BSDGuy:
    Same here, I wonder if FreeBSD dev is willing to mentor me in implementing said exception in C...
    longjmp(retarded_developer_buf, 1);
  • (cs)

    I think this is my favourite wtfery ever. Every little wtf is like a tiny hidden gem - I have to go over each method again and again to find all the things that my brain refused to acknowledge last time, they're just so gorgeously horrific. /me reads it again...

    Addendum (2009-11-02 11:11): I love that the isEmpty method returns a string, and you have to check whether it's returned the empty string, to find out if your first string was empty.

  • Bobble (unregistered)

    That looks like hangover code.

  • (cs)

    Whenever i start a new job i am faced with a huge collection of wtfs faulty design and crappy code.

    Fortunately for me, i think amongst the wost thing i saw was: String doSomeAction(SomeClassType someObject){ try{ return SomeObject.DoSomeAction(); } catch (NullPointerException e){ return null; }

    }

    bad, i know , wtf - i know..but its no where near as bad as String green="#00FF00"; if (isNull(green)) { green = isEmpty("","event"); //green might have been set to red, but fortunately isNull will return false... }

    green = null;

    if (isNotNull(green)) { green = isEmpty(green,"notNullEvent"); //at this point we'd have a null pointer exception... //good thing we made sure our string is not null. }

Leave a comment on “The Utility Package ”

Log In or post as a guest

Replying to comment #:

« Return to Article