• (cs)

    I like the fact that the code needs to be fixed every year to make the current year available in the year pull-down.

  • Jon (unregistered) in reply to rogthefrog
    rogthefrog:

    I like the fact that the code needs to be fixed every year to make the current year available in the year pull-down.

    Two words: job security :-)

  • (cs)

    I suspect the cyear(pyear,2004) is a function that returns "selected" if $_GET['pyear']==2004 or some other form var ("cOMPAREyear", get it?), to prepopulate the pulldowns.

    If that's the case, having cyear, cmonth, etc. is an even bigger wtf than the hardcoding of all the values.

     

     

  • (cs)

    Magic Numbers Truly ROCK!

  • diaphanein (unregistered) in reply to rogthefrog

    Anyone got a rope?  'bout time we's had ourselves a lynchin'.

  • (cs)

    Maybe the "X" key was broken on the coder's computer, making a for...next loop impossible.

  • (cs)

    Seen lots and lots of stuff just like this, unfortunately =/

  • (cs) in reply to Sean
    Sean:
    Maybe the "X" key was broken on the coder's computer, making a for...next loop impossible.


    Still no excuse. I'm sure he could have found an x somewhere to copy and paste.
  • bosshoff (unregistered) in reply to haveworld

    Writing idiotic code that could've been written in around five lines? You better BELIEVE that's a paddlin'.

  • BiggBRu (unregistered)

    Folks, this type of code is very common among the graduates of Krusty the Klown Kollege of Komputing. Yikes! :S

  • Fregas (unregistered)

    oh what an ASS MONKEY.

  • (cs) in reply to haveworld

    haveworld:
    Sean:
    Maybe the "X" key was broken on the coder's computer, making a for...next loop impossible.


    Still no excuse. I'm sure he could have found an x somewhere to copy and paste.

    Now THAT is funny!!!

  • dM (unregistered) in reply to rogthefrog

    Also like that I could choose February, 31th. Very Nice!

  • (cs) in reply to BiggBRu
    Anonymous:
    "...Krusty the Klown Kollege of Komputing."...
    An old and venerable instutuion, I'm sure.  However, I have a feeling that this person was unable to graduate.
  • (cs) in reply to Sean

    Sean:
    Maybe the "X" key was broken on the coder's computer, making a for...next loop impossible.

    Ever heard of holding down the alt key while typing 120?  There is never an exuse for a broken keyboard.  Just use the alt key and the ASCII number of the letter. Works every time!! [:D]

  • (cs)

    Maybe this programmer got paid by the lin^H^H^Hcharacter?

        dZ.

  • (cs) in reply to cm5400
    cm5400:

    Sean:
    Maybe the "X" key was broken on the coder's computer, making a for...next loop impossible.

    Ever heard of holding down the alt key while typing 120?  There is never an exuse for a broken keyboard.  Just use the alt key and the ASCII number of the letter. Works every time!! [:D]



    Thanks to Word's Insert Symbol feature, you can even program exclusively with a mouse.  Until you need a CRLF, anyway.
  • (cs) in reply to Maurits

    StringBuilder myWTF = new StringBuilder(270);
    myWTF.AppendFormat(@"I don't see what the{0}", Environment.NewLine);
    myWTF.AppendFormat(@"big deal is.{0}", Environment.NewLine);
    myWTF.AppendFormat(@"{0}", Environment.NewLine);
    myWTF.AppendFormat(@"He could have also done{0}", Environment.NewLine);
    myWTF.AppendFormat(@"this with the{0}", Environment.NewLine);
    myWTF.AppendFormat(@"FABULOUS{0}", Environment.NewLine);
    myWTF.AppendFormat(@"new StringBuilder{0}", Environment.NewLine);
    myWTF.AppendFormat(@"Copy+Paste Visual Studio{0}", Environment.NewLine);
    myWTF.AppendFormat(@"plugin{0}", Environment.NewLine);
    myWTF.AppendFormat(@"{0}", Environment.NewLine);
    myWTF.AppendFormat(@"and make this mess a lot{0}", Environment.NewLine);
    myWTF.AppendFormat(@"easier to maintain!  Just keep{0}", Environment.NewLine);
    myWTF.AppendFormat(@"his months, days{0}", Environment.NewLine);
    myWTF.AppendFormat(@"and years in a seperate{0}", Environment.NewLine);
    myWTF.AppendFormat(@"text file </kidding> :-)");

  • Nat (unregistered)

    I think he actually tried to unroll the loop to improve the performance [:D]

  • (cs) in reply to Nat

    This reminds me of a student of mine once in programming 101. The lesson was for-loops. First task. Write a program that prints out "hello world" ten times. So what does this guy do?

    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    </FONT></FONT></FONT></FONT>printf ("Hello World");</FONT>

    </FONT></FONT></FONT></FONT>

    And then he was incenced that I wouldn't give him full marks :)

  • (cs)

    That them-thar 'function call' things in them new-fangled 'libraries' is jes' totally inny-fish-int.
    Jethro says that calendars are for immigrants and carpetbaggers, and, ya know, Jethro is right!
    Inline all the way, 'til the South rises again, boys!

  • (cs) in reply to clockwise
    clockwise:

    This reminds me of a student of mine once in programming 101. The lesson was for-loops. First task. Write a program that prints out "hello world" ten times. So what does this guy do?

    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    </font></font></font></font>printf ("Hello World");</font></font></font></font></font>

    And then he was incenced that I wouldn't give him full marks :)



    He was incensed?

    Watch his work closely. Your student is a potential WTF resource! :p
  • Z (unregistered) in reply to clockwise
    clockwise:

    This reminds me of a student of mine once in programming 101. The lesson was for-loops. First task. Write a program that prints out "hello world" ten times. So what does this guy do?

    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    </font></font></font></font>printf ("Hello World");</font></font></font></font></font>

    And then he was incenced that I wouldn't give him full marks :)



    If the assignment wasn't specified more than the above, then I actually understand the student. Te poor guy gets a functional specification, fulfills it to the letter, and then doesn't get rewarded.
  • Duckie (unregistered) in reply to Z

    I agree. The performance would probarly even be better !

  • (cs) in reply to Z

    In this case, the WTF would have been on the part of the teacher for not spelling out what the assignment really is about.

  • (cs)

    <FONT face=Arial>The biggest WTF, of course, is that he didn't close his <OPTION> tags in the first effort. What a muppet! That's just sloppy.</FONT>

  • (cs) in reply to maribert

    Seen worse. I once replaced 2906 non-blank, non-comment lines with 12 (wrote it down when I did it, 'cuz I thought it might be some kind of a record) -- and added a condition check that wasn't in the original along with error trapping. Now, even the rawest cut-n-paste-n-edit newbie has got to start wondering around line 1400 or so if there's a better way....

  • Warner (unregistered) in reply to Sean

    Sean:
    Maybe the "X" key was broken on the coder's computer, making a for...next loop impossible.

    No excuse: he could have resorted to a do/while loop.... [:)]

    What scares me is that these are supposed to be professional developers??? I fear the day he enters my team.... [6] But wait! I am a Java-developer!!! W00T!! [:P] HE won't be in my team!!! YEAH!!!

     

     

  • (cs) in reply to Maurits
    Maurits:
    cm5400:

    Sean:
    Maybe the "X" key was broken on the coder's computer, making a for...next loop impossible.

    Ever heard of holding down the alt key while typing 120?  There is never an exuse for a broken keyboard.  Just use the alt key and the ASCII number of the letter. Works every time!! [:D]



    Thanks to Word's Insert Symbol feature, you can even program exclusively with a mouse.  Until you need a CRLF, anyway.
    Not even that is an excuse.

    (not exact, can't remember the syntax off the top of my head)

    Public Sub InsertCrLf()
        Word.CurrentDocument.Insert(vbCrLf)
    End Sub

    and assign to a toolbar button or something.
  • (cs) in reply to Warner
    Anonymous:

    Sean:
    Maybe the "X" key was broken on the coder's computer, making a for...next loop impossible.

    No excuse: he could have resorted to a do/while loop.... [:)]

    What scares me is that these are supposed to be professional developers??? I fear the day he enters my team.... [6] But wait! I am a Java-developer!!! W00T!! [:P] HE won't be in my team!!! YEAH!!!

    Until the day he reads 'Java for Dummies'. Fear for your life.

  • anon (unregistered)

    I think its fairly safe to say this guy does not know what an array is.

    I've worked with someone before, and seen the exact same problems, once it was shown to them, they quicky for to grips with loops through data etc.

    Scary thing is, these are qualified people.

     

  • RC (unregistered)

    How does this page work on the first of january???
    name='<%=pday%>' and name='<%=pmonth%>'

    both will be named '1'???

    :D

  • Hank Miller (unregistered) in reply to Warner

    Okay, so this guy was using a paper terminal with broken "w" and "x" keys.   That explains why he didn't have any cut/paste, or alt-120 tricks to fall back on. 

    I want to know why someone would be forced to write ASP code on a paper terminal in this day and age.    For that matter why you would have a paper terminal setup and working, but graphical terminals.  You could buy a new comptuer at worst buy for less than the costs of my time to do it this way instead of right.

    For bonus points you can also find me an editor that works on a paper terminal, and allows saving your work, and exiting without using the 'w' and 'x' keys.  

    Heck, I'd be happy if you could find me a paper terminal with enough supplies that you could use it.   The one I've got needs special paper that I'm not sure where to find anymore.  (last I checked all the keys worked)

  • Karl von L. (unregistered) in reply to clockwise
    clockwise:

    This reminds me of a student of mine once in programming 101. The lesson was for-loops. First task. Write a program that prints out "hello world" ten times. So what does this guy do?

    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    </font></font></font></font>printf ("Hello World");</font></font></font></font></font>

    And then he was incenced that I wouldn't give him full marks :)



    He should have re-done the assignment using a for loop:

    <font face="Courier New" size="2">for (x = 0; x < 1; x++) {
        printf ("Hello World");
    <font face="Courier New" size="2">    printf ("Hello World");
    <font face="Courier New" size="2">    printf ("Hello World");
    <font face="Courier New" size="2">    printf ("Hello World");
    <font face="Courier New" size="2">    printf ("Hello World");
    <font face="Courier New" size="2">    printf ("Hello World");
    <font face="Courier New" size="2">    printf ("Hello World");
    <font face="Courier New" size="2">    printf ("Hello World");
    <font face="Courier New" size="2">    printf ("Hello World");
    </font></font></font></font>    printf ("Hello World");
    }

    </font></font></font></font></font>:D
  • Karl von L. (unregistered) in reply to Karl von L.

    sigh

    That first line should have been:
    for (x = 0; x &lt; 1; x++) {

  • Karl von L. (unregistered) in reply to Karl von L.

    Ok, I give up. There's clearly no way to actually get a less than symbol to appear in a post.

  • (cs) in reply to Z
    Anonymous:
    clockwise:

    This reminds me of a student of mine once in programming 101. The lesson was for-loops. First task. Write a program that prints out "hello world" ten times. So what does this guy do?

    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    <font face="Courier New" size="2">printf ("Hello World");
    </font></font></font></font>printf ("Hello World");</font></font></font></font></font>

    And then he was incenced that I wouldn't give him full marks :)



    If the assignment wasn't specified more than the above, then I actually understand the student. Te poor guy gets a functional specification, fulfills it to the letter, and then doesn't get rewarded.


    Actually, if that's the case, he definitely deserves a big, fat zero.

    "But it works" is a firing offense for me. I'm sick of shit that works now and then costs me an arm and a leg in future maintenance.
  • Tim (unregistered) in reply to anon

    No, in fact they are no qualified people.

  • Tim (unregistered) in reply to Tim

    Ack, that above was in response to this:


    I think its fairly safe to say this guy does not know what an array is.

    I've worked with someone before, and seen the exact same problems, once it was shown to them, they quicky for to grips with loops through data etc.

    Scary thing is, these are qualified people.


  • Tim (unregistered) in reply to Tim

    And I need to learn how to spell. They are NOT qualified people is what I meant.

  • (cs) in reply to Stan Rogers

    Stan Rogers:
    Seen worse. I once replaced 2906 non-blank, non-comment lines with 12 (wrote it down when I did it, 'cuz I thought it might be some kind of a record) -- and added a condition check that wasn't in the original along with error trapping. Now, even the rawest cut-n-paste-n-edit newbie has got to start wondering around line 1400 or so if there's a better way....

     

    Man that doesn't stop them. Believe me I've seen miracles around. There's was a brilliant example produced by a guy from India and then "fixed" by the hosting company guys - a SQL for every case of parameters. The function could take around 10 fields as parameters and had a special case (and executing a special select SQL) for every combinations of parameters (City, State, Zip, Business Category, Company Name, Phone etc). Can you imagine the nightmare of supporting something like this?

    I'm not sure if I keep it or not - I remember I was searching for that a couple of months ago and definitely if I found it I should have sent it to Alex.

  • ding (unregistered) in reply to cjs
    clockwise:

    This reminds me of a student of mine once in programming 101. The lesson was for-loops. First task. Write a program that prints out "hello world" ten times. So what does this guy do?

    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    <FONT face="Courier New" size=2>printf ("Hello World");
    </FONT></FONT></FONT></FONT>printf ("Hello World");</FONT></FONT></FONT></FONT></FONT>

    And then he was incenced that I wouldn't give him full marks :)

    ____


    If the assignment wasn't specified more than the above, then I actually understand the student. Te poor guy gets a functional specification, fulfills it to the letter, and then doesn't get rewarded.

    Actually, if that's the case, he definitely deserves a big, fat zero.

    "But it works" is a firing offense for me. I'm sick of shit that works now and then costs me an arm and a leg in future maintenance.

    WOW.  Your attitude is the real WTF.

    It's not just "that it works", but in fact he fulfilled the requirements to the letter.

    You are making the assumption that the class was tought how to do loops already.  If so, what kind? 

    The teacher should be slapped for not specifying to use a loop, the student should have gotten a perfect score, but then had his code used as an example )shown to the rest of the class), so they could have a group discussion on  the "better" ways to do it.

  • Sean (unregistered) in reply to clockwise

    In my cpsc 100 class we had the standard "write a program that generates a pyramid of *s" for an exam question. It explicitly stated to use loops. Apparently, one of my classmates managed to do a pyramid (with a base of 9 *s) with something like 25 for-loops. hmm.

  • Snaps (unregistered)

    FIRED

  • (cs) in reply to rogthefrog
    rogthefrog:

    I suspect the cyear(pyear,2004) is a function that returns "selected" if $_GET['pyear']==2004 or some other form var ("cOMPAREyear", get it?), to prepopulate the pulldowns.

    If that's the case, having cyear, cmonth, etc. is an even bigger wtf than the hardcoding of all the values.



    Thank you for reminding me once again why I despise PHP "developers".
  • andyandy (unregistered) in reply to cjs

    cjs:

    "But it works" is a firing offense for me. I'm sick of shit that works now and then costs me an arm and a leg in future maintenance.

    So you don't like the "It compiles, ship it!" philosophy? :)

  • (cs) in reply to Sean
    Anonymous:
    In my cpsc 100 class we had the standard "write a program that generates a pyramid of *s" for an exam question. It explicitly stated to use loops. Apparently, one of my classmates managed to do a pyramid (with a base of 9 *s) with something like 25 for-loops. hmm.


    Please please please find that code and post it.

    *holds breath*

  • (cs) in reply to tag
    tag:
    rogthefrog:

    I suspect the cyear(pyear,2004) is a function that returns "selected" if $_GET['pyear']==2004 or some other form var ("cOMPAREyear", get it?), to prepopulate the pulldowns.

    If that's the case, having cyear, cmonth, etc. is an even bigger wtf than the hardcoding of all the values.



    Thank you for reminding me once again why I despise PHP "developers".


    Presumably, you mean "People who learned PHP from a website or dummie's book, and are now calling themselves a developer", and not "Anyone who develops using PHP, whether exclusively or in part."

  • (cs) in reply to ding

    The lesson at hand was for 'for' loops. Do the math.

  • (cs) in reply to Quinnum
    Quinnum:
    The lesson at hand was for 'for' loops. Do the math.


    hmmm.... Ding's post should have been quoted.

    Looks like my first post here is a WTF. whoops

Leave a comment on “Time Well Spent”

Log In or post as a guest

Replying to comment #:

« Return to Article