In the height of the offshore-outsourcing craze, "Steve" worked for a company that had a flagship application which managed, among other things, performance-related documents about employees. With labor being so inexpensive, the company decided to rewrite the document management subsystem which was a fairly large part of the application. Testing, as it turned out, was also a bargain when sent overseas, and the company was able to save an incredible amount of money developing, testing, and deploying a major release of their application to their customers.

Although the support calls increased quite a bit after the rollout, technical support was also a bargain when bought overseas. There were two bugs, however, that seemed to plague the application. First, when users would save a document, sometimes the changes wouldn't "stick." The support team attributed this to user error and 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 record from managers from entirely different departments. The support team attributed these problems to "random data anomalies" and manually fixed the documents.

It wasn't until one of their largest customers threatened to switch to a new vendor, that the company decided to hand the issue to the on-shore developers. Steve and his fellow programmer worked in parallel to find the problem and, within thirty minutes, uncovered the bug in a global constants file ...

static string strUserID; static int intDocumentID;

Being a web-application, having a globally-defined document and user identifier doesn't work out so well. If two documents were modified at the same time, the first's modifications would be saved to the second's and second's would be lost. The same fun effect happens with the user names. Steve looked through the customer's data files and noticed that this problem has been occurring since the rollout -- causing almost six months of data to become corrupt. As you might imagine, this didn't go over so well for the large customer. Or really any of the other customers.

After all was said and done, the cost of this statically defined variable was estimated in the millions: lost revenue, lost sales, time to fix, customer's time to fix, court costs, etc. But what really inspired Steve to submit this was when, almost a year after this happened, he attended a meeting from his higher-ups to encourage and discuss the benefits of off-shoring.