Extract Method

Definition:

Extract Method moves a block of code to a new method with a descriptive name, making the calling code more readable. This is one of the most common kinds of refactoring, and is relatively easy to do manually.

Triggers:

    • any comment before a block of code (use some form of the comment as the new method name, and move the block)

    • long methods

    • deep nesting in logic or looping structures

Forces:

Organizational Support of this Skill:

?

Resources:

?