For the first time last week, I actually used a spreadsheet to keep track of a large refactoring that I needed to complete. We’re not talking about a huge project, less than sixty classes in total, but they needed to be broken into three projects, and a number of the classes were going to disappear altogether as their functionality is absorbed into other classes. The two additional projects are going to be simple libraries that can be re-used, and the original project will retain the domain specific tests and configuration and have dependencies on the two new libraries.
The spreadsheet itself isn’t anything complicated. It has the following columns:
By setting filters on each of the columns and using some conditional formatting, I was able to manipulate the view to narrow the scope to the specific set of tasks I was working on or get a broad overview of where I was up to. It enabled me to take small steps and keep the codebase running whilst I was refactoring, which has usually been my downfall!
The day to day refactoring I normally do is small enough to be held in my head and larger ones usually cause me some level of grief before they are completed, which is why I decided to take different approach this time around. What I found is that by taking the time to lay everything out first, I could see what needed to be done and in which order. It goes to prove that “just enough” planning goes a long way!
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
Copyright ©Craig Aspinall 2011