"Working Effectively with Legacy Code" of Michael Feathers

April 30 · 4 mins read

“For a long time it’s puzzled me that most books on software development processes talk about what to do when you are starting from a blank sheet of editor screen. It’s puzzled me because that’s not the most common situation that people write code in. Most people have to make changes to an existing code base, even if it’s their own. In an ideal world this code base is well designed and well factored, but we all know how often the ideal world appears in our career.

“So this book is important because it’s written from the perspective of what to do with an imperfect yet valuable code base.”

— Martin Fowler

That quote above is from the Foreword of the book “Object-Oriented Reengineering Patterns.”

But I think the same statement can also be made with the book “Working Effectively with Legacy Code” of Michael Feathers (as hinted in GOOS)

In this book, Micheal Feather presents some techniques on how to reverse the rot in legacy code.

What is “legacy code”?

Micheal Feathers offers a very direct yet controversial definition:

“Legacy code is code without tests”

Then this:

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 of our code quickly and verifiably.

Without them, we really don’t know if our code is getting better or worse.”

Wow! It seems like Micheal Feathers value tests so highly as Uncle Bob does!

We need to start writing tests for our code then! :grin:

But if you will not be convinced that writing tests are very important, this book will still help in changing your mindset about rotting legacy code — this book can give you hope that the rot is reversible.

I compiled some very interesting ideas I got from the book: Great Quotes from “Working Effectively with Legacy Code” by Michael Feathers.

I also found (through here) a short PDF on the key points of the book. You might want to read it before reading the book.


In case you are still in doubt on whether it is worth spending time reading this book…

Many of our other masters highly recommend this book.

Uncle Bob Martin wrote the Foreword for the book:

“… It’s not enough to prevent the rot — you have to be able to reverse it. That’s what this book is about”

Woody Zuill, one of my heroes, recommends it in his “Agile Books I Recommend”.

John Sonmez of simpleprogrammer.com recommends it here and here

Every software developer should read this book, since every software developer is likely to spend a majority of their time working with legacy code.

And someone who is giving away books for free?… Jay Fields

“These books, all technical, are books that I think most programmers will benefit from reading.”

Scott Hanselman had an interview with Micheal Feathers here.

Happy reading!!!

Buy Me A Coffee