Goke Pelemo

19%
Flag icon
If you have a function with lots of parameters and temporary variables, they get in the way of extracting. If you try to use Extract Function (106), you end up passing so many parameters to the extracted method that the result is scarcely more readable than the original. You can often use Replace Temp with Query (178) to eliminate the temps. Long lists of parameters can be slimmed down with Introduce Parameter Object (140) and Preserve Whole Object (319). If you’ve tried that and you still have too many temps and parameters, it’s time to get out the heavy artillery: Replace Function with ...more
Refactoring: Improving the Design of Existing Code (Addison-Wesley Signature Series (Fowler))
Rate this book
Clear rating
Open Preview