There are various ways in which refactoring can fit into our
programming workflow. One useful notion is that of Preparatory
Refactoring. This is where I'm adding a new feature, and I see
that the existing code is not structured in such a way that
makes adding the feature easy. So first I refactor the code into
the structure that makes it easy to add the feature, or as Kent
Beck pithily put it "make the change easy, then make the easy
change".
It always helps to use examples to explain things, and
so I took the opportunity when I ran into a case while adding a
new feature to my publication toolchain.
more…
Published on January 09, 2015 08:28