intermediate

Refactoring, Technical Debt and Working with Legacy Code

Most engineering work is changing code someone else wrote. Learn what refactoring is and is not, how to spot code smells, how to refactor in small safe steps behind tests, how to treat technical debt as a decision, and how to approach untested legacy code with characterization tests. Then refactor a tangled pricing function without changing its behaviour.

55 min

Refactoring, Technical Debt and Working with Legacy Code

Most engineering work is changing code someone else wrote. Learn what refactoring is and is not, how to spot code smells, how to refactor in small safe steps behind tests, how to treat technical debt as a decision, and how to approach untested legacy code with characterization tests. Then refactor a tangled pricing function without changing its behaviour.

In this lesson:

  • refactoring
  • technical-debt
  • legacy-code
  • code-smells
  • characterization-tests
  • python

🔒 This lesson is part of a paid plan

This lesson is part of the Pro plan. Upgrade to unlock the full lesson, the labs and the exam.

Upgrade Now

Official References

This lesson is part of a paid plan

Upgrade to Pro to unlock this course, its labs and its exam.

View Pricing Plans