Fixing a bug that has never caused a problem until now.

Posted by codeelegance on Programmers See other posts from Programmers or by codeelegance
Published on 2011-01-11T22:15:10Z Indexed on 2011/01/11 22:58 UTC
Read the original article Hit count: 207

Filed under:

I recently made a change that caused some code to be run far more often than it used to. This lead to the discovery of a bug. This bug had the potential to happen any time that code was run but because it was run so seldom it never surfaced.

When I brought this to the lead developer's attention he wanted me to undo the change that exposed the bug rather than fix the bug quoting the adage, "If it ain't broke, don't fix it".

Its clear to me that we were just lucky up until now but he won't listen to reason.

Should I fix it anyway?

Update

The lead technically doesn't have any authority over me. Just tenure. He's been the sole developer on the project for a number of years until a year ago and I think he doesn't take constructive criticism very well. For what's worth, I didn't criticize him I just pointed out that just because the bug never showed up didn't mean it wasn't there.

© Programmers or respective owner

Related posts about ethics