Monday, February 12, 2007

GPACS: when to refactor

Here is a situation:

  • You are working on specs for the next sprint and they are not complete;
  • You are considering a new technology to replace one you are using;
  • Experimentation has shown that it is good.
I say, take the time to refactor! Use whatever knowledge you have now. Don't overdo it, because the new specs may call for some changes.

People struggle to allocate time to refactor. One should do it whenever one can. Especially when:
  • You have time on your hands;
  • You know going forward you will be using the new tech
  • You have the luxury of replacing some tech with another without simultaneously having to deal with changing requirements (at least while you are doing the replacement).
Does it also help not to have to think about the future design, while you are re-factoring something in the current design? Sometimes I think one needs to consciously choose to juggle only one variable at a time.

No comments: