Top Refactorings 2
This has been done before by another mentor, and it was fun. I’ve been watching my use of refactoring tools, and here is my top five list of seven most-used refactorings:
- Rename
- Introduce Variable
- Extract Method
- Inline variable
- Inline method
- Move Method
- Change method signature
You might guess that I’m doing a fair amount of refactoring on legacy code.
I was suprised how much I’m using introduce/inline variable, but quite often I’m doing that to make a block of code ready for method extraction. Having broken out small methods, I sometimes find a larger method to extract, and then I inline the use of smaller methods. It’s sometimes hard to find the right level of generality.
I’d have trouble imagining that the first three weren’t everyone’s favorite refactorings.
