Andy Brummer sent in this story ...

One day I was assigned a defect for an online helpdesk submission application that I had ported from classic ASP and VB to ASP.Net and C#.  Everything appeared to be working fine, except when the tester entered phone numbers in the comment field the line always came out with this strange riddle:

My phone number is “less then 555 greater then 555-5555“

Unfortunately, I knew exactly what unholy WTF had created this mess.  (I had even planted the seed for the workaround that created this problem.) 

It all started a month earlier while I was in the middle of doing the port.  The original application itself was a huge WTF. For some reason the original developers thought page names were really confusing so they created a database that mapped a pair of integers to a VB create object string and a switch statement for a method on that object. 

So instead of EnterServiceRequest.asp the pages were all something like MainPage.asp?id1=101&id2=345 because that was obviously easier to read.  To top it off they used one XML object to store all state and persisted it in session.  Since this was only maintained in memory and they used a 4 tier application design it had grown to the point where they would add the same data 3 times to the XML structure in different places, and I'd get answers from the developers like no, don't access the systemData node, sysData is the version that is up to date.  The really amazing thing is that isn't the WTF that I'm writing about.

In the middle of deciphering this convoluted mass of crap, I wrote some automated tests that generated random data and posted it to the service.  This quickly found that <, >, or & characters caused the hand rolled "web service" that we had to call to create an issue in one of the 3 back end systems to silently crash.  The whole system was based on queues so we submitted a message but never got a response message.  Apparently this had been going on for a year or so without notice.

I imediately schedued a meeting with the on-site developer. I turned out that the back end system was maintained by a team that didn't have any time to make any fixes on any of the interfaces that were already "working", so any fix was at least 6 months out.  At that point, I made a very unfortunate mistake.  I made a very lame joke that we should use the following mapping:
        <   “less then“
        >   “greater then“
        &  “and“

The next day I got a message that he had run my "suggestion" by the business team and they thought it was great!  I mean what could possibly go wrong with a brilliant system like that.  He made the change and I blocked that file from my memory, until the defect was assigned to me.  I reassigned it to the on-site developer and he told the tester to stop using <555> 555-5555 for phone numbers and got the business ok to reject the defect.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!