DevDisasters

The Cost of Static

Offshore application development has its merits, but sometimes, as one dev team found, it's just not worth it.

Steve's development team was meeting with the CTO to discuss the benefits of offshore application development. Specifically, how the company would be piloting it in their group.

"Well, of course you get what you pay for," the CTO agreed, "but in this case, we're paying for the same thing. An hour in this country has just as many minutes as an hour overseas."

Aside from the CTO and some other higher-ups, no one liked the idea of offshoring, but they agreed to try it out. Besides, it was only for one small project.

Fast forward a few months and the "small project" had ballooned into a 10,000-manhour rewrite of the document management subsystem, which was a major module in their flagship, employee performance management application. Not that it mattered, though. Offshore development was very inexpensive.

Of course, a project with such a wide scope required an extensive amount of testing. Steve's group, however, simply didn't have the resources to create test cases, set up test plans and execute the thousands of necessary test scripts. Not that it mattered, though. As it turned out, offshore testing was very inexpensive, too.

After deploying the latest release to their customers, Steve's group ran into another resource problem. With the vast number of changes to the document management subsystem, there were a lot of confused users who needed help with the new software. Steve's group simply couldn't keep up. Not that it mattered, though. Offshore support was also very inexpensive.

Offshore Debugging
Despite the resources available overseas, there were two bugs that plagued countless companies that used the app. First, when users would save a document, sometimes the changes wouldn't "stick." The offshore support team attributed this to "user error" and resolved it by reminding users how to save correctly.

The other issue was that some documents would have "mixed" data. Employees would have strange performance appraisals tacked on to their records from managers in entirely different departments. The support team attributed these problems to "random data anomalies" and fixed them by manually correcting the database.

While most users just learned to deal with the bugs, their largest customer threatened to switch to a new vendor. Steve's team was notified about the issue.

Working in parallel with another developer, Steve stumbled across a rather troublingly named file: globals.cs. After digging through hundreds of poorly implemented "helper" functions, Steve discovered the root of the problem:

public static string UserID;
...
public static int DocumentID;

The "static" keyword ensured that the user- and document-identifier were always available, without ever needing to create an instance of an object. In a multi-user, Web-based system, having these globally defined variables didn't work out so well.

If two different documents were worked on at the same time, the first's modifications would be saved to the second's and the second's would be lost. The same thing happened with user names.

Tell Us Your Tale

Each issue Alex Papadimoulis, publisher of the popular Web site The Daily WTF, recounts first-person tales of software development gone terribly wrong. Have you experienced the darker side of development? We want to publish your story. E-mail your tale to Executive Editor Kathleen Richards at and put "DevDisasters" as the subject line.

Steve looked through the customers' data files and noticed that the problem had been occurring since the rollout, causing nearly six months of data to be incorrect. But, because users generally don't double-check everything they enter, only a handful of bad data was ever noticed by the customers.

Steve's finding didn't go over so well with their largest customer, or, really, any of their customers. Quite a few left immediately, and many more demanded refunds.

So, while the company saved a tremendous amount of money through offshore application development, after all was said and done the cost of the statically defined variables was estimated in the millions-in lost revenue, troubleshooting and court costs.

About the Author

Alex Papadimoulis lives in Berea, Ohio. The principal member of Inedo, LLC, he uses his 10 years of IT experience to bring custom software solutions to small- and mid-sized businesses and to help other software development organizations utilize best practices in their products. On the Internet, Alex can usually be found answering questions in various newsgroups and posting some rather interesting real-life examples of how not to program on his Web site TheDailyWTF.com. You can contact Alex directly via email at [email protected].,

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube