Consider the following scenario.

You currently have a feature set A you wish to extend to include feature set B. In the near feature there's a high possibility that you wish to extend this even further to include feature set C.

  • Option 1) Cost to extend A -> B is minimal, but high maintenance costs.
  • Option 2) Cost to refactor A and B to make more logical sense is moderate, but low maintenance costs.

Extending to include feature set C:

  • Cost to extend refactored(A & B) -> C is minimal, again low maintenance costs.
  • Cost to extend A,B -> C is high, (both to refactor and extend).

Assuming the inclusion of feature set C is beyond the scope of the current sprint, how do you go about choosing an option?

How does this change if the addition of feature set C is several (2 or more) sprints out?

  • 1
    The obvious course of action is to refactor first. The only reason that doesn't always occur is time constraints. Apr 3, 2013 at 19:57
  • 2
    As others pointed out, it is better to refactor as soon as possible because refactoring becomes more expensive later. Another measure is to design your components as small and independent from each other as possible, to minimize refactoring. Some consider excessive need for refactoring an indication of poor design (see e.g. the last paragraphs of techrepublic.com/blog/programming-and-development/…). This is not necessarily the case in your situation, but it can be worth checking it.
    – Giorgio
    Apr 3, 2013 at 20:11
  • possible duplicate of Agile estimation with tech-debt and of Rule of thumb for cost vs. savings for code re-use
    – gnat
    Apr 3, 2013 at 21:42

1 Answer 1


The longer you keep the debt the higher the accumulated interest. It's almost always better to pay off now.

Not the answer you're looking for? Browse other questions tagged or ask your own question.