- 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
Admin
Admin
Admin
enh... The comment says it's debugging code. Perhaps he was fired 14-OCT-05 and didn't have an opportunity to remove it.
Just seems pretty ho hum.
Admin
The Real WTF is that he didn't set FileExists to FileNotFound.
Admin
Every workplace (even non-IT shops) has a Gary (or seven).
It makes it darn hard for geniuses like us to get recognised, when turkeys like them take all the limelight!
Admin
That's not debugging code.
Admin
But the fact that he checked it in is just bad... In .Net, there is the debug directive which you can wrap your debugging code in safely. It will only be executed locally but when you deploy to production, you change it to a release build which removes all the debugging symbols and skips the debug line.
This I have done, and checked into the code base because all builds to production are release builds.
Admin
I think you're all wrong. I think that this guy coded it up to fail in just the way that it did, and make himself look like a moron. He designed this scheme to cause damages via incompetence, not malicious intent. TRWTF is that he got away with it.
Admin
I don't get why so many people here have trouble spotting the WTF. "Unattended" and "MessageBox" do not mix. And he used it twice.
The thing I don't get is how the hell it ever worked, even before the company fired him, but I suppose a remote desktop answers the question easily.
Admin
Unless of course LANMind was right: he probably planted this easter egg and fudged the comments (if that's the only timestamp we're going off of).
captcha: praesent - He left a nice praesent for his x-employer...
Admin
I assume Gary was so indispensable that he never called in sick or took a vacation day?
methinks the real WTF here is that someone makes up WTFs.
Slow WTF day, anyone?
Admin
Invent the dots you mean?
There is nothing in the article which mentions the person being fired. Sure we can assume it, but having to assume such a fundamental aspect of the story means that it is poorly written.
If you enjoy badly written things then great, life must be very very comfortable for people like you with very low standards. For me, when I read a story I would like it to include all the important parts.
Admin
Especially since you can include details when READING a story... Get off your high-horse and stop being douche-bag.
Admin
No, let me rephrase that. I'm sure most of the readers here have met several "Gary"s in their careers. With so many (dimly-)shining examples out there, why would anyone need to make this up?
Admin
TRWTF is that the message box doesn't contain the filename.
Admin
I wish I worked at the magical place you work at...
Admin
I think it's easy for people unfamiliar with the platform in question to just assume MessageBox does something reasonable when running unattended.
Admin
You are winnar You gets +1 free internets
Admin
OK I've read all youre comments but Im still confused. If there's no user at the computer to run the program, why bother writing it in the first place?
Admin
Sure, it doesn't come out and say he was fired, terminated, let go (or any other euphamism.) But if you read the story, the you say this:
Gary was on his way out, with a box... Sure maybe he took a long vacation, but generally you only leave the company, with a box in had when you are fired.
But really, it doesn't matter if he was fired, or transferred or went on a long vacation (although being fired might mean his user account is not longer valid.) The point is there was a problem with his code after he left. And we KNOW he left from reading the story.
Admin
I worked someplace where my predecessor had laid an extensive minefield of logic bombs that effectively made her irreplaceable. But it was hard to hold her at fault when they were merely a real-world codification of the extensive minefield of logic bombs that constituted her brain.
Here's a little taste:
Admin
Admin
I got that, but what I didn't get is why it wasn't a problem until a week after Gary left. What was happening in the years between when Gary put it in (it was copy pasted everywhere, so I assume it had been there for a while) and when he left? I assume that stalling issues weren't a routine problem, so why weren't they triggered?
Were these jobs being run on Gary's personal workstation (a WTF in itself), or how was he able to acknowledge the dialog boxes while he was still employed?
Admin
In Win 2000, service runs in console session. So when the admins see the program not working and logs on the console, they'll see the popup and dismiss it without reporting because they can handle it...
Somehow the server moves to Win2003, and in Win2003 your service now need to tick the "interactive with desktop" option to display a message box. Assuming the Admin didn't figure out that at that time, this could seem to explain it.
Admin
Warning: The value set to FileExists is never used.
Admin
I guess you've never worked in the defense industry. I've seen this work over and over; the developer who does this rises in prestige and pay, lesser coders are not permitted to refactor, unmangle or otherwise un**** the code in question, and the coders (like myself) who write clean code that works and that's easy to hand off make themselves expendable.
Admin
And his boss wins the best boss of the year award.
Must be nice working for someone like that.
Admin
(Long ago I once worked on a product that aparently when something went critically wrong, it used to just show a messagebox with some tech support related information and an OK button. However users would aparently just click OK before calling for help, and lost all traces of what the error was. So the solution was aparently to change it to have the Abort Retry Ignore options, but simply ignore the chosen option. Because users now thought it was important to choose the right option, but couldn't actually decide what the right option was, they would actually call before clicking and report the problem information.)
... all's fair in the game of psychological warfare!
Admin
This code seems to be run on the case of a file being removed, seems like a edge case for the program to run. Perhaps on sick days, this paticular code never ran, but after he left, developers started to clear up the code base ....
Admin
Yeah, it was so obvious that I saw it, and thought "nah, that can be it" and continued to look for TRWTF.
Captcha: "damnum" , as Ium damnum youm to hellum.
Admin
Whether or not that's the right response to a critical failure, I love the psychological warfare.
My experience has been that many users will report error messages only in the vaguest possible terms, so I try to make sure that the few that are really needed have at least one memorable phrase that stands a chance of surviving to reach me.
Admin
That's why the magic of ClickYES! was invented.
With it, even a VB code monkey can be turned into an "unattended service programmer" ;-)
Admin
A colleague once proposed the idea that for every significant and well-understood error condition, we would get the app to display a particular picture on the screen, possibly with a timestamp appended. Then the support call would go like this:
"I was working away, and suddenly I got this picture of a field of corn."
"Aha - that means the format of the report file is dodgy. Send me the blahblahblah ..."
We could never get management buyin, so had to continue with the hit-and-miss technique of expecting the users to be intelligent and computer-aware.
Admin
The WTF is that so many people think that using MessageBox.Show will "magically" display it on YOUR computer, and not the computer that is actually running the program.
THAT's the WTF, not the use of MessageBox itself. Using a MessageBox to display an error or a notification is perfectly fine; the problem is that there are too many people who add it in as a way to display an error... and never realize that it's not going to display on their box, but on the server, and if it's modal it's going to hang.
Admin
Perhaps the WTF is that Gary was remoting in to clear the messages and he thought that was enough to assure job security. So the WTF is how laughably lame his timebomb was. Something like that?
Admin
Well... maybe he won the company raffle, and got a box of neat stuff? Didn't think of that, didja, Mr. Smart Guy?
...or maybe the obvious conclusion is obvious.
Admin
So the real fix is to return FILE_NOT_FOUND, right?
Admin
On first glance, I thought all his programming was on an external server he controlled. So when he left, he could just turn disconnect the server and all the code that was running there wouldn't work and everything would come crashing down, hence irreplaceable. Though I've know some people who would actually think that was a good idea because 'their' server ran faster...
Admin
Unfortunately, they later "re-organized" and moved all of his developers (including me) to another team. Shortly after that I left to work elsewhere.
Admin
I should probably point out that this wasnt simply an attempt to post the word "Frist" when the article was first published it contained a typo reading "Shook his fit"... it just happened that when I noticed this there were no other comments... I dont know what came over me, but I felt obligated to type frist... and for that I am sorry.
PS. I know I wasnt first... and I should have quoted the article to show my working...
Admin
You do not understand that displaying a (possibly modal) dialog in a headless server environment - first for displaying some information and, even worse, instead of logging an error message - is as big a WTF as it can get?
OMG, I hope you are not in the industry...
Admin
Admin
It worked until the needed file was deleted.
Admin
Admin
Admin
Exactly. I don't know how people asking "then why didn't it fail before/as soon as he left?" aren't getting this, unless it's just a case of seeing the trees instead of the forest.
Admin
Clearly these batch jobs were scheduled to run automanually...
Admin
Man, if you said he, I would ask if you worked at my old company. Scenario. 1) database crashes at remote plant 2) try to talk admin ( secretary ) through restore 3) restore does not work 4) drive 1 hour to plant 5) insert one and only backup tape 6) restore fails 7) check tape - empty 8) read backup script that sends backup to /dev/null 9) sigh 10) drive back to home plant - create back of db 11) drive to remote plant 12) restore db 13) fix backup script, at all plants
Admin
The issue is from the context this appears to be some sort of batch process. If the configuration file does not exist the behavior should be to create a new default configuration file and continue operation. The trouble is this genius pops up a message box using msgbox() which at least in his code won't return until someone clicks it. So as the author points out the jobs would hang.