Get more out of your legacy systems: more performance, functionality, reliability, and manageability

Pdf

Working Effectively with Legacy Code. Prentice Hall Professional Technical Reference. Upper Saddle River, NJ 07458 www,phptr.com. From the Library of Brian Watterson Working Effectively with Legacy Code. Like all of the other testing tools described in this chapter, it is free and supported by a community of developers. You can download it from www.junit.org. The key to working effectively with legacy code is getting it to a place where it is. But nothing is free. We can produce the most value working backwards: build the invariant first, then refactor to make the code clear. Work effectively with legacy code also make it easier to clean things up.

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, Michael Feathers offers start-to-finish strategies for working more effectively with large, untested legacy code bases. This book draws on material Michael created for his renowned Object Mentor seminars: techniques Michael has used in mentoring to help hundreds of developers, technical managers, and testers bring their legacy systems under control.

The topics covered include

  • Understanding the mechanics of software change: adding features, fixing bugs, improving design, optimizing performance
  • Getting legacy code into a test harness
  • Writing tests that protect you against introducing new problems
  • Techniques that can be used with any language or platform—with examples in Java, C++, C, and C#
  • Accurately identifying where code changes need to be made
  • Coping with legacy systems that aren’t object-oriented
  • Handling applications that don’t seem to have any structure

This book also includes a catalog of twenty-four dependency-breaking techniques that help you work with program elements in isolation and make safer changes.

Another Great Books

  • Working Effectively with Legacy Code

    Get more out of your legacy systems: more performance, functionality, reliability, and manageability Is your…

  • Code Happy
  • Computers

    Did you just get a computer? Do you need more information about how to use…

  • Clean Code: A Handbook of Agile Software Craftsman...

    Even bad code can function. But if code isn't clean, it can bring a development…

  • Clean Code: A Handbook of Agile Software Craftsman...

    Even bad code can function. But if code isn’t clean, it can bring a development…

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

See a Problem?

We’d love your help. Let us know what’s wrong with this preview of Working Effectively with Legacy Code by Michael C. Feathers.
Not the book you’re looking for?

Preview — Working Effectively with Legacy Code by Michael C. Feathers

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
Published September 1st 2004 by Prentice Hall
To see what your friends thought of this book,please sign up.
To ask other readers questions aboutWorking Effectively with Legacy Code,please sign up.
Popular Answered Questions
RyanDisparate examples are provided for each concept but no exercises.
Essential Programming Books
155 books — 452 voters
Software Craftsmanship
35 books — 105 voters

More lists with this book...
Rating details

|
Dec 24, 2012Erika RS rated it really liked it
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
Feb 03, 2009Avdi rated it it was amazing
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.
Jun 27, 2012Marshall 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
Oct 15, 2018Bill 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
Jan 18, 2010Ash Moran 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
Dec 02, 2017Regis Hattori rated it liked it
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
Oct 04, 2018Aurelian rated it really liked it
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.
Oct 21, 2017Vitor 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
Dec 13, 2013Mahmood Hanif rated it liked it · review of another edition
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
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
Nov 13, 2018Martin Nachev rated it liked it
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)
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
Nov 07, 2017Rodion Krivoshein rated it it was amazing
Read it if you want to succeed in programming.
May 16, 2019Yehia Abo el-nga 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.
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.
Oct 08, 2018Ulas Tuerkmen 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
Oct 11, 2016Sergey Teplyakov 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
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.
Jan 27, 2015Rudolf O. rated it it was amazing
Shelves: software-maintenance, computer-science, favorites
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
Nov 01, 2015Junsong Li rated it really liked it
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.
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!
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!
An apt one for my teams doing code maintenance.
Jun 14, 2019Raydhitya Yoseph rated it really liked it
This book had been in my radar for a long time and I held reading it because I did not have a strong reason. The team I was working had a good and bearable code to work with. When I was anticipating to be moved to a team with much legacy code, I decided to read this book.
In the first part, the book defines what is legacy code and what do we need to achieve to make the code better. In the second part, the book lays out one by one of the common problems we have when working with legacy code. In th
...more
Overall, I enjoyed this read and am glad I gave it a try since it's so frequently recommended.
I personally found some of the techniques he introduced obvious, but I also appreciated the depth he took in examining the techniques. For me personally, I found the greatest value in walking through his general thought process when approaching legacy systems and assessing tradeoffs. I found this book influenced the approach I took in my work immediately.
Reading through the techniques felt almost like r
...more
Oct 15, 2017MarkH rated it really liked it

Working Effectively With Legacy Code Pdf Free Download For Mac

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
Dec 30, 2018Otavio Valadares rated it liked it
This book is famous and I think when it was written, it made a lot more sense than nowadays. In most parts, the book treats legacy code only as the project that doesn't have tests and spend a lot of time telling you how to make changes in small steps and write tests, unfortunately nowadays many developers deals every day with legacy code that have tests and face other kinds of problems like, libs versions, architecture, technical debts, refactoring and much more (The book talks about some proble...more
Working Effectively With Legacy Code Pdf Free DownloadJan 09, 2018Melvin

Working Effectively With Legacy Code Pdf Free Download Windows 10

rated it it was amazing
Shelves: worth-making-notes, top-to-read, programming
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
Aug 13, 2017James Taylor rated it liked it
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
There are no discussion topics on this book yet.Be the first to start one »
Recommend It | Stats | Recent Status Updates
See similar books…
If you like books and love to build cool products, we may be looking for you.
Learn more »
See top shelves…

Working Effectively With Legacy Code Michael Feathers Pdf Free Download

“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.” — 20 likes
“Programming is the art of doing one thing at a time” — 15 likes

Working Effectively With Legacy Code Pdf Free Download For Windows

More quotes…