• Grammer Nazi (unregistered) in reply to Obsessive Quoter
    Obsessive Quoter:
    Mark:
    Now, it wasn’t that Gary was an unlikeable person, he just had a pompous arrogant attitude that got in the way of coworkers in Jake’s workplace from getting to know the true, “hidden” Gary. A self-proclaimed “genius developer extraordinaire”, he was famous around the office for two things.

    First being…pointing out how much of a genius he is! During his morning rounds, Gary would strike up a conversation about [missing word "how"?] his latest round of changes saved the company untold sums of money, all the while, sprinkling in words like “instantiate” and “overload” as often and as irrelevantly as possible.

    Second–., after telling you just how much of a genius he is, Gary would point out that without his efforts, the entire system that managed the company’s supply chain would fail. In short, he was irreplaceable.

    Management, on the other hand, disagreed with Gary’s self-assessment. Despite his bragging and grandstanding, Gary still had trouble meeting deadlines and following functional specs (being a jerk also helped with the decision too).

    On his way out, with one box in-hand, Gary shook his fist at the office shouting "Just wait – you’ll need me and I’ll be gone!" but all everybody simply rolled their eyes at his tirade and returned to work.

    Skip ahead to the next week, and suddenly, jobs such as inventory re-costing hung with not even so much as a mention of a reason in the log.

    A task force was assembled to look into the problem. Jerod looked through the source and found the below method copy-pasted in half of the “classes” Gary had contributed during his tenure to the system’s supposedly unattended services.

         ' Checks for the existence of the file. If it does not exist, 
         ' tries to create it. –Gary B. 12-OCT-05
         ' Added confirm box for debugging purposed – Gary B. 13-OCT-05
    
         Private Sub FileCheck()
             Dim FileExists As Boolean
    
             If File.Exists(FilePath) Then
                 FileExists = True
             Else
                 Try
                     MessageBox.Show( _
        	         "File does not exist. Attempting to create needed files", _
        		 "File(s) Missing", _
        		 MessageBoxButtons.OKCancel, MessageBoxIcon.Information)
                     'Populate file with default text
                     SW = New StreamWriter(FilePath)
                     SW.Write("https://initech-global.com/scripts/mc.exe/scrip.w")
                     SW.Write("\\masvr8b\share\scrip\,")
                     SW.Write("adiamond,")
                     SW.Write("hunter2,")
                     SW.Write("False")
                     SW.Close()
                     FileExists = True
                 Catch ex As Exception
                     MessageBox.Show(ex.ToString, "File Creation Error", _
        	          MessageBoxButtons.OK, MessageBoxIcon.Error)
                 End Try
             End If
         End Sub
    

    Found the error ^^^

    You missed some.

  • Dazed (unregistered) in reply to Satanicpuppy
    Satanicpuppy:
    I've worked with at least half a dozen people more irreplaceable than that. Last one was a woman whose favorite trick was playing the shell game with the temporary files generated by the accounting system. She was *convinced* we'd hire her back in a week, but it only took me 4 days to rip out her crap.
    I've seen it happen with a manager as well. He was really screwing our project around, constantly changing his instructions and never writing anything down. One day when a particularly frustrated colleague told him that if he wrote nothing down he was no good at his job, he arrogantly replied "on the contrary, if I write nothing down it makes me irreplaceable". But he made the mistake of saying it where four or five project members could hear. I encouraged them to escalate it up the line, and the manager was gone two weeks later.
  • ÐÃÆÃà (unregistered) in reply to ÐÃÆÃÃ
    ÃÃâ€Ã¢â‚¬â„¢ÃƒÆ’‚ÃƒÆÃÃ:
    ÃÃâ€Ã¢â‚¬â„¢ÃƒÆ’‚ÃƒÆÃÃ:
    Is that what you told frits when he started spanking boys in Sunday school?
    Why are you ripping off my username?
    Why are you ripping of my username?
  • aepryus (unregistered) in reply to Mark

    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.

  • Björn Tantau (unregistered)

    The Real WTF is that he didn't set FileExists to FileNotFound.

  • Jimbo (unregistered)

    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!

  • trwtf (unregistered) in reply to aepryus
    aepryus:
    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.

    That's not debugging code.

  • by (unregistered) in reply to aepryus
    aepryus:
    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.

    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.

  • LANMind (unregistered)

    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.

  • Ryusui (unregistered) in reply to LANMind

    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.

  • by (unregistered) in reply to Ryusui
    Ryusui:
    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.

    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...

  • Jason (unregistered)

    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?

  • proofreadplease (unregistered) in reply to Dan
    Dan:
    proofreadplease:
    Management, on the other hand, disagreed with Gary’s self-assessment. Despite his bragging and grandstanding, Gary still had trouble meeting deadlines and following functional specs (being a jerk also helped with the decision too).

    Which decision? To have vanilla icecream instead of triple choc at the next staff party? To buy Gary a new pair of football boots with the social club's yearly takings? I'm hanging on this.. which decision is this referencing?

    I can only assume that Gary got sick of waiting on management's decision and quit his job for a much better paying one where his services were appreciated.

    Yeah I guess his biggest failure was to assume the reader to be capable of thought and having the ability to connect the dots.

    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.

  • by (unregistered) in reply to proofreadplease
    proofreadplease:
    Dan:
    proofreadplease:
    Management, on the other hand, disagreed with Gary’s self-assessment. Despite his bragging and grandstanding, Gary still had trouble meeting deadlines and following functional specs (being a jerk also helped with the decision too).

    Which decision? To have vanilla icecream instead of triple choc at the next staff party? To buy Gary a new pair of football boots with the social club's yearly takings? I'm hanging on this.. which decision is this referencing?

    I can only assume that Gary got sick of waiting on management's decision and quit his job for a much better paying one where his services were appreciated.

    Yeah I guess his biggest failure was to assume the reader to be capable of thought and having the ability to connect the dots.

    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.

    Especially since you can include details when READING a story... Get off your high-horse and stop being douche-bag.

  • (cs) in reply to Jason
    Jason:
    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?

    Why would anyone make this up?

    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?

  • (cs)

    TRWTF is that the message box doesn't contain the filename.

  • (cs) in reply to Invevitably
    Invevitably:
    In all the efforts I've seen to intentionally mangle code to secure your position as the "only developer who knows how to handle this program", the developer in particular who mangled the code is shown the way out eventually and the new coders manage to un-mangle things over time without issue.

    Bottom line, don't do it do you really want to be known as "that guy who could have only intentionally mangled that code."

    I wish I worked at the magical place you work at...

  • ysth (unregistered) in reply to Ryusui
    Ryusui:
    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.

    I think it's easy for people unfamiliar with the platform in question to just assume MessageBox does something reasonable when running unattended.

  • life (unregistered) in reply to Kanthos

    You are winnar You gets +1 free internets

  • Ralph (unregistered)

    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?

  • (cs) in reply to proofreadplease
    proofreadplease:
    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.

    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:

    On his way out, with one box in-hand, Gary shook his fit at the office shouting "Just wait – you’ll need me and I’ll be gone!"

    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.

  • Larry (unregistered)

    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:

    • Incremental backups, never a full, because that would take too long.
    • Same tape overwritten daily, because we can't afford more.
    • Backup program crashing daily, never investigated, because, well, just because.
    • Restores never attempted, because, who knows... what's a restore?
  • (cs)
    Mark:
    A task force was assembled to look into the problem and look over the source and found the below method copy-pasted in half of the “classes” Gary had contributed during his tenure to the system’s supposedly unattended services.
    Holy run-on sentence, Batman! C'mon, you may want to think about breaking that one up a little bit, puh-leez?
  • PseudoBovine (unregistered) in reply to Ryusui
    Ryusui:
    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.

    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?

  • Cheong (unregistered) in reply to PseudoBovine
    PseudoBovine:
    Ryusui:
    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.

    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?

    My guess...

    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.

  • Patrick (unregistered)

    Warning: The value set to FileExists is never used.

  • Beta (unregistered) in reply to Invevitably
    Invevitably:
    In all the efforts I've seen to intentionally mangle code to secure your position as the "only developer who knows how to handle this program", the developer in particular who mangled the code is shown the way out eventually and the new coders manage to un-mangle things over time without issue.

    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.

  • Brendan (unregistered) in reply to Mason Wheeler
    Mason Wheeler:
    boog:
    First being…pointing out how much of a genius he is! ... Second...he was irreplaceable.

    Management, on the other hand, disagreed...

    Really? You mean the system worked?

    I've seen people do this before, but usually management buys into the bullshit. Every 6 months they claim to be getting offers elsewhere so that management will give them a pay increase to stay.

    Semi-off-topic: I actually had to game the system like this once. My boss wanted to increase my pay to match that of same-titled developers on another team, but the budget office refused to budge (no pun intended... well, maybe some). The other team had new hires and open positions at 20% more than my salary.

    So my boss ordered me to apply for a job with them. When I got an offer he complained to the budget office about losing me, that I was irreplaceable, and it was enough to secure a pay increase. The other team wasn't very happy with him after that.

    Aren't office politics fun?

    You win the Internet today. :D

    And his boss wins the best boss of the year award.

    Must be nice working for someone like that.

  • iMalc (unregistered) in reply to tom103
    tom103:
    Yet another WTF here is showing the message box with 2 buttons (MessageBoxButtons.OKCancel), but not checking the result...
    Actually, that in itself is a valid tactic...

    (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!

  • KittyKat (unregistered) in reply to Jason

    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 ....

  • MrMean (unregistered) in reply to operagost
    operagost:
    I thought it was pretty obvious that the WTF is the dialog box in server code.

    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.

  • Ray (unregistered) in reply to iMalc

    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.

  • (cs) in reply to bjeeb
    bjeeb:
    Unattended services should not require user intervention to click an 'OK' button.

    That's why the magic of ClickYES! was invented.

    With it, even a VB code monkey can be turned into an "unattended service programmer" ;-)

  • Matt Westwood (unregistered) in reply to Ray

    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.

  • (cs)

    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.

  • BentFranklin (unregistered)

    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?

  • trwtf (unregistered) in reply to chrismcb
    chrismcb:
    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.

    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.

  • golddog (unregistered)

    So the real fix is to return FILE_NOT_FOUND, right?

  • bdcrazy (unregistered) in reply to boog

    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...

  • (cs) in reply to Brendan
    Brendan:
    And his boss wins the best boss of the year award.

    Must be nice working for someone like that.

    It was. He was even a great supervisor for someone with no programming skills. He knew the business well, knew what the customers needed, did what he could to help me understand the business logic, and then stayed out of the way so I could do my job. Probably the best boss I've had up to this point.

    Unfortunately, they later "re-organized" and moved all of his developers (including me) to another team. Shortly after that I left to work elsewhere.

  • Wonko_The_Sane (unregistered) in reply to Mike D.
    Mike D.:
    Wonko_The_Sane:
    shook his frist?

    ...

    Sorry

    ... No, you are not.

    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...

  • methinks (unregistered) in reply to aepryus
    aepryus:
    I really don't understand the WTF. Obviously, posting the same method every where is a WTF, but the method itself appears to be just boot strapping a configuration file.

    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...

  • (cs) in reply to boog
    boog:
    I'm wondering if the problem is anything like this. Since the failing jobs just hang, with nothing in the logs.
    You know, MSIexec instances when run through SCCM do exactly that when they encounter a problem. Displaying a messagebox (easy to confirm via Process Explorer's stack peek featire) and waiting for someone to click the OK that's not displayed anywhere. It also has the nice side effect of keeping the whole SCCM queue on hold untill the msiexec is hilled or OS rebooted. Well, TRWTF there is SCCM itself... but I'm too tired of fighting with it to rant.
  • Comment Man (unregistered) in reply to Ryusui

    It worked until the needed file was deleted.

  • (cs) in reply to Jason
    Jason:
    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?

    It's not made up. I've seen it.

  • (cs) in reply to Patrick
    Patrick:
    Warning: The value set to FileExists is never used.
    I wondered if anyone else would notice that.
  • drusi (unregistered) in reply to Comment Man
    Comment Man:
    It worked until the needed file was deleted.

    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.

  • MDRoz (unregistered)

    Clearly these batch jobs were scheduled to run automanually...

  • only me (unregistered) in reply to Larry
    Larry:
    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:

    • Incremental backups, never a full, because that would take too long.
    • Same tape overwritten daily, because we can't afford more.
    • Backup program crashing daily, never investigated, because, well, just because.
    • Restores never attempted, because, who knows... what's a restore?

    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

  • Geoff W (unregistered) in reply to aepryus

    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.

Leave a comment on “Unattended Consequences”

Log In or post as a guest

Replying to comment #:

« Return to Article