Refactoring Strategy

Problem

The code base can contain duplication, commented out code, and generally smell. We use Test Driven Development and the solution to this is to refactor – but when?

Solution

At all times developers should be on the look out for smelly code where refactoring could be applied. When such code is found, the developer is obliged to either:

  • Refactor the code there and then – this may be too restrictive because it upsets the developer’s flow.
  • Open a GitHub issue for the refactoring work – this approach is desirable.