152 books
—
430 voters
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
by
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
In this book, Michae ...more
Paperback, 464 pages
Published
September 1st 2004
by Prentice Hall
Friend Reviews
To see what your friends thought of this book,
please sign up.
Reader Q&A
To ask other readers questions about
Working Effectively with Legacy Code,
please sign up.
Popular Answered Questions
Ryan
Disparate examples are provided for each concept but no exercises.
Community Reviews
(showing 1-30)
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
Given that we have to deal with legacy code, how can it be ...more
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
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
The main value of Working Effectively with Legacy Code is low risk ways to deal with untested code. There's a large ...more
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
"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
Oct 21, 2017
Vitor Cavalcanti de Albuquerque
rated it
it was amazing
Shelves:
software-development,
software-craftsmanship
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
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
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
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
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
Feathers lays out a taxonomy of strategies for grappling wit ...more
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
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
this book is a must-have for all software developers. in our industry it is far more likely that you'll inherit code that you will need to add new features too while also fixing any bugs that are found.
without this book you'll throw up your hands in frustration and dive into bug fixing before adding any new features. this is a death sentence for any consulting contract.
with this book you'll be able to make progress and once you get over the initial hump, you'll find yourself enjoying the challen ...more
without this book you'll throw up your hands in frustration and dive into bug fixing before adding any new features. this is a death sentence for any consulting contract.
with this book you'll be able to make progress and once you get over the initial hump, you'll find yourself enjoying the challen ...more
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.
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.
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!
Jul 10, 2016
Lakshmi Prashanth
added it
An apt one for my teams doing code maintenance.
A solid book about how to handle existing projects that need help being put under testing. I will use a handful of the techniques countless times as they make up the backbone of refactoring code and putting it to test. Not all the methods are as useful unfortunately. Some due to the specific circumstances they should be used in, reliance on the programming language having a compiler, or dependence on language-specific features found in languages like C++. If you are unfamiliar with refactoring a
...more
Amazing book! Since almost all working code in the world is Legacy Code, working effectively with legacy code is a valuable skill to have as a software engineer/ architect.
Besides getting decades of information of a dedicated expert, this book is also incredibly motivating.
You'll get the tools to make legacy code a little bit better with every single change you make to it.
Instead of just 'making it work' - with every change - you can also make a legacy code base more understandable for colleag ...more
Besides getting decades of information of a dedicated expert, this book is also incredibly motivating.
You'll get the tools to make legacy code a little bit better with every single change you make to it.
Instead of just 'making it work' - with every change - you can also make a legacy code base more understandable for colleag ...more
It's probably a great book for coding experts, but I'm not the target audience. It felt dated and overly complicated for 2017. I understood no more than 20%, but those things were quite useful. In general I would prefer to get more info in the matter searching through the random Internet blogposts. I didn't not expect this book to be all about writing Unit Tests with overly complicated examples. Forced myself to read up until the end. It got me thinking whether I really should read all the "clas
...more
This book is about refactoring to get your code base under test. Some of the ideas are straightforward enough to understand without reading the examples, but sometimes his choice of examples aren't the best. First of all, he switches languages between C# and C. These are totally different languages and if you only know one of them, it means comparing his various techniques is much harder than it should be. Additionally, it would have been better if he chose one application as an example, rather
...more
Excelente catálogo de técnicas de refactor. Imprescindible para alguien que tenga que pelear con aplicaciones "legacy".
Hay que tener en cuenta que las técnicas de refactor de este libro están enfocadas a conseguir cobertura de tests en una aplicación que no cuenta con ellos, para después seguir añadiendo funcionalidades e incluso corregir bugs.
Me han resultado un poco difíciles de seguir los ejemplos en C y C++ ya que no he leído mucho código en estos lenguajes, aunque en general los ejemplos so ...more
Hay que tener en cuenta que las técnicas de refactor de este libro están enfocadas a conseguir cobertura de tests en una aplicación que no cuenta con ellos, para después seguir añadiendo funcionalidades e incluso corregir bugs.
Me han resultado un poco difíciles de seguir los ejemplos en C y C++ ya que no he leído mucho código en estos lenguajes, aunque en general los ejemplos so ...more
If you've read Refactoring and Clean Code, you probably don't need to read this one. If you want good code, you need tests so that you can refactor safely. The book deals mostly with getting procedural code into shape using classes, mocks, and dependency injection. Some of the advice is no longer good, such as creating interface classes so you can create fake classes. I didn't get much out of it trying to deal with a hairy python codebase.
A collection of tips and tricks to bring a system into a testable state. They do not guarantee that it will be pretty afterwards however. The code samples are in C++ and Java which are frequent throughout the relavtively short chapters.
I only give it four starts however as it kind of treats unit testing as a panacea without really explaining how to do it requiring you to read up on how to unit test yourself, but the seams and sprout class strategies are vital.
I only give it four starts however as it kind of treats unit testing as a panacea without really explaining how to do it requiring you to read up on how to unit test yourself, but the seams and sprout class strategies are vital.
Книжка про то, как изменять код, для которого нет тестов. Как изолировать куски кода, добавлять к ним хоть какие-то тесты и вносить изменения. Сказать, что я прям вот вообще-вообще в восторге не могу, но книжка хорошая и прочитать её стоит.
Осилил прочитать полтора раза. Прочитал первый, начал перечитывать, но на середине забил.
Осилил прочитать полтора раза. Прочитал первый, начал перечитывать, но на середине забил.
There are no discussion topics on this book yet.
Be the first to start one »
Goodreads is hiring!
No trivia or quizzes yet. Add some now »
“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.”
—
17 likes
“Programming is the art of doing one thing at a time”
—
15 likes
More quotes…




















