Skip to content

Instantly share code, notes, and snippets.

@hatelove
Created August 19, 2012 08:06
Show Gist options
  • Save hatelove/3393522 to your computer and use it in GitHub Desktop.
Save hatelove/3393522 to your computer and use it in GitHub Desktop.
Refactoring with take indirection out
There is a second, rarer refactoring game.
Identify indirection that isn't paying for itself and take it out.
Often this takes the form of intermediate methods that used to serve a purpose but no longer do.
Or it could be a component that you expected to be shared or polymorphic but turned out to be used in only one place.
When you find parasitic indirection, take it out.
Again, you will have a more valuable program,
not because there is more of one of the four qualities listed earlier but
because it costs less indirection to get the same amount from the qualities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment