Workshop: Working Effectively with Legacy Code




9:00am - 4:00pm



Test Driven Development and Refactoring are powerful tools. With them you can add new codeto systems and make existing code more maintainable. However, refactoring code withouthaving tests in place can be hazardous. This class presents a collection of dependencybreaking and test writing techniques that can be used to get existing code safely under test forrefactoring. These techniques can be used in conjunction with Test Driven Development tobreathe new life into large existing code bases. This class is structured as a set of lectures,discussions, and hands­on exercises.


By the end of this course, you will:

  • Understand what legacy code is
  • Understand how to break dependencies in legacy code
  • Learn a variety of techniques for breaking external dependencies
  • Learn a variety of techniques for breaking internal dependencies
  • Understand when to employ each of the techniques
  • Learn a variety of strategies for code refactoring
  • Learn how to identify change points
  • Learn how to find an inflection point
  • Understand the concept of test coverage for inflection points
  • Understand how to write effective tests for legacy codeOutline

Here is a brief course outline for the course:

  1. Introduction / Testing as a Programmer’s tool
  2. Seam identification
  3. Breaking Dependencies – Sensing and Separation
  4. Breaking Hidden and Manifest Dependencies
  5. Characterization Testing
  6. Refactoring Toward Understandability
  7. Strategies for Getting Large Methods under Test
  8. Dealing with Deeply Nested Conditionals
  9. Planning Large­Scale Refactoring and Technical Debt Reduction

Speaker: Michael Feathers

Author of Working Effectively with Legacy Code

Michael Feathers is the founder and Director of R7K Research & Conveyance, a company specializing in software and organization design. Prior to forming R7K, Michael was the Chief Scientist of Obtiva and a consultant with Object Mentor International. Over the years, Michael has spent a great deal of time helping teams after design over time in code bases. Michael is also the author of the book Working Effectively with Legacy Code (Prentice Hall, 2004).

Find Michael Feathers at

Other Workshops: