Goodreads helps you keep track of books you want to read.
Start by marking “Working Effectively with Legacy Code” as Want to Read:
Working Effectively with Legacy Code
Enlarge cover
Rate this book
Clear rating
Open Preview

Working Effectively with Legacy Code

by
4.14  ·  Rating details ·  3,835 ratings  ·  218 reviews
Get more out of your legacy systems, more performance, functionality, reliability, and manageability.Is your code easy to change? Can you get nearly instantaneous feedback when you do change it? Do you understand it? If the answer to any of these questions is no, you have legacy code, and it is draining time and money away from your development efforts.

In this book, Michae
...more
Paperback, 464 pages
Published September 1st 2004 by Pearson
More Details... Edit Details

Friend Reviews

To see what your friends thought of this book, please sign up.

Community Reviews

Showing 1-30
Average rating 4.14  · 
Rating details
 ·  3,835 ratings  ·  218 reviews


More filters
 | 
Sort order
Start your review of Working Effectively with Legacy Code
Erika RS
Dec 24, 2012 rated it really liked it
Shelves: owned, physical, software
We wise programmers know that code should be written to minimize dependencies, inject those that are necessary, use interfaces, be tested from the start, etc. etc., and we always write our new code like that (right?), but our good habits and wisdom don’t matter when working with legacy code. You don’t have the option of going back in time and smacking some sense into the original author (who may have been your younger, more foolish self).

Given that we have to deal with legacy code, how can it be
...more
Marshall
Jun 27, 2012 rated it really liked it
This book should be considered a required companion book to Martin Fowler's Refactoring. Refactoring is about slowly and progressively turning ugly code into well-designed code. I'd read Refactoring, and tried its techniques, but I just couldn't figure out how to make it work for my purposes. I knew refactoring was based on having a robust suite of regression tests. Let's face it, most ugly code lacks such a suite of tests. If you want to refactor something and you don't have a test, you need to ...more
Avdi
Feb 03, 2009 rated it it was amazing
Shelves: development
This is without question one of the essential books on my software development bookshelf. The dirty secret of software is that 80% or more if it is hacking your way through thick tangles of legacy code. This book is your survival guide in that jungle.
Bill
Oct 15, 2018 rated it it was ok  ·  review of another edition
This has become a Legacy Book, unfortunately. The title is also misleading. It doesn't cover technical debt, evolving architecture, replacing a dead library, or other topics you might expect around the subject of long-term legacy projects. Instead, it focuses entirely on making changes safely by small steps, which comes down to adding unit tests.

Having added such tests to a legacy codebase, this is admittedly a tough task, especially to know where to begin, but most of the basics could be cover
...more
Regis Hattori
Dec 02, 2017 rated it liked it
Shelves: programming
I think the entire book can be resumed as:

"Legacy code is a codebase without tests. While working in there, you must introduce tests before. If you cannot introduce test because it is hard and/or you have not enough time, use some techniques (listed in the book) that change the code as little as possible or use other techniques that help you write at least some tests."

I think the majority of techniques are pretty known by developers but we tend not to use them because they sometimes can worsen
...more
Ash Moran
Jan 18, 2010 rated it it was amazing
I've heard this called "genius" and it is. Legacy code is defined as untested code. Changing it involves various strategies to safely and incrementally get tests in place. The "seam" model of thinking, where you identify points you can influence behaviour without changing the code, is extremely powerful. Feathers gives several types of seam, and many techniques for exploiting them.

The main value of Working Effectively with Legacy Code is low risk ways to deal with untested code. There's a large
...more
Aurelian
Oct 04, 2018 rated it really liked it
Shelves: coding, programming
4.2/5 great techniques on how to effectively work with legacy code.

Most of my highlights and notes were from " Chapter 17: My Application Has No Structure " e.g. telling the story of the system, a technique that I'll surely use.
Matt Diephouse
Dec 19, 2014 rated it liked it
The tl;dr is that (1) tests make it easier to change and improve code, and (2) it can make sense to “worsen” the code as an intermediate step so you can test and improve the code.

Noting that “Testing in isolation is an important part of the definition of a unit test”, Feathers gives a long list of ways to break dependencies for testing:

- Using macros to redefine methods during compilation
- Substituting in a different behavior for a dependency at link time
- Passing in objects instead of creating
...more
Vitor Cavalcanti de Albuquerque
This book is a must for anyone who wants to master software design. It teaches you many techniques and principles to help you on the task of refactoring legacy code (with tests). Even if you are writing a software from scratch, you’ll definitely get to a point where your code will become legacy and difficult to test and to deal with. So I’d definitely keep this book by my side. Besides all that, it kind of helps you see legacy and rotting code from a different perspective: it isn’t just a rottin ...more
Mahmood Hanif
For me, the 'big idea' of this book was the view that legacy code is any code without sufficient unit tests. That makes complete sense to me and is a great way to look at software development. So, the idea gets 5 stars ... The book overall is a bit 'meh'. It's not really something to read from cover to cover although there are valuable insights scattered throughout the book. I think it's a good book to have in your library and reference when you run into a situation that needs these techniques. ...more
Isidro López
Despite the years elapsed since it was written, and the high expectations... it didn't disappoint me at all :-)

I already knew some techniques thanks to Sandro Mancuso screencasts. I got lots of useful reminders, new learnings and reflections and some new techniques.

It's also nice to see techniques for different languages/paradigms. This book is a great complement to the Refactoring one, I can only highly recommend it! :-)
Mark
Sep 06, 2012 rated it it was amazing
This was the most helpful testing book I've ever read. Most books assume that you'll be starting with a greenfield project and can stay on the straight-and-narrow path of TDD all the way to glory: as most devs know, you're usually coming to a project that sorta-kinda-works-in-production and usually has inadequate or no automated testing. This is terrifying: you know change needs to happen, but you have no certainty about how to make it.

Feathers lays out a taxonomy of strategies for grappling wit
...more
Harish R
Mar 10, 2019 rated it it was amazing
This book definitely improves your programming skills. The talk about unit testing and it's benefits is good. More often than not we work in projects or on software that's old. Not every development is Greenfield. In such cases we wonder how to implement our newly learnt unit test skills. That's where this book sits and tells you exactly what to do. Don't read this book as a fresher. Gain some experience, fight some legacy code, invent some techniques of your own. Then come here and you would ap ...more
Emad Elsaid
Feb 23, 2018 rated it really liked it
it's a good book, examples are mostly statically typed languages which is not so helpful in the case you're a ruby developer.
but it's good for setting the mentality and perspective for you no matter what language you're using.
João Paiva
Jun 12, 2020 rated it it was ok
Found the book quite outdated. I live the definition that legacy code is code without tests, and the book includes several interesting techniques (even some I'd never used). Having said that, the book is mostly about adding unit tests to code single threaded programs written in statically typed languages. Further, IDEs today can automated most of the techniques described in the book. In conclusion, I mostly I missed techniques around handling dynamically typed languages and thread-safety issues.
Martin Nachev
Nov 13, 2018 rated it liked it
Recommends it for: Beginners only
2.5/5

Ironically, in 2018 this has become a Legacy book, with a lot of the techniques explained being outdated. Unless you're an absolute beginner that hasn't read better titles like Clean Code you won't get much out of this book.
Most of this book can be summed up as simply:
1. Do Unit Tests so you can refactor safely
2. Use your common sense (a.k.a. heuristics)
Paulius
Nov 10, 2019 rated it really liked it
Yes, some of the sections were outdated, but still this book offers a really good glimpse on how to handle work with legacy code. Basically it is just a set of ways helping to cover codebase with tests (breaking dependencies, extracting methods and so on). Really enjoyed it, can give you a feeling that you are not alone if you are working with some legacy code.
Rodion Krivoshein
Nov 07, 2017 rated it it was amazing
Read it if you want to succeed in programming.
Yehia Abo el-nga
May 16, 2019 rated it it was amazing
This author has a very hands-on writing style. If he is explaining a problem, he is far from high level abstractions. He dives deep into details of the problem with detailed examples; And shows a very thorough thought process. The idea I liked the most was effect graphs. I could solidly say that I learned something after reading this book.
Max Wolffe
Aug 05, 2019 rated it really liked it
Shelves: to-read-cs
This book was originally written in 2004 and published in 2005. Given that, it is a remarkably relevant text, with some real gems to help one approach refactoring a large “legacy” code base.

I particularly appreciated the definition of legacy code - as code which is not under test - the rest of the book gives one a toolset for putting that code under test, after which any refactoring is trivial.

That said - there are a few aspects which will not be for everyone.

1. It is dated - refactoring and t
...more
James
Mar 21, 2019 rated it it was amazing
A fantastic reference book. Dozens upon dozens of specific, concrete solutions to specific real-world problems that software engineers tend to run into when dealing with legacy code. Highly recommended.
Ulas Tuerkmen
Oct 08, 2018 rated it really liked it
The books on object-oriented programming written or edited by one of the signatories of the Agile manifesto (Robert Martin, Martin Fowler or Kent Beck, to name a few) tend to have some common characteristics. They use Smalltalk or Java as the language for the code samples, pack a lot of wisdom and interesting examples, and unfortunately tend to be long. This book, from the Robert C. Martin series, discusses cases of Java and C++ code bases that are painful to work on, and how to improve them. At ...more
Sergey Teplyakov
Oct 11, 2016 rated it really liked it
This was one of the books that “laid” on my ‘virtual’ to-read shelf for a long time. I’ve heard a lot about this book but never have time to get my own opinion.

So finally I’ve read it and I have good part and not so good part of it.

Good part is that the book is really good. Michael is trying to give reasonable plan for everyone who is working with legacy code (i.e. for all of us): with specific patterns that help to break dependencies, untangle the mess and a testing suite and start working on t
...more
Todor
Feb 09, 2017 rated it it was amazing
This was a perfect book, written by a person that's been involved in a lot of legacy projects. I found some useful tips and approaches in it. Sadly most of the patterns are either java or c++ related.
Trevor Bramble
Jan 24, 2013 rated it liked it
Great stuff, but because it's all in Java, the tactical material is very difficult to use or even connect with for non-Java programmers. And of course, this is almost completely a book about tactical code changes under the larger strategy of bringing a system under test.

(If the book were "Working Effectively with Legacy Java Code" it would deserve a higher rating from me because it would have been my fault for picking up a Java book.)
Junsong Li
Nov 01, 2015 rated it really liked it
Shelves: cs
I agree with most of methods discussed in the book.

I think it sometimes makes things worse to add abstract layer on classes and functions in order to have unit test. But without unit test, legacy code will never be improved. Maintaining and evolving in legacy code is a truly hard problem, which I am dealing with everyday.

I also think we probably should just let legacy code die anyway.

This book can be used as a reference book.
lehaleha
Mar 30, 2016 rated it it was amazing
Frighteningly a lot from the book is applicable to the shiny new code I write/read. Ideas and techniques are very thoroughly explained and illustrated (which is a bit boring sometimes). Also there are a lot of interesting thoughts, ideas and metaphors - distilled years of author's experience. Good book!
Wangyiran
Feb 11, 2015 rated it it was amazing
the book only tell me one thing:how to address the dependencies program,it contains many code,let you understand clearly to how to write decouple code,how to add test on the legacy code,it help me shape the code thought,real good book!
Lakshmi Prashanth
An apt one for my teams doing code maintenance.
Ioana
Nov 29, 2019 rated it really liked it
A few notes: this is a reference book, not one that I would recommend reading from cover to cover. It works very well for an engineer facing a problem and looking up a specific way to tackle it. Also, I read this book on my Kobo and would strongly suggest reading this as a physical copy to be able to browse the code examples properly.

This is a book that focuses on how one should approach small changes, such as fixing a bug or adding a new feature. It is less about overall design or philosophy wh
...more
« previous 1 3 4 5 6 7 next »
There are no discussion topics on this book yet. Be the first to start one »

Readers also enjoyed

  • Refactoring: Improving the Design of Existing Code
  • Test Driven Development: By Example
  • Domain-Driven Design: Tackling Complexity in the Heart of Software
  • Clean Code: A Handbook of Agile Software Craftsmanship
  • The Clean Coder: A Code of Conduct for Professional Programmers
  • Design Patterns: Elements of Reusable Object-Oriented Software
  • Growing Object-Oriented Software, Guided by Tests
  • The Pragmatic Programmer: From Journeyman to Master
  • Patterns of Enterprise Application Architecture
  • Extreme Programming Explained: Embrace Change (The XP Series)
  • Clean Architecture
  • Code Complete
  • Release It!: Design and Deploy Production-Ready Software (Pragmatic Programmers)
  • Continuous Delivery: Reliable Software Releases Through Build, Test, and Deployment Automation
  • Head First Design Patterns
  • The Mythical Man-Month: Essays on Software Engineering
  • The Passionate Programmer
  • Pragmatic Thinking and Learning: Refactor Your Wetware
See similar books…

Goodreads is hiring!

If you like books and love to build cool products, we may be looking for you.
Learn more »

Related Articles

San Francisco is a gold rush town. There aren’t many books about people in their 20s who move to Silicon Valley with dreams of earning a living wag...
34 likes · 1 comments
“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.” 21 likes
“Programming is the art of doing one thing at a time” 16 likes
More quotes…