See Jason Gorman's original description.
"Refuctoring is the process of taking a well-designed piece of code and, through a series of small, reversible changes, making it completely unmaintainable by anybody except yourself. Comprehensive regression testing guarantees that nobody will be any the wiser."
By understanding what makes code bad, we begin to understand what makes it good.
Or maybe we just learn to write bad code..
Anyway, it's good fun.
- Save the original version of your code for comparison
- Do one refuctoring at a time
- Always check your tests still pass
- Think of a good name for your refuctoring
- Beware the power of renaming