Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 1.52 KB

instructions-intermediate.md

File metadata and controls

22 lines (15 loc) · 1.52 KB

The BugsZero Kata

Bugs are optional, they sneak into our code much thanks the design choices we do, or fail to do. Let's try refactoring some existing code to make it more bug-repellent!

You'll practice reading code, looking for parts where it is likely that developers would create a bug if they extended the code. Whenever you've found such a weakness in the design your challenge is to strengthen the design in order to make that kind of bug very unlikely, or even impossible!

Repo and languagesp

This repository comes packaged with code that is totally tested, using the Golden Master technique. Pick the language of your choice in this repository or contribute another one. In case there is none you're comfortable with you can always try to do this without tests using Java. Beware that it is not identical as we've modified the code to remove some of the noise that wasn't relevant to sources of bugs.

Procedure

  1. Identify a weakness in the design - now that's where we're helping you.
  2. State what the potential bug is before explaining your solution. This is important, simply saying another solution is better avoids thinking of why it is actually better.
  3. Explain or refactor the code to show the new design.

The purpose is to experiment with design alternatives, so it is not necessary to refactor to perfection, and it is optional to use tests. The purpose of first explaining the problem in the design is to make sure that the new design is not just different but also adresses one or more specific problems.