Schizophrenic Haiku Comments and More

« Return to Article
  • MicrosoftDev 2012-01-16 09:01
    FIRST!

    this text for fooling the spam bot!
  • coward 2012-01-16 09:06
    should be FRIST here, no cannot because, I wasn't fast enough yet!


  • MrBester 2012-01-16 09:16
    256 is 80 in hex so there's a new WTF where a hex number is read as a decimal number and someone needed a constant
  • Mathlete 2012-01-16 09:19
    What is that rubbish?
    Lines of five, seven and five
    give a real haiku.
  • DCRoss 2012-01-16 09:23
    MrBester:
    256 is 80 in hex so there's a new WTF

    Yes, that is a new WTF. When did people start referring to base 32 as "hex"?


  • Mr Clever Ideas 2012-01-16 09:25
    MrBester:
    256 is 80 in hex so there's a new WTF where a hex number is read as a decimal number and someone needed a constant

    I assume you mean duotrigesimal, not hex? :-)
  • Nagesh 2012-01-16 09:26
    In Hyderabad, if you are writeing code this teribal, you are ending up on unemployment bench.

  • Mr Clever Ideas 2012-01-16 09:26
    Oh - DCRoss posted a second before me. Base 32 as "hex"??
  • PiisAWheeL 2012-01-16 09:27
    Mathlete:
    What is that rubbish?
    Lines of five, seven and five
    give a real haiku.


    Lead flies from the tube,
    Brass, spirals down towards the ground,
    As does the victim.
  • does not matter 2012-01-16 09:32
    The JUnit test case makes sense, at least a bit.
    If you start a JUnit test class without any test, it fails with an exception. But if you want to have a super class for your tests, it usually does not contain any tests, and JUnit will accuse this.
    Solution: Just implement such a non-sense test and be fine.
  • moz 2012-01-16 09:33
    Should let you all know
    That Haiku-style comments suck
  • Bob 2012-01-16 09:35
    The theory that a haiku contains 17 syllables and that there's anything special about this is singularly a geek meme.

    That this is also considered a form or poetry demonstrates that most geeks should stick to what they're good at.

    For future reference, things you might find in a good haiku:
    . 17 morae
    . a seasonal reference
    . a juxtaposition separated with a "cut"
  • Mathlete 2012-01-16 09:37
    moz:

    Should let you all know
    That Haiku-style comments suck


    *Insert missing line*
  • Lockwood 2012-01-16 09:38
    5.8.5. Fail.
    Brass falls down towards the ground
  • Mathlete 2012-01-16 09:42
    Bob:
    The theory that a haiku contains 17 syllables and that there's anything special about this is singularly a geek meme.

    That this is also considered a form or poetry demonstrates that most geeks should stick to what they're good at.

    For future reference, things you might find in a good haiku:
    . 17 morae
    . a seasonal reference
    . a juxtaposition separated with a "cut"


    I bow down in awe
    at your skill to summarise
    Wikipedia.
  • PiisAWheeL 2012-01-16 09:51
    Lockwood:
    5.8.5. Fail.
    Brass falls down towards the ground


    I was counting towards as 1 syllable... sometimes my memory gets retarded on me. Anything else you want to nitpick at today?

    Its been a while, maybe it was brass spirals towards the ground.... I no longer care.
  • RichP 2012-01-16 09:52
    FRIST!

    // Edit as necessary...
    #define FRIST 16
  • Charleh 2012-01-16 09:54

    I bow down in awe
    at your skill to summarise
    Wikipedia.


    Haha, that comment
    Had me in fits of laughter
    Do another one!
  • sehe 2012-01-16 09:59
    Jimmi found yet another wrapper for the illusive '!' operator.


    Pretty sure "for the elusive '!' operator" was meant
  • Nagesh 2012-01-16 10:01
    does not matter:
    The JUnit test case makes sense, at least a bit.
    If you start a JUnit test class without any test, it fails with an exception. But if you want to have a super class for your tests, it usually does not contain any tests, and JUnit will accuse this.
    Solution: Just implement such a non-sense test and be fine.

    Why you have JUnit test with no test method? Sound like JUnit write for throw exception.
  • Steve The Cynic 2012-01-16 10:04
    sehe:
    Jimmi found yet another wrapper for the illusive '!' operator.


    Pretty sure "for the elusive '!' operator" was meant

    Might have meant a synonym for illusory
  • Boog, I Am Your Father! (aka Behold The Return Of Zunesis!)! 2012-01-16 10:05
    PiisAWheeL:
    Mathlete:
    What is that rubbish?
    Lines of five, seven and five
    give a real haiku.
    Lead flies from the tube,
    Brass, spirals down towards the ground,
    As does the victim.
    Cum stains my ceiling
    Memories of bad touching
    The midget is paid
  • bashō 2012-01-16 10:08
    Bob:

    17 morae
    a seasonal reference
    juxtaposition


    FTFY
  • ¯\(°_o)/¯ I DUNNO LOL 2012-01-16 10:25

    private static bool InvertBool(bool org)
    {
    bool returnValue = false;
    if (org)
    {
    returnValue = false;
    }
    else if (!org)
    {
    returnValue = true;
    }
    else
    {
    returnValue = FileNotFound;
    }
    return returnValue;
    }

    Fixed.
  • lesle 2012-01-16 10:29
    Towards is one syllable to me, also. I'm U.S. Midwest, overlaid with North Florida/South Alabama. Stand your ground!
  • lemortede 2012-01-16 10:44
    Yea, I think its 1 syllable too, but the internet disagrees with me.....But then again, I don't pronounce the 'T' when I say mountain.
    My grandma on the other side of the country adds an 'R' when she says wash. Its 'warsh' to her.
    I still have trouble understanding people in Boston.
    Regional dialects and accents can be fun.
  • anonymouser 2012-01-16 10:57
    lesle:
    Towards is one syllable to me, also. I'm U.S. Midwest, overlaid with North Florida/South Alabama. Stand your ground!


    Ah, so you pronounce it as if it rhymes with cord.
  • Steve The Cynic 2012-01-16 11:03
    lemortede:
    Yea, I think its 1 syllable too, but the internet disagrees with me.....But then again, I don't pronounce the 'T' when I say mountain.
    My grandma on the other side of the country adds an 'R' when she says wash. Its 'warsh' to her.
    I still have trouble understanding people in Boston.
    Regional dialects and accents can be fun.

    So to you it's a mounain or a moun'ain (glo''al stop)?

    And don't get me started on the pronunciation oddities of folks from that large country north of Mexico. (Hint, I'm originally from the small country between Ireland and the North Sea. My accent has been well stirred by time there, 9 years north of Mexico, and several years in the north of France. I sound a bit like a Ch'ti when speaking French, I'm sure.)

    There is, of course, the more general problem of bath versus bahth, tomahto versus tomayto, etc.
  • neminem 2012-01-16 11:18
    Steve The Cynic:
    So to you it's a mounain or a moun'ain (glo''al stop)?

    I'm from northern California, and it's a mounʔn to me, too.

    By the way, I'm surprised nobody has bothered that guy who complains anytime someone posts an xkcd yet - you all missed the perfect opportunity to post a relevant one that I bet you has never been relevant to any previous tdwtf post. Much like Fahrzin's: xkcd.com/153

    That said, akismet apparently dislikes xkcd, too; it thinks I'm spamming on his behalf. Wonder if more words would help?

    answer: yes.
  • Smitt-Tay 2012-01-16 11:20
    As previously stated: The Real WTF is using XML.
  • QJo 2012-01-16 11:22
    That tmpnum one ... just looks like some interpolation is being done. Further info needed, but doesn't seem as WTFish as all that.
  • This is not my real name 2012-01-16 11:37
    ¯\(°_o)/¯ I DUNNO LOL:

    private static bool InvertBool(bool org)
    {
    bool returnValue = false;

    if (org == true)
    {
    returnValue = false;
    }
    else if (!org == false)
    {
    returnValue = true;
    }
    else
    {
    returnValue = FileNotFound;
    }

    if(returnValue == false)
    {
    return false;
    }
    else
    {
    return true;
    }

    // Default
    return FileNotFound;

    }

    Not fixed.


    Fixed.
  • PiisAWheeL 2012-01-16 11:41
    anonymouser:
    lesle:
    Towards is one syllable to me, also. I'm U.S. Midwest, overlaid with North Florida/South Alabama. Stand your ground!


    Ah, so you pronounce it as if it rhymes with cord.


    I pronounce it more like "tword" so sorta...
  • cappeca 2012-01-16 11:43
    The invertBool thing is the result of too many idiots enforcing OO rules that everything has to be a method, lest you have a procedural program.
  • C-Octothorpe 2012-01-16 12:02
    Bob:
    The theory that a haiku contains 17 syllables and that there's anything special about this is singularly a geek meme.

    That this is also considered a form or poetry demonstrates that most geeks should stick to what they're good at.

    For future reference, things you might find in a good haiku:
    . 17 morae
    . a seasonal reference
    . a juxtaposition separated with a "cut"

    Fuck off Bob
    And your retarded kid,
    Take with you

    (Yes, I know it's not haiku, but I could be arsed to write a correct one now)
  • John 2012-01-16 12:06
    So...the replacement for the '!' operator includes the '!' in its code. WTF.

    Captcha: wisi - What I see is.
    I don't normally post captchas, but to give this a spin on Descartes: "I see, therefore you are."
  • n_slash_a 2012-01-16 12:16
    code:
    tmpnum6 = tmpnum2 + tmpnum * (tmpnum4 - tmpnum2);
    tmpnum7 = tmpnum3 + tmpnum * (tmpnum5 - tmpnum3);
    tmpnum8 = tmpnum6 + tmpnum1 * (tmpnum7 - tmpnum6);

    TRWTF is using 'tmp' instead of 'temp' to denote a temporary variable
  • Boog, I Am Your Father! (aka Behold The Return Of Zunesis!)! 2012-01-16 12:29
    C-Octothorpe:
    Bob:
    The theory that a haiku contains 17 syllables and that there's anything special about this is singularly a geek meme.

    That this is also considered a form or poetry demonstrates that most geeks should stick to what they're good at.

    For future reference, things you might find in a good haiku:
    . 17 morae
    . a seasonal reference
    . a juxtaposition separated with a "cut"

    Fuck off Bob
    And your retarded kid,
    Take with you

    (Yes, I know it's not haiku, but I could be arsed to write a correct one now)
    Fuck off Bob and son
    Skull fuck his retarded face
    Among falling leaves

    (I'm getting there, much better than my limerick)
  • Scott 2012-01-16 12:45

    tmpnum6 = tmpnum2 + tmpnum * (tmpnum4 - tmpnum2);
    tmpnum7 = tmpnum3 + tmpnum * (tmpnum5 - tmpnum3);
    tmpnum8 = tmpnum6 + tmpnum1 * (tmpnum7 - tmpnum6);


    While the variables could certainly be named better, to me this looks like someone is trying to position something some percent of the way in a range. tmpnum's 4, 5, and 7 are the lower bounds of the range and 2, 3, and 6 are the upper bounds. tmpnum and tmpnum1 are the percentages.

    Of course, variables like 'left', 'right', and 'percent' might have been helpful.

  • Scott_Babu 2012-01-16 12:56
    tmpnum6 = tmpnum2 + tmpnum * (tmpnum4 - tmpnum2);
    tmpnum7 = tmpnum3 + tmpnum * (tmpnum5 - tmpnum3);
    tmpnum8 = tmpnum6 + tmpnum1 * (tmpnum7 - tmpnum6);

    Its part of a drum machine
    chang1 chang2
    tata0 tata1

    feel the beat
  • Charleh 2012-01-16 12:56
    Why all this bother
    About temp variables
    Just shut the f*ck up
  • too_many_usernames 2012-01-16 12:58
    Code:
    tmpnum6 = tmpnum2 + tmpnum * (tmpnum4 - tmpnum2);
    
    tmpnum7 = tmpnum3 + tmpnum * (tmpnum5 - tmpnum3);
    tmpnum8 = tmpnum6 + tmpnum1 * (tmpnum7 - tmpnum6);

    Looks kind of like some signal filtering code.

    Oh, or:
    Scott:


    While the variables could certainly be named better, to me this looks like someone is trying to position something some percent of the way in a range. tmpnum's 4, 5, and 7 are the lower bounds of the range and 2, 3, and 6 are the upper bounds. tmpnum and tmpnum1 are the percentages.

    Of course, variables like 'left', 'right', and 'percent' might have been helpful.


    Yes, this could be part of a 2-axis lookup. Incidentally, the math is the same in both cases.

    I wonder what other problems fit this code?
  • sisenuZ toN 2012-01-16 13:08

    private static bool InvertBoog(bool a$$)
    {
    bool returnValue = false;

    if (!a$$)
    {
    // a$$NotFound
    returnValue = false;
    }
    if (a$$)
    {
    returnValue = true;
    }

    return returnValue;
    }
  • ooblek 2012-01-16 13:18
    does not matter:
    The JUnit test case makes sense, at least a bit.
    If you start a JUnit test class without any test, it fails with an exception. But if you want to have a super class for your tests, it usually does not contain any tests, and JUnit will accuse this.
    Solution: Just implement such a non-sense test and be fine.


    It actually may be a Canary test. It is an odd way of doing it (not naming it Canary test), but could serve the same purpose.

    Google TDD Canary tests...
  • Nagesh-saki 2012-01-16 13:23
    TRWTF is that someone considers Haiku so amazing as a poetic art form that we all know what it is.
  • valetudo 2012-01-16 13:33
    C-Octothorpe:
    Bob:
    The theory that a haiku contains 17 syllables and that there's anything special about this is singularly a geek meme.

    That this is also considered a form or poetry demonstrates that most geeks should stick to what they're good at.

    For future reference, things you might find in a good haiku:
    . 17 morae
    . a seasonal reference
    . a juxtaposition separated with a "cut"

    Fuck off Bob
    And your retarded kid,
    Take with you

    (Yes, I know it's not haiku, but I could be arsed to write a correct one now)


    The lack of a comma on the first line disturbs me.
  • C-Octothorpe 2012-01-16 13:58
    valetudo:
    C-Octothorpe:
    Bob:
    The theory that a haiku contains 17 syllables and that there's anything special about this is singularly a geek meme.

    That this is also considered a form or poetry demonstrates that most geeks should stick to what they're good at.

    For future reference, things you might find in a good haiku:
    . 17 morae
    . a seasonal reference
    . a juxtaposition separated with a "cut"

    Fuck off Bob
    And your retarded kid,
    Take with you

    (Yes, I know it's not haiku, but I could be arsed to write a correct one now)


    The lack of a comma on the first line disturbs me.
    Proofreading?! We don't need no stinkin' proofreading!!
  • Fred 2012-01-16 14:14
    moz:
    Should let you all know
    That Haiku-style comments suck
    I'm doing it too
  • efs 2012-01-16 14:17
    anonymouser:
    lesle:
    Towards is one syllable to me, also. I'm U.S. Midwest, overlaid with North Florida/South Alabama. Stand your ground!


    Ah, so you pronounce it as if it rhymes with cord.
    Then use poetic grammars...."T'ward"
  • JJ what J 2012-01-16 14:20
    QJo:
    That tmpnum one ... just looks like some interpolation is being done. Further info needed, but doesn't seem as WTFish as all that.
    You suck. USing that many temporary variables with stupid names and no comment to explain is always a FAIL
  • rd 2012-01-16 14:22
    "How do you feel when you see this code on the first day of your job?" wonders Ritesh

    #define EIGHTY 256

    I would feel like I needed to correct it:

    #define EIGHTY 128
    #define ONE_HUNDRED_AND_TWENTY_EIGHT 0x80
  • PiisAWheeL 2012-01-16 14:26
    valetudo:
    C-Octothorpe:
    Bob:
    The theory that a haiku contains 17 syllables and that there's anything special about this is singularly a geek meme.

    That this is also considered a form or poetry demonstrates that most geeks should stick to what they're good at.

    For future reference, things you might find in a good haiku:
    . 17 morae
    . a seasonal reference
    . a juxtaposition separated with a "cut"

    Fuck off Bob
    And your retarded kid,
    Take with you

    (Yes, I know it's not haiku, but I could be arsed to write a correct one now)


    The lack of a comma on the first line disturbs me.


    The,fact,that,you,chose,to,focus,on,the,lack,of,a,comma,in,this,entire,thread,disturbs,me,.
  • da Doctah 2012-01-16 15:06
    A proper haiku
    Should make mention of seasons.
    Powdered cinnamon.
  • anonymous 2012-01-16 15:26
    In fact this is a typo...

    should be
    #define MIGHTY 256
  • Simon 2012-01-16 15:33
    does not matter:
    The JUnit test case makes sense, at least a bit.
    If you start a JUnit test class without any test, it fails with an exception. But if you want to have a super class for your tests, it usually does not contain any tests, and JUnit will accuse this.
    Solution: Just implement such a non-sense test and be fine.


    Yes, I've seen them used occasionally when all the real tests in the file have been temporarily commented out for one reason or another. Though it makes less sense under Junit4, where you can disable tests with an @Ignore annotation.

    I've also seen it on a common parent class, where the developer hadn't realised that making the class abstract was a better way of stopping JUnit from complaining.
  • Some Java Dev 2012-01-16 15:36
    ooblek:
    It actually may be a Canary test. It is an odd way of doing it (not naming it Canary test), but could serve the same purpose.

    Google TDD Canary tests...

    Actually, Google doesn't return very good results for that. So let's explain it.

    A canary test is actually an internal test of your test setup. Sometimes the setup for your unit tests can be complicated. For example, if the test you need to load a Spring application context:

    @RunWith(SpringJUnit4ClassRunner.class)
    
    // ApplicationContext will be loaded from "/applicationContext.xml" and "/applicationContext-test.xml"
    // in the root of the classpath
    @ContextConfiguration(locations={"/applicationContext.xml", "/applicationContext-test.xml"})
    public class MyTest {
    // class body...
    }

    You may have made a number of changes and now all the unit tests for your module are broken. So you look.. was it something you did to the model?

    However you have a simple test:
    @Test
    
    public void testAlwaysSucceed() {
    assertTrue(true);
    }

    This can't possibly fail right? Well, it can, but only if JUnit's setup() method throws an Exception.

    So now you know that tests are broken not because what they are testing is broken; but rather because the unit test setup is broken.

    In this case, you might go back and check if you had any recent changes to your Spring application context. If you forgot a / on tag, it could make the XML invalid, and thus your unit tests don't load.

    So, testAlwaysSucceed is your canary in the coal mine. It tells you if it's safe to rely on your tests.
  • Spoe 2012-01-16 17:10
    //Clear it, or it, smack it, flip it, rub it down
    //(Oh nooooo...)


    // It's not too late/to whip it/whip it good.

  • alex n 2012-01-16 17:21
    the shown code has been corrected and optimized
    as follows,

    since it is bad form to use the same operator in the method a fix had been applied.




    private static bool InvertBool(bool org)

    {

    bool returnValue = false;



    if (org == true)

    {

    returnValue = false;

    }

    else if ( InvertBool(org) == false)

    {

    returnValue = true;

    }

    else

    {

    returnValue = FileNotFound;

    }



    if(returnValue == false)

    {

    return false;

    }

    else

    {

    return true;

    }



    // Default

    return FileNotFound;



    }



    I'm still waiting for the testcase to complete running
    It seems to be taking a while, perhaps I need a faster computer

  • qDot 2012-01-16 18:17
    Fun fact: Fahrzin's entry (smack it, flip it, etc...) is from the Xport Botball Controller firmware. I should know, I wrote it, back in 2004. :D

    Had a couple of people poke me today going "HEY YOUR ON THEDAILYWTF!" Luckily, it was not the career ender that I feared. :)
  • lolwtf 2012-01-16 19:28
    Mr Clever Ideas:
    MrBester:
    256 is 80 in hex so there's a new WTF where a hex number is read as a decimal number and someone needed a constant

    I assume you mean duotrigesimal, not hex? :-)
    I can't help but read "dugtriogesimal".
  • herby 2012-01-16 20:20
    Weird fact...

    You can delete a file BEFORE you actually read it. Of course the file must be open beforehand, but the following sequence does work:

    open (file, "rw")
    write data to file
    seek to zero on file
    delete file
    read data from file (ad nauseum, as required).
    close file (it disappears now).
  • SomeGuyOnTheInternet 2012-01-16 20:39
    For intI = 7450 To 7450
    'Now lets go and create the f*&ker
    ... snip...
    Next


    I bet you an internet that the "run once" for-next loop was so the programmer could use EXIT FOR instead of GOTO.
  • robbak 2012-01-16 20:40
    I think that might only work in unixland, which is all that really matters.

    'delete' is really 'unlink'. A file's disk space will only be recovered when there are no remaining links, and open file handles count as 'links'.
  • Cheong 2012-01-16 21:47
    I'll not be surprised to see the following:

    #define HUNDRED 256

    Afterall, we all know 256 is 100 in Hex.
  • Brian 2012-01-16 22:19
    Scott:

    tmpnum6 = tmpnum2 + tmpnum * (tmpnum4 - tmpnum2);
    tmpnum7 = tmpnum3 + tmpnum * (tmpnum5 - tmpnum3);
    tmpnum8 = tmpnum6 + tmpnum1 * (tmpnum7 - tmpnum6);


    While the variables could certainly be named better, to me this looks like someone is trying to position something some percent of the way in a range. tmpnum's 4, 5, and 7 are the lower bounds of the range and 2, 3, and 6 are the upper bounds. tmpnum and tmpnum1 are the percentages.

    Of course, variables like 'left', 'right', and 'percent' might have been helpful.



    Yep. It's called Bilinear interpolation. It can be used to resize an image, to create Perlin noise, and for various other things.

    The way all the variables are named kinda looks like decompiler output. This might not be a WTF at all.
  • Meep 2012-01-16 23:53
    Mathlete:
    What is that rubbish?
    Lines of five, seven and five
    give a real haiku.


    An allusion to
    seasons, dual icons shine through true
    haiku, FUCK YOU WHALE!
  • Matt Westwood 2012-01-17 01:24
    Nagesh-saki:
    TRWTF is that someone considers Haiku so amazing as a poetic art form that we all know what it is.


    TRWTF
    Is somebody think all know
    What fuck is Hauku
  • gstein 2012-01-17 03:36
    cappeca:
    The invertBool thing is the result of too many idiots enforcing OO rules that everything has to be a method, lest you have a procedural program.
    i was trying to figure out a situation in which this would be better/easier than using !bool.
  • L. 2012-01-17 04:34
    Mathlete:
    moz:

    Should let you all know
    That Haiku-style comments suck


    *Insert missing line*


    Nice :)
  • L. 2012-01-17 04:35
    Scott_Babu:
    tmpnum6 = tmpnum2 + tmpnum * (tmpnum4 - tmpnum2);
    tmpnum7 = tmpnum3 + tmpnum * (tmpnum5 - tmpnum3);
    tmpnum8 = tmpnum6 + tmpnum1 * (tmpnum7 - tmpnum6);

    Its part of a drum machine
    chang1 chang2
    tata0 tata1

    feel the beat


    chang 1 tata 1
    It's part of a drum machine
    chang 2 tata 2

    fixed :p
  • L. 2012-01-17 04:39
    SomeGuyOnTheInternet:
    For intI = 7450 To 7450
    'Now lets go and create the f*&ker
    ... snip...
    Next


    I bet you an internet that the "run once" for-next loop was so the programmer could use EXIT FOR instead of GOTO.


    Define 2 5 6,
    Now let's create the fucker,
    invert boolean !
  • dkf 2012-01-17 05:50
    SELECT decode(authorization_kd,
    
    3,3, 4,3, 6,3, 7,3, 34,3,
    55,3, 57,3, 58,3, 24,4, 10,4,
    11,4, 21,4, 71,4, 36,4, 37,4,
    38,4, 13,4, 14,4, 84,4, 53,4,
    15,4, 33,4, 31,4, 32,4, 09,5,
    12,6, 52,6, 54,7, 19,8, 20,8,
    79,8, 99,8, 9) process_kd
    FROM dossier
    WHERE authorization_kd NOT IN (1, 30, 35, 85, 86, 87, 16, 17, 18)

    The more I look at this snippet, the more horrified I feel. Some kind of function that takes 66 parameters? A bizarre exclusion of values from a set with no notion of why? Oh dear oh dear.

    OBIEE
    Magic numbers now abound
    Snow falls on my soul.
  • Robert Gascoyne-Cecil, 3rd Marquess of Salisbury 2012-01-17 06:19
    dkf:

    The more I look at this snippet, the more horrified I feel. Some kind of function that takes 66 parameters? A bizarre exclusion of values from a set with no notion of why? Oh dear oh dear.


    DBA in spring of life,
    know not the decode function.
    Keep it that way.
  • Horse_ebooks 2012-01-17 07:28


    should delete the temp files here, no cannot because, we havent read it in yet
  • dkf 2012-01-17 08:18
    Robert Gascoyne-Cecil, 3rd Marquess of Salisbury:
    DBA in spring of life,
    know not the decode function.
    Keep it that way.
    Poet's good advice
    like spring sunshine on my face.
    Shame it's not haiku!
  • QJo 2012-01-17 08:43
    JJ what J:
    QJo:
    That tmpnum one ... just looks like some interpolation is being done. Further info needed, but doesn't seem as WTFish as all that.
    You suck. USing that many temporary variables with stupid names and no comment to explain is always a FAIL

    And you deserve a sound spanking, you irksome child.
  • Nagesh 2012-01-17 09:29
    n_slash_a:
    code:
    tmpnum6 = tmpnum2 + tmpnum * (tmpnum4 - tmpnum2);
    tmpnum7 = tmpnum3 + tmpnum * (tmpnum5 - tmpnum3);
    tmpnum8 = tmpnum6 + tmpnum1 * (tmpnum7 - tmpnum6);

    TRWTF is using 'tmp' instead of 'temp' to denote a temporary variable


    Sometime I use variable like temp1, temp2 when doing construction of code activity. Then during code review process it is discovered and changed to meet CMM5 level. That is advantage of CMM.
  • operagost 2012-01-17 09:42
    PiisAWheeL:
    Lockwood:
    5.8.5. Fail.
    Brass falls down towards the ground


    I was counting towards as 1 syllable... sometimes my memory gets retarded on me. Anything else you want to nitpick at today?

    Its been a while, maybe it was brass spirals towards the ground.... I no longer care.

    Most Americans pronounce "towards" as one syllable. Then again, it's really supposed to be seven morae, and I think towards could count as two in either British or American English.
  • Charleh 2012-01-17 09:46
    Kinda feels like it should be a haiku...

    The pig go. Go is to the fountain. The pig put foot. Grunt. Foot in what? ketchup. The dove fly. Fly is in sky. The dove drop something. The something on the pig. The pig disgusting. The pig rattle. Rattle with dove. The dove angry. The pig leave. The dove produce. Produce is chicken wing. With wing bark. No Quack.
  • DanDan 2012-01-17 10:04
    I wish I were first
    So I could write a comment
    To annoy, like frist
  • Dave-Sir 2012-01-17 10:25
    Bob:
    The theory that a haiku contains 17 syllables and that there's anything special about this is singularly a geek meme.

    That this is also considered a form or poetry demonstrates that most geeks should stick to what they're good at.

    For future reference, things you might find in a good haiku:
    . 17 morae
    . a seasonal reference
    . a juxtaposition separated with a "cut"

    Anyone can write
    haiku. Just stop after the
    seventeenth syllab

    laoreet!
  • hashishin 2012-01-17 10:41
    o'rly? in which hex?
  • foo 2012-01-17 11:37
    bashō :
    Bob:

    17 morae
    a seasonal reference
    juxtaposition


    FTFY

    Zero-x-one-one,
    winter, spring, summer and fall,
    form vs. content.
  • foo 2012-01-17 11:39
    DCRoss:
    MrBester:
    256 is 80 in hex so there's a new WTF

    Yes, that is a new WTF. When did people start referring to base 32 as "hex"?
    Hex(a) is six in Greek, and 32 is clearly 26 (in base 13).
  • no laughing matter 2012-01-17 11:44
    Nagesh:
    Sometime I use variable like temp1, temp2 when doing construction of code activity. Then during code review process it is discovered and changed to meet CMM5 level. That is advantage of CMM.

    CMM5_temp6 = CMM5_temp2 + CMM5_temp * (CMM5_temp4 - CMM5_temp2);
    CMM5_temp7 = CMM5_temp3 + CMM5_temp * (CMM5_temp5 - CMM5_temp3);
    CMM5_temp8 = CMM5_temp6 + CMM5_temp1 * (CMM5_temp7 - CMM5_temp6);
    Cannot see such a big advantage...
  • Buddy 2012-01-17 11:52
    Everybody knows
    All the best haikus end with
    "Boy becomes a man."
  • Jay 2012-01-17 13:12
    DCRoss:
    MrBester:
    256 is 80 in hex so there's a new WTF

    Yes, that is a new WTF. When did people start referring to base 32 as "hex"?




    "Hex" is base 32 ... if you are expressing the base in base 4 1/2.
  • Jay 2012-01-17 13:14
    The funny thing about the re-implementation of the "!" operator is that he uses "!" in the function. So apparently he is aware that this operator exists and knows how to use it.

    It's like when you ask someone to define a word and he uses that word in the definition: "What does 'eludicate" mean?" "Well, it's like, ya know, when you elucidate something."
  • Jay 2012-01-17 13:23
    Bob:
    The theory that a haiku contains 17 syllables and that there's anything special about this is singularly a geek meme.

    That this is also considered a form or poetry demonstrates that most geeks should stick to what they're good at.

    For future reference, things you might find in a good haiku:
    . 17 morae
    . a seasonal reference
    . a juxtaposition separated with a "cut"


    Ah, but when we try to write a Haiku in English, it's a little tough to literally follow the "17 morae" rule, because, you see, there is no such thing as a "morae" in English. So we take the closest equivalent: syllables. Or to put it another way:

    Seventeen "morae"
    Make Japanease Haiku but
    Adapt for English
  • Jay 2012-01-17 13:25
    Please be sensitive
    My son wrote haikus, and note
    No laughing matter
  • Jay 2012-01-17 13:28
    PiisAWheeL:
    I was counting towards as 1 syllable... sometimes my memory gets retarded on me. Anything else you want to nitpick at today?


    How many syllables do you want to count it as? I just checked thefreedictionary.com, and they give three pronunciations, the first two being a single syllable.
  • Jeff Grigg 2012-01-17 13:29
    I'll assert that it's not /all that crazy/ to write a "testNothing" method in a JUnit class. ...based on the fact that I have done it a few times. It's usually not an ideal situation. It usually happens when you find you need to "comment out" other test methods, from time to time, due to the tests being very sensitive and some changes (possibly done by careless team members who don't run the tests!) break tests.

    JUnit fails any test class that contains no test methods. So if you end up disabling all the test methods in a class, you're stuck -- unless you want to delete the class.

    And if you're at a company that uses static code analysis rigorously, then the static code analysis will find the empty method objectionable. (That, in itself, can be a problem, because an empty do-nothing method can be quite correct for some subclasses using the Template design pattern. But that's another issue.) But, honestly, some programmers will put 'assertTrue(true);' just because they think that JUnit (or their coding standard) requires one and only one assert in each test method.

    Sometimes these things are more, "Dude; that's just stupid", rather than a full "WTF!?!"
  • Tired Memery 2012-01-17 14:05
    Once adventured too;
    Took an arrow to the knee;
    Now a common guard.
  • Coyne 2012-01-17 16:40
    *Sigh* So many magic numbers, so little time.

    At least the guy who defined EIGHTY did it right. Of course, it would have helped a bit if he'd actually gone to the trouble of:

    #define EIGHTY 0x80
  • JJ 2012-01-17 17:12
    Coyne:
    *Sigh* So many magic numbers, so little time.

    At least the guy who defined EIGHTY did it right. Of course, it would have helped a bit if he'd actually gone to the trouble of:

    #define EIGHTY 0x80

    TRWTF is reading hex numbers as if they were decimal.

    #define EIGHT_OH 128

    I'm happy now.
  • x 2012-01-17 19:05

    int i = 1;
    while (i < i + 1)
    cout << "FILE_NOT_FOUND";
  • Jay 2012-01-18 16:00
    x:

    int i = 1;
    while (i < i + 1)
    cout << "FILE_NOT_FOUND";


    Wait, there's a bug. I think you mean:


    int i=1;
    while (i < i + 1)
    {
    cout << "FILE_NOT_FOUND";
    ++i
    }
  • Jay 2012-01-18 16:03
    JJ:
    Coyne:
    *Sigh* So many magic numbers, so little time.

    At least the guy who defined EIGHTY did it right. Of course, it would have helped a bit if he'd actually gone to the trouble of:

    #define EIGHTY 0x80

    TRWTF is reading hex numbers as if they were decimal.

    #define EIGHT_OH 128

    I'm happy now.


    Who says decimal "80" is "eighty" but hex "80" is eight-oh? Maybe it's the other way around. I think you're reading decimal numbers as if they were hex.
  • x 2012-01-18 16:50
    Jay:
    x:

    int i = 1;
    while (i < i + 1)
    cout << "FILE_NOT_FOUND";


    Wait, there's a bug. I think you mean:


    int i=1;
    while (i < i + 1)
    {
    cout << "FILE_NOT_FOUND";
    ++i
    }


    5-7-5, dude.
  • Spudley 2012-01-19 16:19
    I've just written a do-nothing unit test exactly like the one here.

    The reason for it is this:

    I'm configuring a Jenkins build server for an old project. The project currently doesn't have any unit tests.

    For now my task is the build server, but we do intend to write tests for the project, so I need to have the xUnit functionality working in the build.

    So I've written a dummy unit test so I can get Jenkins doing its thing.

    I don't think this is a wrong at all. The example in the article here was well labeled as doing nothing; I can easily envision it having been written for a similar purpose. Perhaps the only sin here is that it wasn't subsequently deleted once its usefulness had passed.
  • Neil 2012-01-20 06:44
    robbak:
    I think that might only work in unixland, which is all that really matters.
    Windows NT supports FILE_SHARE_DELETE which allows you to opt into this behaviour.
  • method1 2012-01-21 09:05
    I know I'll be dismissed as a dick or worse, but maybe people could just stop using "schizophrenic" to mean "split personality" or whatever, especially as they're probably using it because they think it makes what they're saying sound more clever or witty. Its fuck all to do with having several personalities, its just a shit disease. Look it up.
  • genitus 2012-01-23 11:10
    b o r i n g . . .
  • alex 2012-01-24 12:35
    it will be fine
  • OldHand 2012-01-25 09:39
    This is worrying for your employer on 2 fronts:
    1) You don't know what the variables are for in the code as you write it. That's bad.
    2) You don't go over your code and remove the stuff that was "just while I'm writing it". That's sloppy. Waiting for the code review? Sheesh.

    I've had the misfortune of integrating "CMM level 5 - compliant code" before now. It too was full of tmpVar's and tmpByte's and the rest of the "I dunno what I'm doing here, just hack it 'till it goes" bestiary.
  • OldHand 2012-01-25 09:41
    Nagesh:

    Sometime I use variable like temp1, temp2 when doing construction of code activity. Then during code review process it is discovered and changed to meet CMM5 level. That is advantage of CMM.


    This is worrying for your employer on 2 fronts:
    1) You don't know what the variables are for in the code as you write it. That's bad.
    2) You don't go over your code and remove the stuff that was "just while I'm writing it". That's sloppy. Waiting for the code review? Sheesh.

    I've had the misfortune of integrating "CMM level 5 - compliant code" before now. It too was full of tmpVar's and tmpByte's and the rest of the "I dunno what I'm doing here, just hack it 'till it goes" bestiary.
  • Pidgeot 2012-01-27 12:23
    should de-lete the temp files here, no can-not be-cause, we hav-ent read it in yet!


    19 syllables:
    Obviously not Haiku...
    Learn to count. Winter.
  • L 2012-02-01 05:02
    The JUnit 3 test runner in Eclipse complains very loudly if no testSomething methods are defined in the test class, so when I made a suite that created tests dynamically from input files I had to add a dummy test to appease the easily confused IDE.
  • Nagesh 2012-02-11 16:26
    method1:
    I know I'll be dismissed as a dick or worse, but maybe people could just stop using "schizophrenic" to mean "split personality" or whatever, especially as they're probably using it because they think it makes what they're saying sound more clever or witty. Its fuck all to do with having several personalities, its just a shit disease. Look it up.

    A "shit disease"? So you claim it's gastointestinal? Hmm...
  • UnStandard 2012-02-15 10:49
    The real WTF is Oracle.
  • Pharma428 2012-02-26 08:02
    Hello! dgbcggd interesting dgbcggd site! I'm really like it! Very, very dgbcggd good!
  • Pharmk449 2012-04-06 19:39
    Hello! kfbdecg interesting kfbdecg site! I'm really like it! Very, very kfbdecg good!
  • cousteau 2012-07-03 13:09
    ...am I the only one thinking "T'wards" is spelled like "turds"?