Don’t make bugs to hide bugs.

Watch out for bugs that have legacy workarounds.

It’s bad enough when an application has bugs. Occasionally, though, you find a situation where a developer coded a workaround for a bug into the application. Perhaps the developer could not figure out how to fix the original bug. Maybe adding the workaround was the only thing he could think of to get the system working again.

Unfortunately, now the system has two bugs, the original one and the workaround. Now, if someone removes the workaround, the first bug emerges once more. On the other hand, if another developer finds and fixes the original bug, the workaround will cause the system to malfunction. To thoroughly repair the system, both will have to be removed, which may cause other effects.

These kinds of bug pairs can be very nasty and hard to find.

Do your best to avoid this situation. Don’t write workarounds. Don’t give up when trying to find the original bug. Most of all, keep everything covered in healthy tests and ensure that the tests run red first. Workarounds often hide behind weak tests.

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

%d bloggers like this: