When a Bug is Found
James Shore talks about the concept of being bug free and has many recommendations on how to reach that goal. At my desk I have the following guide hanging on the wall to help me in my quest.
First:
- Create a Test to Prove it:
- Fix it:
You’ve fixed the problem, but you haven’t solved the underlying cause.
Discover why that bug occurred.
- Discuss the code process with your pairing partner.
- Is there a design flaw that made this bug possible?
- Can you change an API to make such bugs more obvious?
- Is there some way to refactor the code that would make this kind of bug less likely?
- Improve your design.
If you’ve identified a systemic problem, discuss it with the rest of you team in you next meeting or iteration retrospective.
Tell people what went wrong so they can avoid that mistake in the future.