Skip to content

Instantly share code, notes, and snippets.

@davemaurer
Last active August 29, 2015 14:19
Show Gist options
  • Save davemaurer/809b415c2e00fc93c6cb to your computer and use it in GitHub Desktop.
Save davemaurer/809b415c2e00fc93c6cb to your computer and use it in GitHub Desktop.
Refactoring Patterns - Part 2
  1. Why do we refactor? why do we refactor?, to make our code more resilient and give it longevity.
  2. What's the difference between "refactoring" and "changing shit"? refactoring changes the code without changing the external behavior, and maintains test integrity. Changing shit doesn't take external behavior or test coverage into account, or does so by accident.
  3. What role do patterns play in refactoring? Patterns allow you to identify code smells in order to dig deeper, or to identify code templates to use in refactoring other areas.
  4. Why do some refactoring patterns seem to be opposites? Because refactoring depends on context.
  5. Does refactoring always make code better? 99 percent of the time, I would say yes. Always?, no. Save it as a public Gist Edit the Gist (thus creating a second version) Answer the questions to the best of your knowledge Save it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment