Trapdoor In The Sun

Alan Shanahan, Technician & Consultant

Wild Goose Chase

Leave a comment

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.

Advertisements

Author: Alan Shanahan

Cloud computing professional, amateur drummer and other things. Doesn't take himself too seriously. He's got a fever ... and the only prescription is more cowbell.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s