I’m surprised at how many times in my career I have experienced serendipitous bug finds. It just happened yesterday to me and the team I work with. What do I mean by that?
I was working on a bug that had been reported by a client. Our application supports multiple languages, so reports can be generated in several different languages. We got a report that a portion of the report was still showing up in English while the rest of the report was showing up in the preferred language. Our support for languages is pretty sophisticated, the application allows users to create their own “custom languages” for languages that we do not yet support directly. Adding that feature really complicated the localization code, so it didn’t surprise me that there was a bug in there somewhere.
I dug into the problem on my machine, was able to recreate the bug as reported and set about fixing it. It was pretty straightforward, there was precisely a bug in that area, so I coded a fix for it, dutifully unit tested it and passed it along to QA to certify. The bug came back and I was told that it still was happening. ”Couldn’t be”, I thought to myself, “I tested it.” I went into the QA environment, and lo and behold, the QA analyst is right, it doesn’t work.
At this point I tried a lot of things. In some environments it worked, in some it didn’t. I could switch from one database to another on my machine and in one it worked and in one it didn’t. I began to investigate the differences in databases. Eventually, I found that in one of the databases (the one that didn’t work, surprisingly) the translated content was missing. Now, it became a whole different issue. Why was the content missing?
We checked into the production database and the translated content was also missing. Serendipitous bug. Now, I didn’t know which bug had actually caused what the user was seeing. Something (we pretty quickly tracked down what), was incorrectly deleting translations that we had loaded into the database. It was a weird set of conditions that did it, but over time, it happened a couple of times.
It worked out well – if we had found the bad delete error first and fixed it, I probably never would have found the other error. There were two intersecting bugs that yielded the same results.
As I said, you would be surprised how many times it works that way.
PS – I’m sure these were the last bugs in the application (yeah, right), and if you think that the application I’m talking about must be a disgrace because we found these bugs, you haven’t been paying attention to software. I would say this app is about as “bug-free” as almost any application you could name. I’m sure there are better, but I’m also sure there are much worse.