Extract Method

Extract Method

Preview unavailable

You must log in or sign up to view this lesson.

LoginSign up

Refactoring Code Smells Hands-On

Buy nowLearn more

Module 1 - Introduction

  • The Goals of The Session

Module 2 - Customer Billing

  • Code Diagram
  • Code with Bad Smells
  • Self-testing Code
  • Extract Method Technique
  • Pullup Method (Martin Fowler)

Module 3 - Print Report

  • Code Diagram
  • Code with Bad Smells
  • Self-testing Code
  • Method Object (Kent Beck)
  • Extract Method Technique
  • Template Method (Gang of Four)

Module 4 - Rate Calculator

  • Code with Bad Smells
  • Self-testing Code
  • Decompose Conditional Technique

Module 5 - Price Calculator

  • Code with Bad Smells
  • Self-testing Code
  • Replace Temp with Query Technique (Martin Fowler)
  • Refactoring and Performance

Module 6 - Salary Payment

  • Code with Bad Smells
  • Replace Type Code with Subclasses Technique
  • Replace Conditional with Polymorphism

Module 7 - Loan Calculator

  • Code with Bad Smells
  • Self-testing Code
  • Replace Method with Method Object
  • Extract Method
  • Decompose Conditional
  • The Outcome So Far
  • Replace Type Code with Subclasses
  • Replace Conditional with Polymorphism

Module 8 - Final Thoughts

  • Thoughts

Bonus

  • code_smells_before_code.zip
  • code_smells_after_code.zip
  • Code Smells Hands-On.pdf