|
|
|
| Non-WTF Job: IT Applications Manager at Questex Media Group (Auburndale, Ma) |
| « Prev | Page 1 | Page 2 | Page 3 | Next » |
This one is called "poor man's conditional breakpoint". |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 13:49
•
by
Anonymous
|
|
great idea - though this does take away some sidebar fodder.
|
|
yayyyyy!! code WTFs -- lots of them!
|
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 13:53
•
by
Bradlegar the Hobbit
|
Shouldn't that be twentySomethingSpaces?
captcha: awesomeness. Just like today's WTF! |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 13:58
•
by
Yuriy
|
twentyFiveSpaces. I'm guessing the requirements changed to require more spaces, but they didn't feel like changing the variable name everywhere it's used. |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 13:58
•
by
Volmarias
|
|
Ah, brillant. It's been a while since we've had a delightful smorgasbord of code snippets. These are all fortunately more hillarious than horrid.
I particularly like how Sunday is Admin day. I suppose they decided that it would be more empowering than Casual Fridays. |
This looks to me like the developer just needed a place to stick a breakpoint so he could start stepping through the code when it got to customer #7742, so he could figure out why it was failing for that customer. At least, that's why *I've* written code like this. |
Beautiful in its simple WTF'ery. Probably this should be something like #define DELIMITER "|" |
In a loosely typed language, this could actually have an effect similar to
no? e.g., if ISend is actually (int)14, the 'wtf' line of code would convert it to a (bool)true, correct? |
... which is part of the house that Jack built? (Captcha: Chocobot. Mmmm....) |
|
MakeCum reminds me of one of my earlier efforts, when I had to work on a fund accrual generation system, or the FAG system, which consisted of FAG customers, FAG products, FAG rates, etc...
|
|
My Favorite: if (cust = "Wal-Mart") order date := dateFromEDI ship date := dateFromEDI - (dayof week(today)) + day of week end if so when you get to day 1, usually monday what happens? |
Let's be kind and assume the missing comment is something like:
|
Now, now, that's perfectly explainable. You've got to account for if ISend == FileNotFound when you're converting from "robust" Boolean to "boring" Boolean values. |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 14:13
•
by
Wyatt Earp
|
Placing a non-conditional breakpoint under the if is significantly faster than placing a conditional breakpoint in the code if this is in a loop that gets executed a bunch of times (at least this was true in VS.NET 2003). |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 14:16
•
by
firedup
|
Nice! |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 14:20
•
by
firedup
|
A few projects back I worked with a girl 3 months out of school. We had some coding style rules, one of which was 'descriptive variable names'. Instead of, as you suggest, "DELIMITER", she used something like: "THE_CHARACTER_THAT_SEPARATES_FIELDS_IN_THE_PARAMETER_STRING". |
|
Sunday is admin day is pure genius. I can't believe I haven't seen that anywhere, before; you can bet I'm going to start using it. |
Please try to keep Coded Smorgasbord submissions small and no more than eight lines of readable code.So as long as the code is not readable, any length is ok... |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 14:46
•
by
pjsson
|
I guess no regular users will use the application on Sundays, so it is safe to assume that anyone using the application on a Sunday is an admin. At least until some user figures out if he changes the date of the PC clock to Sunday then you will get full admin privileges. |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 14:47
•
by
science_gone_bad
|
|
Or even better, the system I worked on named by the Marketing Wonks: CRP Had us laughing for an hour since we definitely had the fastest CRP around |
Of course, this is useful. Imagine what would happen if the value of lSend equals FileNotFound! |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 14:51
•
by
Dark
|
See, this is *why* such code is wtf :) If ISend is actually (int) 14, then that line of code would convert it to a (bool)false. Because it compares ISend = True, instead of just using ISend as a conditional. And they're not going to be equal.
|
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 14:52
•
by
marvin_rabbit
|
I'm guessing that the extra spaces were from Alex's anonymisation. We wouldn't want top-secret company info leaking out. |
Hmmm That's not soooo bad, I mean: Boss: Write a module that handles .csv files (comma separated values) Programmer: Ok [A few days later] Boss: Ok, here is a .csv file to try your module: File: data;moredata;another data; etc Programmer: ..... [More days later] Boss: the client sent this file, almost like the ones we'll use in production Second File: data-moredata-another data- etc. And so on... The easiest solution is to #define COMMA Now I dare all of you to tellme that this never ever happened to you...
Captcha: captcha: captcha: captcha............. |
I'm outraged. What about Opera? You can't have Opera browsers going to/skylights/cgi-bin/skylights.cgi! Clearly you have to direct them to/skylights/cgi-bin/skylights.cgi! This is browser discrimination!--Rank |
|
How many of you counted the spaces? :)
|
Can... hardly... keep... a...
I used to try to avoid the "cum" abbreviation whenever possible,
|
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 15:23
•
by
anonymous
|
I interpret it as, anyone working on Sunday must need to get work done, and doesn't have time to screw around with potential permission issues, or getting hold of an admin to grant him permissions. (Our non-admin users do not have the privilege to change the clock, so, we don't have to worry about the problem you describe. We only have to worry about them coming in on Sundays.) |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 15:26
•
by
Botia
|
|
Man, it's good to see some nice code WTF's! This is the stuff that just makes your day.
|
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 15:33
•
by
Reed
|
|
On a really basic intellectual level, programming is about coming up with elegant ways to describe things that happen. Remember, always name it what it's *for*, and *why it exists* not what exactly it does! Otherwise, why bother with any kind of structured high-level programming? Reed
Pro |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 15:34
•
by
Rob
|
|
I always wanted to create a help desk system called "My Pants". Support: "Hmm, I've never heard of that. Let me search my pants and see what I can find." Support: "I'm sorry, My Pants is down, so I can't answer your question." Support: "I seem to recall seeing something about that in My Pants." The 14 year old humor possibilities are endless! |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 15:46
•
by
Jeff S
|
Don't forget what the Bible says ... "On the 7th day, the hackers shall rest." Bravo, Alex! Best post in a long, long time .... thanks for giving me some good laughs on a busy Friday afternoon !
|
Maybe the programmer was concerned the int would be initialized with 64 bits, so he used this to try to specify a 32 bit integer, thus conserving memory. How many comments the last few months have speculated The Daily WTF was running out of material? Ha! |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 15:57
•
by
drdamour
|
This is all language dependant, in VB6 some very strange things happen with implicit conversions: Dim i As Integer x1 and x2 will be false, but x3 is true? but that really is the WTF because that iif is stil useless, could have just been lSend = (lSend = True) Dim i As Integer i will be 0 in VB6, so it can be passed to a function taht only excepts 0 or -1, at least that's my guess to the reason |
|
"Sunday is admin day" reminds me of when I worked for a large Geographic Information System company. We had a password backdoor for the benefit of the "specialists" that we'd send out to customer sites to help them with their setup and customization. Originally, the secret password was the day of the week spelt backwards (ie "yadnus"). But our specialists couldn't get that right even if they wrote the rule on their hands, so we had to change it to a single asterisk. The specialists actually managed to remember that. Unfortunately they taught it to all the customers, so in 6 years of working there I never saw a customer using a real password.
|
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 16:00
•
by
ptomblin
|
According to a lot of spam I get, there is help available if your cumQty isn't high enough. |
|
"The Pilot Episode" - Is that a reference to the first ever episode of The X Files? captcha: poprocks - The first ever candy that rocked. |
|
14 year old humour - I work with a database called "MasterData". Not that funny if you are Kiwi like my colleagues, as they pronounce data the American way (First syllable rhymes with bar). However, I'm from the UK and for me it rhymes with day. Try saying it my way, out loud... |
|
What? No XML ?! <g> |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 16:12
•
by
ParkinT
|
I imagine it could be worse. Someone from New England who often adds nonexistent "r" to any word ending in a vowel sound (like idear for idea) ! |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 16:14
•
by
a.non
|
lucky you assigned in he order you id, seeing as you declared 2 variants and 1 boolean:
|
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 16:19
•
by
Matt S
|
|
This was actually a boolean variable, which defaults to false in VB6. I think the original intent was to change it to true if it wasn't already, but lSend = True would have actually worked.
|
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 16:37
•
by
Oliver Klozoff
|
What Americans are you talking about? I've always pronounced it "day tuh". |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 16:44
•
by
BradC
|
Lol, nice. Support: "Please hold. Sysadmin Julia currently has My Pants down for servicing." Support: "I'm sorry, My Pants is a little slow today..." Support: "I'm sorry, I can't seem to find that in My Pants."
|
|
Re the JetStar example: I don't have a problem with that -- it's expandable/updatable for the future. Harmless at worst; MIPS are cheap. Still funny, though... Captcha: stfu |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 16:52
•
by
Solo
|
I do it too, but I don't let anyone know. I clean up after myself. The next thing you know, another drone is poking through the files checked in with my name on it looking for that kind of thing :) captcha: random. As in random code generation. |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 16:53
•
by
Solo
|
#define PIPE "," |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 16:56
•
by
Anonymous
|
That's almost /too/ good. Of course, it'd be just the opposite if the following were to happen: "I'm sorry, there seems to be a problem with My Pants today. We had to bring it down, we've been having almost non-stop core dumps this moring." |
Re: Coded Smorgasbord: The Pilot Episode
2006-09-29 16:59
•
by
John Meikenson
|
|
That is exactly what that is. It should have been removed during a peer review (HA!), but it's definitely not a WTF.
|
| « Prev | Page 1 | Page 2 | Page 3 | Next » |