- 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
Poor Hashini
Admin
Goddamn Kendrick.
Admin
Now that's an interesting piece of code! And quite good, actually. Very informing comments, many useful functions;)
Apart from being crazy, this guy must be a quite good programmer;)
Admin
That is not so much a WTF, but rather an OMG. And what's he got against Kendrick, anyway?
Admin
Too far fetched to believe IMO
Admin
Admin
Okay, that comparison algorithm is not nearly generic enough. It needs to allow for the user to weight the various attributes in a scaled fashion- it's simply too naive. I mean, think about it- a "1" face is likely a show-stopper, no question. But a "5" face should, theoretically, be average. It shouldn't affect the ordering of the Girl struct, because even if another girl has a "4" face, but a "6" body, they should be close in order.
So, a non-WTF algorithm for quantifying people based on superficial physical characteristics would have the following features:
That sort of lazy code writing is TRWTF.
Admin
WTF? Why does this guy hate me so much?
Admin
Unfortunately Dave's not accounting for t*#s, a$$ and body. If you don't remember to check your edge conditions you can end up with TRWTF the morning after. I can't help but think that better unit testing might spare him some embarrassment...
Admin
Clearly, using the variable name "cum" was a bit of a faux pas. Otherwise, looks very well done and professional.
Admin
if (girl.Name == "Darcy") return cum;
Admin
Why Dave? WHY?
Admin
Fixed?
const bool wouldIDoHer = true;
Admin
FTF Dave
Admin
TRWTF is that you made a copy/paste error in a post. AllGirls[0].legs is set three times (you forgot to change your index).
Captcha opto -- opto mus prime's first name.
Admin
You forgot: const bool didSheSlapMe = true;
Admin
Admin
I was tempted to write pseudocode.
Admin
TRWTF is storing information about "short legs". Everybody knows that legs should be long! Now his weighting will be all backwards.
What, it doesn't work that way? Computers don't make that kind of call when reading source code? Hrmph. Well, it should.
Of course, if he hadn't told anyone, what're the odds that this would even have been noticed, since it wouldn't show up on a diff unless you nailed one of those two versions?
Admin
Admin
I think we found the one instance where Access would have been the better choice.
Admin
FTFY (why not use library functions that are already there?)
Admin
I can also guess what kind of appointment Dave has at 5pm.
Admin
No, Darcy would have been the better choice.
Admin
You want to get the prostitute at the start of her shift.
Admin
Clearly, this disproves the stereotype that computer programmers are rage-filled and socially awkward.
Admin
Short boobs better than long boobs.
Admin
Dear Dave,
A better idea would be to do a quick Google search and find out that you can in fact delete a file from a Subversion repository (if you use the URL).
And Noah, do you even knowah anything about Subversion?
kthxbye
Admin
Now, plenty of our coders write stuff on their own time, either proper code or fun little algorithms like Dave's "girl-ranking" algorithm. I really don't think it is much of a stretch for a non-work file to end up in a synchronisable work area. If that happens and you don't pay attention whilst syncing, crap like this is inevitable. I've never come across a girl-ranking algorithm but I have certainly seen plenty of examples of inappropriate files being commited to source control due to a bad sync.
Admin
Admin
Looks like Kendrick isn't the one who's gonna get blackmailed.
Admin
Still, blindly adding files to source control is incompetent anyway... Probably a Windows n00b.
Admin
Admin
//Remeber the f*cking appointment at 5 PM today
I hope the f*cking appointment is for an interview somewhere else.
This code is just begging to be put up on every bulletin board in the office.
CAPTCHA: iusto
Admin
You had me laughing at my desk. I tried sniffing coke because of that Darn ice cubes...
Admin
It's not my fault that finding optima in a search space is an interesting problem.
Admin
It says right in the comment: it's a f*cking appointment.
Admin
I've found the WTF in Dave's girl-ranking algorithm. It makes all the calculations correctly but fails to handle the GirlWouldntTouchYouWithATenFootBargePoleException that gets thrown as soon as he attempts to interop with the girl.
Admin
Why square everything in the comparison function? Without negatives it makes no difference. With negatives someone with a -5 for their face would rate higher than a 4.. didn't dave get this code reviewed?
Admin
So, the other day I was making the case that code was not a window into the emotions, experiences, and ultimately the soul of the developer.
After seeing today's example, I stand corrected. Well played, TheDailyWTF. Well played.
Lorna Doones. No question. Cookie always beats cracker.Admin
Where's the function to choose between Lorna Doones and Animal Crackers?
I figured the WTF would be that he's always choosing Doones because Lorna.wouldIDoHer = true, but is false for animal crackers.
DaveE
Admin
Maybe the appointment is for his daily spell checker? "Remeber"? Where's the second M?
Admin
However, AllGirls[n].boobs is never set at all, which was apparently the point of the whole edit...
Admin
I believe the f*cking appointment is in a hotel, discussing a "job" with either Lauren or Darcy. Hashini apparently didn't make the cut.
Admin
Admin
//ONLY EDIT WHEN NOBODY ELSE IS IN THE OFFICE //ONLY EDIT WHEN NOBODY ELSE IS IN THE OFFICE
Wonder if he'd been caught editing this during work hours in the past.
Admin
not sure about the return statement, every time I've implemented this I've used an out parameter..
sorry.
Admin
He probably meant to do root-sum-squared but forgot the root.
Admin
Consider (assume only boobs and face are scored):
Girls[0].boobs = 2; Girls[0].face = 2;
Girls[1].boobs = 3; Girls[1].face = 1;
In this case, under a simple linear comparison, both girls would score equally. But with attributes squared, Girls[1] would make a better lay, as her cracking norks more than make up for her hideous visage.
Admin
Coincidentally, it's even easier to completely demolish your repository while doing so.