Chris Didyk about

Refactoring Wisdom

13 Dec 2007

A couple of days ago, my co-worker Bret said something that I thought made tremendous sense.

He told me that you refactor code when you know exactly what you need to do to improve it. If the code doesn’t seem right, but you don’t know how to improve it or aren’t sure, either don’t refactor it yet or timebox your refactoring effort. It may be that as your understanding of the system grows, the right way to refactor that same piece of code becomes clear.

Thank you, Bret, for some excellent advice!

blog comments powered by Disqus