- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I like the fact that the code needs to be fixed every year to make the current year available in the year pull-down.
Admin
Two words: job security :-)
Admin
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.
Admin
Magic Numbers Truly ROCK!
Admin
Anyone got a rope? 'bout time we's had ourselves a lynchin'.
Admin
Maybe the "X" key was broken on the coder's computer, making a for...next loop impossible.
Admin
Seen lots and lots of stuff just like this, unfortunately =/
Admin
Still no excuse. I'm sure he could have found an x somewhere to copy and paste.
Admin
Writing idiotic code that could've been written in around five lines? You better BELIEVE that's a paddlin'.
Admin
Folks, this type of code is very common among the graduates of Krusty the Klown Kollege of Komputing. Yikes! :S
Admin
oh what an ASS MONKEY.
Admin
Now THAT is funny!!!
Admin
Also like that I could choose February, 31th. Very Nice!
Admin
Admin
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]
Admin
Maybe this programmer got paid by the lin^H^H^Hcharacter?
dZ.
Admin
Thanks to Word's Insert Symbol feature, you can even program exclusively with a mouse. Until you need a CRLF, anyway.
Admin
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> :-)");
Admin
I think he actually tried to unroll the loop to improve the performance [:D]
Admin
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></FONT></FONT></FONT><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>
And then he was incenced that I wouldn't give him full marks :)
Admin
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!
Admin
He was incensed?
Watch his work closely. Your student is a potential WTF resource! :p
Admin
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.
Admin
I agree. The performance would probarly even be better !
Admin
In this case, the WTF would have been on the part of the teacher for not spelling out what the assignment really is about.
Admin
<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>
Admin
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....
Admin
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!!!
Admin
(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.
Admin
Admin
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.
Admin
How does this page work on the first of january???
name='<%=pday%>' and name='<%=pmonth%>'
both will be named '1'???
:D
Admin
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)
Admin
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
Admin
sigh
That first line should have been:
for (x = 0; x < 1; x++) {
Admin
Ok, I give up. There's clearly no way to actually get a less than symbol to appear in a post.
Admin
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.
Admin
No, in fact they are no qualified people.
Admin
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.
Admin
And I need to learn how to spell. They are NOT qualified people is what I meant.
Admin
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.
Admin
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.
Admin
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.
Admin
FIRED
Admin
Thank you for reminding me once again why I despise PHP "developers".
Admin
So you don't like the "It compiles, ship it!" philosophy? :)
Admin
Please please please find that code and post it.
*holds breath*
Admin
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."
Admin
The lesson at hand was for 'for' loops. Do the math.
Admin
hmmm.... Ding's post should have been quoted.
Looks like my first post here is a WTF. whoops