Out To Lunch



  • DevDisasters

        <h3 id="ph_pcontent1_1_MainHeading" class="title"><a href="http://visualstudiomagazine.com/articles/2014/02/01/out-to-lunch.aspx">Out To Lunch</a></h3>
        <p id="ph_pcontent1_1_Deck" class="deck">Why user requests shouldn't always be granted.</p>
        
        <ul id="ph_pcontent1_1_ByAuthor" class="byline">
    		<li class="author">By Mark Bowytz</li><li class="date">02/19/2014</li>
    	</ul>
    
        <div class="introimage">
    

    Tom had made a regular habit of taking a post-lunch-hour coffee break in the office break room for the past couple of days. All week, the IT muckety-mucks were in all-day meetings to discuss the work related to the new acquisition of Qwerty Logistics Corp. Of course, in the interest of keeping the flow of productivity going, lunches were catered.

    On Monday, the food was fantastic: There were aluminum trays still filled with chicken, green beans and red potatoes. Tuesday wasn't nearly as fancy -- just a few trays of sandwiches -- but they were from that expensive sandwich place nearby and were simply delicious. Wednesday was tacos, burritos and nachos with all the fixings. Today, however, was a bit of a mystery -- Tom swore he saw a Mac's Pizza truck get buzzed through the security gate around 11:30, but he wasn't entirely sure. In any case, with 1:00 p.m. looming, the leftover wagon would be arriving soon and Tom was positioned to have first dibs on food that would surely be better than the Smart Cuisine he had stowed in the office fridge earlier in the week.

    As the door to the conference room started to open, Tom's stomach started to rumble in anticipation, but instead of holding a stack of pizza pies, it was his director motioning for Tom to come over. Tom acknowledged and made his way to the conference room.

    Tom hoped that this was the "Come here and help me with all this food!" wave, but his gut told him that a reheated frozen meal was in his future.

    Wrong Place at the Wrong Time
    Tom scanned the room looking for familiar faces, but there weren't any besides his director and his director's boss. The bold, red T's on the others' badges made clear they weren't from around here -- they were from the to-be-merged company … and none of them looked entirely pleased.

    "Hey, Tom, sorry to pull you in like this, but we've been seeing a lot of errors come up during our test runs of Qwerty Logistics apps on our boxes -- none of which are very helpful -- and it's getting to be so much of a problem that we can't get anything done ... here, see what I mean."


    Tom's director pointed to a remote desktop session being shared to all in the room via the conference room's big screen. It appeared to be an ordinary data entry form with several carefully aligned, ordinary-looking fields ... except for a tiny pop-up window with a Yellow exclamation icon with the following:

    Cannot save date value or date invalid format. (Err: 0x000074478A75)
    Field entry 'SC' cannot be null. (Err: 0x00002F1D454B)
    Data entry audit failed. Did not update record. (Err: 0x00006CC882F6)

    The director took off his glasses and rubbed his forehead.

    "We're pretty much dead in the water until we can get through these errors, and my boss is asking for a time line on something I don't know. We can't afford to let these problems linger. We need a developer's set of eyes on this problem ASAP ... we need for this to be your top priority."

    Tom wasn't sure just what to think -- this was some serious stuff, with big-name players all staring at him for some direction. Despite his nerves, Tom somehow managed a reply: "Yes. I'll see what I can do."

    Tom noticed the visitors' faces seemed to relax a little at the announcement that someone was on the case. Sadly, he didn't share their optimism.

    Poking Around By the time Tom made it back to his cube, with heat-`n-eat frozen meal in hand, an e-mail had landed in his inbox with the address and credentials to the sandbox environment the Qwerty Logistics app was running on temporarily, and a screen capture of the data entry form and its error messages.

    Once he remoted into the sandbox server and got himself acclimated, Tom did find one ray of hope: a folder named "SourceCode" off the root of C: Drive. It didn't give any insight into how these errors happened, but it was at the very least something to go on. Inside the folder was a Visual Studio project file. Not wanting to upset the balance of the universe, Tom copied the source folder locally and opened the project from his own machine.

    Once Visual Studio had its act together, after uplifting the project from Visual Studio 2005 with minimal warnings (thank goodness), Tom searched the source files in the solution for the code behind the screen.

    It took a little while, but Tom deduced that each of the cryptic error messages really boiled down to one thing: "Configuration file not found."

    In the haste to set up a sandbox environment, someone had simply skipped the step of including a file named CONFIG.XML. This resulted in date-format errors since the default format mask wasn't known, the internal field containing the Site Code was now null, and the app couldn't save the record because the database connection was missing.

    Tom navigated to the install directory for the application, renamed Config.XML to CONFIG.XML and miraculously, everything worked. But one detail remained: What was going on with those weird error codes that looked like memory addresses?

    As it turns out, that was the funny part of the whole ordeal.

    Pick an Error, Any Error! Tom sent a simple "It works now" IM to his supervisor who in return requested Tom's immediate presence in the conference room.

    Upon arrival, Tom informed the room as to the nature of his (ridiculously) simple "fix" with an accompanying quick demonstration and then proceeded to open a Word document with the following code:

    private String ErrCode()
    {
      // Make errors more random
      System.Threading.Thread.Sleep(20);
      Random rnd = new Random();
      int errCode = rnd.Next(12000, 34000);		
      return "0x0000" + errCode.ToString("X") + (errCode+5678).ToString("X");
    }

    (You can see a live demo of the code running here: dotnetfiddle.net/JAoPjy.)

    Tom explained that while he didn't expect anybody in the room to be a developer, it was important to point out the proof that the "error codes" were merely random numbers converted to hexadecimal values with a "0x0000" added to it.

    "So, while the error messages are real," he said, "The codes are completely meaningless."

    "Oh, we know about that," dismissed one of the Qwerty Logistics managers.

    "One of the original user complaints was that text error messages didn't look enough like real errors," added another manager. "Many users know that errors with hexadecimal addresses appear in bad things like blue screens, so the decision was made to add them to the error messages."

    Tom was visibly shocked. How did they support anything? Why would anybody fulfill such a pointless user request? Tom would have probably stood there for the rest of the afternoon asking numerous questions had his director not placed a hand on his shoulder.

    "Great work there, Tom! Hey, why don't you grab an extra boxed lunch over there before it makes it out to the break room?"

    Tom perused the stack of extra boxes, picked a good one, and quietly left the conference room -- all the while hoping that Qwerty Logistics developers were being acquired as part of the merger.


        <!--​ pager start -->
        
        <!--​ pager end -->
        
        
            
        
    
        
                <div class="aboutAuthor">
                    <p id="ph_pcontent1_1_AuthorInfo_AboutAuthor" class="author">About the Author</p>
                    
                <p>
                    <strong></strong>
                    Mark Bowytz is a contributor to the popular Web site <a href="http://thedailywtf.com" target="_blank">The Daily WTF</a>. He has more than a decade of IT experience and is currently a systems analyst for PPG Industries. 
                </p>
            
                </div></blockquote>


  • Well, we live in a world where even Windows bluescreens don't look enough like Windows bluescreens. So there.

    And while I kinda agree with the sentiment that errors should be big, ugly and scary, I'd reserve it to global system errors.



  • Operation Failed

    The parameter is incorrect.


  • Garbage Person

     TRWTF is not complaining explicitly about a missing config file.



  •  I presume the app was running on a Windows box, so why did renaming the Config.XML to CONFIG.XML magically make it start working?


  • Garbage Person

    @skotl said:

     I presume the app was running on a Windows box, so why did renaming the Config.XML to CONFIG.XML magically make it start working?

    I work with a particularly janky system where when we do filesystem accesses we enumerate directory contents, match on regular expressions (case-sensitively!), and then open the matches. I can imagine something similar being done here.

     


  • Discourse touched me in a no-no place

    @Weng said:

    I work with a particularly janky system where when we do filesystem accesses we enumerate directory contents, match on regular expressions (case-sensitively!), and then open the matches.
    That's got ever so many things wrong with it. Even if it didn't have the case-sensitivity trap, it would still be wrong because of the potential for race conditions. (I hope — hope against hope — that you're checking for errors from the opening of the file?)


  • Garbage Person

    @dkf said:

    @Weng said:
    I work with a particularly janky system where when we do filesystem accesses we enumerate directory contents, match on regular expressions (case-sensitively!), and then open the matches.
    That's got ever so many things wrong with it. Even if it didn't have the case-sensitivity trap, it would still be wrong because of the potential for race conditions. (I hope — hope against hope — that you're checking for errors from the opening of the file?)
    The nature of the use case makes the a-new-file-has-appeared race condition irrelevant - we'll get it in a couple minutes next time we come around. Errors opening the file (locked, missing, etc.) are in fact trapped. It's actually one of the less bad things about this system.



  • Frist not found (0x00000004)


  • Discourse touched me in a no-no place

    @Weng said:

    The nature of the use case makes the a-new-file-has-appeared race condition irrelevant - we'll get it in a couple minutes next time we come around.
    If you're using the directory extensively (i.e., only adding new files to it) then you'll probably be OK. Well, until someone decides to clean things up “to save disk space”.@Weng said:
    Errors opening the file (locked, missing, etc.) are in fact trapped. It's actually one of the less bad things about this system.
    So my premonitions were wrong, and in a good way.

    I love a happy ending.



  • Inside the folder was a Visual Studio project file. Not wanting to upset the balance of the universe, Tom copied the source folder locally and opened the project from his own machine.
    Ah yes, gotta love the Microsoft products where simply opening something to have a look at it can irreversibly collapse its quantum state to something even more broken.


  • OMG the Windoze are teh SO BADZ!!!



  • @blakeyrat said:

    OMG the Windoze are teh SO BADZ!!!
    You have to admit that it's rather easy to criticise Microsoft, right? It seems like just about anything you do will cause Office to ask you whether you want to save the document again (e.g. opening it shouldn't change it; printing it shouldn't change it; etc).



  • Needs more irrelevant details.  What kind of drinks were at the catered meetings?  Was the department head having a fight with the CFO?  Did the upcoming merger cause the team who vacuumed the carpets to miss an evening?  Does Tom have a cat?  What is the cat's name?  Why doesn't Tom's name change to "Dave" for one paragraph, and then back to Tom without any explanation?  Does Tom have a sidekick?  What obscure piece of hardware from the 1970s was this application originally written on, which was mysteriously supported by Visual Studio 2005?  What's Tom's favourite book or movie?  If the CTO of Qwerty logistics was walking through a desert (it doesn't make any difference which one, it's completely hypothetical) and he looked down and saw a tortoise crawling towards him and flipped it over on its back, what would happen?  Can Tom describe, in single words, only the good things that come to mind about his mother?

     



  • @anotherusername said:

    @blakeyrat said:
    OMG the Windoze are teh SO BADZ!!!
    You have to admit that it's rather easy to criticise Microsoft, right?

    Sure, if you don't give a shit about truth or accuracy or taking the 27 milliseconds to try and understand the problem that Windows' "bad behavior" was intended to solve.

    But my main gripe is with the laziness and vagueness of your criticism. Here, read the comments on this lousy Slashdot article and come away wiser or at least less cliched and stupid.


  • Considered Harmful

    @DCRoss said:

    If the CTO of Qwerty logistics was walking through a desert (it doesn't make any difference which one, it's completely hypothetical) and he looked down and saw a tortoise crawling towards him and flipped it over on its back, what would happen?

    You’re in a desert walking along in the sand when all of the sudden you look down, and you see a tortoise, crawling toward you. You reach down, you flip the tortoise over on its back. The tortoise lays on its back, its belly baking in the hot sun, beating its legs trying to turn itself over, but it can’t, not without your help. But you’re not helping. Why is that?


  • ♿ (Parody)

    @anotherusername said:

    @blakeyrat said:
    OMG the Windoze are teh SO BADZ!!!
    You have to admit that it's rather easy to criticise Microsoft, right? It seems like just about anything you do will cause Office to ask you whether you want to save the document again (e.g. opening it shouldn't change it; printing it shouldn't change it; etc).

    Right or wrong, I heard that The President's Daughter was a Micro$oft H8er, and that's enough for me.


  • Trolleybus Mechanic

    @DCRoss said:

    Needs more irrelevant details.
     

    What kind of drinks were at the catered meetings?

    Blood of the innocent laced with tears of their enemies' families.

    Was the department head having a fight with the CFO?

    No, but they had a jello wrestling session scheduled for later that day (hence all the food references. It was foreshadowing)

    Did the upcoming merger cause the team who vacuumed the carpets to miss an evening? 

    Actually, because there were twice as many feet in the office, they got paid double-time to get it cleaned on schedule. Bonus for the little guys!

    Does Tom have a cat? 

    Yes. A Tom cat. He's one of those guys who does that.

    What is the cat's name? 

    Jerry. Again, Tom is one of "those" guys...

    Why doesn't Tom's name change to "Dave" for one paragraph, and then back to Tom without any explanation? 

    Because there actually is a very good explaination for that happening.

    Does Tom have a sidekick? 

    Yes, but he was on vacation in Manitoba.

    What obscure piece of hardware from the 1970s was this application originally written on, which was mysteriously supported by Visual Studio 2005? 

    A [url="http://en.wikipedia.org/wiki/Magnavox_Odyssey"]Magnavox Odyssey[/url], which also has the distinction of being the first video game system in the list of Wikipedia's Article on video game systems from the 1970s. I'm lazy.

    What's Tom's favorite book or movie? 

    The answer to both is Fried Green Simpsons References.

    If the CTO of Qwerty logistics was walking through a desert (it doesn't make any difference which one, it's completely hypothetical) and he looked down and saw a tortoise crawling towards him and flipped it over on its back, what would happen? 

    The tortoise, not understand the concept of altruistic help, might try to bite the perceived attacked. If the CTO kept his hands clear of the tortoise's bite range, the tortoise would be set back upright, and eventually go about it's business.

    Can Tom describe, in single words, only the good things that come to mind about his mother?

    No, because Tom has not learned that brevity is the soul of wit. Plus he really, really loves his mother and can't say enough good things about her. (She really is a nice woman).



  • @blakeyrat said:

    @anotherusername said:
    @blakeyrat said:
    OMG the Windoze are teh SO BADZ!!!
    You have to admit that it's rather easy to criticise Microsoft, right?

    Sure, if you don't give a shit about truth or accuracy or taking the 27 milliseconds to try and understand the problem that Windows' "bad behavior" was intended to solve.

    I'm still honestly not sure how you jumped from my comment to "OMG the Windoze are teh SO BADZ". I criticised a particular bad behavior (changing things, in particular fucking them up worse, when someone just wants to open and view them). Since this behavior falls afoul of just about every usability guideline ever (unintended effects, stupid prompts, ...) I'd really expect you to be first in line to burn it in effigy and piss on its ashes, but for some reason you're jumping my case, apparently because I flippantly named a particularly bad repeat offender.

    If I open something and don't change it, I shouldn't expect to be asked whether I want to save changes. Yet just about every Microsoft product gets this wrong. Excel even attempts to defend its bad behavior ("formulas are recalculated when opening worksheets saved in previous versions of Excel, blah blah blah... do you want to save?" No, I don't want to save, because I didn't change anything; if I wanted the workbook updated to the new version's format, I'd select "Save As..." and choose that, so kindly sod off and stop making me answer stupid questions).

    P.S. Don't even get me started on what Word will do to nicely hand-formatted HTML if you open it and accidentally tell it yes when it asks if you'd like to save the changes.


  • Considered Harmful

    @boomzilla said:

    @anotherusername said:
    @blakeyrat said:
    OMG the Windoze are teh SO BADZ!!!
    You have to admit that it's rather easy to criticise Microsoft, right? It seems like just about anything you do will cause Office to ask you whether you want to save the document again (e.g. opening it shouldn't change it; printing it shouldn't change it; etc).

    Right or wrong, I heard that The President's Daughter was a Micro$oft H8er, and that's enough for me.


    She was also dressed very provocatively, Your Honor.



  •  

    No, I don't want to save, because I didn't change anything; if I wanted the workbook updated to the new version's format, I'd select "Save As..." and choose that, so kindly sod off and stop making me answer stupid questions)

     

    That is MUCH worse... You open a sheet, look at it, see some important numbers...then DONT save...mail the file to someone who opens it with the older versions..they may not see the same number wou did....

     People would (Actually did during the Beta) that "changes were lost"

    P.S. Don't even get me started on what Word will do to nicely hand-formatted HTML if you open it and accidentally tell it yes when it asks if you'd like to save the changes.

     



  • @joe.edwards said:

    @DCRoss said:
    If the CTO of Qwerty logistics was walking through a desert (it doesn't make any difference which one, it's completely hypothetical) and he looked down and saw a tortoise crawling towards him and flipped it over on its back, what would happen?

    You’re in a desert walking along in the sand when all of the sudden you look down, and you see a tortoise, crawling toward you. You reach down, you flip the tortoise over on its back. The tortoise lays on its back, its belly baking in the hot sun, beating its legs trying to turn itself over, but it can’t, not without your help. But you’re not helping. Why is that?

    Because there are 3 tortoises, under one of them is a prize, and you're Monty Hall.



  • @joe.edwards said:

    You’re in a desert walking along in the sand when all of the sudden you look down, and you see a tortoise, crawling toward you. You reach down, you flip the tortoise over on its back. The tortoise lays on its back, its belly baking in the hot sun, beating its legs trying to turn itself over, but it can’t, not without your help. But you’re not helping. Why is that?
    Because you're a sadistic asshole?



  • @da Doctah said:

    @joe.edwards said:

    You’re in a desert walking along in the sand when all of the sudden you look down, and you see a tortoise, crawling toward you. You reach down, you flip the tortoise over on its back. The tortoise lays on its back, its belly baking in the hot sun, beating its legs trying to turn itself over, but it can’t, not without your help. But you’re not helping. Why is that?
    Because you're a sadistic asshole?

    No. It's a test, designed to provoke an emotional response. Shall we continue?



  • @alegr said:

    @da Doctah said:

    @joe.edwards said:

    You’re in a desert walking along in the sand when all of the sudden you look down, and you see a tortoise, crawling toward you. You reach down, you flip the tortoise over on its back. The tortoise lays on its back, its belly baking in the hot sun, beating its legs trying to turn itself over, but it can’t, not without your help. But you’re not helping. Why is that?
    Because you're a sadistic asshole?

    No. It's a test, designed to provoke an emotional response. Shall we continue?
    The two things are not mutually exclusive.

     



  • @alegr said:

    @da Doctah said:

    @joe.edwards said:

    ... you flip the tortoise over on its back. The tortoise lays on its back, its belly baking in the hot sun, beating its legs trying to turn itself over, but it can’t, not without your help. But you’re not helping. Why is that?
    Because you're a sadistic asshole?

    No. It's a test, designed to provoke an emotional response. Shall we continue?

    Profanity could indicate emotional response. I guess he passed.


Log in to reply