Working Effectively With Legacy Code Series

This is an effort to capture the knowledge in “Working Effectively With Legacy Code” by Michael Feathers.

pic: source

What is Legacy Code?

Simply, we can refer code as legacy, if we’ve gotten them from someone else. It has broad sense in programmer-speak terms.

Code without tests is bad code. It doesn’t matter how well written it is; it doesn’t matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior or our code quickly and verifiably. Without them, we really don’t know if our code is getting better or worse.”

The code maybe clean coded and well structured, but without well written tests against the code, it’s still Legacy Code.

Working with Legacy code.

This series will have 25 episode as follows, divided into three parts.

PART I: The Mechanics of Change

  1. Changing Software.
  2. Working with Feedback.
  3. Sensing and Separation.
  4. The Seam Model.
  5. Tools.

PART II: Changing Software

  1. I Don’t Have Much Time and I Have to Change It.
  2. It Takes Forever to Make a Change.
  3. How Do I Add a Feature?
  4. I Can’t Get This Class into a Test Harness.
  5. I Can’t Run This Method in a Test Harness.
  6. I Need to Make a Change. What Methods Should I Test?
  7. I Need to Make Many Changes in One Area.
  8. I Need to Make a Change, but I Don’t Know What Tests to Write.
  9. Dependencies on Libraries Are Killing Me.
  10. My Application Is All API Calls.
  11. I Don’t Understand the Code Well Enough to Change It.
  12. My Application Has No Structure.
  13. My Test Code Is in the Way.
  14. My Project Is Not Object Oriented. How Do I Make Safe Changes?
  15. This Class Is Too Big and I Don’t Want It to Get Any Bigger.
  16. I’m Changing the Same Code All Over the Place.
  17. I Need to Change a Monster Method and I Can’t Write Tests for It.
  18. How Do I Know that I’m Not Breaking Anything?
  19. We Feel Overwhelmed. It Isn’t Going to Get Any Better.

PART III: Dependency-Breaking Techniques

  1. Dependency Breaking Techniques.

Go to the next path (Episode I).

References:

--

--

MyView androidView;

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store