Interesting article on refactoring being waste.
Have a read. THis is my follow up:
When we’re practising TDD with katas, a common practise when following the Red, Green Refactor, is at the green stage. We ask ourselves, how can we get to green with the simplest, least effort change. Maybe a line or so. If it’s too big a change it means we need to comment out that test and refactor ourselves into a position where it’s easy to make that change and get our new test to pass.
Following this logic, our refactoring becomes more focussed, almost using triangulation as our motivation. We also have an end goal in sight or “when to stop”.
THought provoking article, and one I shall be exploring tonight at Manchester Codejo. Maybe the mantra from Red, Green, Refactor needs changing:
- Try to get green in one, simple step,
- Comment out red test,