Trapdoor In The Sun

Alan Shanahan, Technician & Consultant


Leave a comment

Wild Goose Chase

This is an argument in favour of refactoring code to prevent duplication. It’s a real example that happened in the last couple of years and demonstrates an important point.

In our example, one code function existed in four separate places in the same code suite.

At some point later, a business functional change meant that a code change was required. The change was made, but only in one of those four places. The testing that followed was significant because the change was made to code that formed part of some core business functions. Errors were found in testing, it’s fairly obvious why. [For those not paying attention, the change needed to be made in three other places.]

Now, because we didn’t know the code too well, it was a reasonable assumption that one possible cause for the errors was code version regression. Something was askew in the version control department, or so we assumed. Much time was spent investigating this as the root cause. It was a wild goose chase.

It’s a classic example of why quality belongs to developers. Amongst others.