
Enjoy fast, free delivery, exclusive deals, and award-winning movies & TV shows with Prime
Try Prime
and start saving today with fast, free delivery
Amazon Prime includes:
Fast, FREE Delivery is available to Prime members. To join, select "Try Amazon Prime and start saving today with Fast, FREE Delivery" below the Add to Cart button.
Amazon Prime members enjoy:- Cardmembers earn 5% Back at Amazon.com with a Prime Credit Card.
- Unlimited Free Two-Day Delivery
- Streaming of thousands of movies and TV shows with limited ads on Prime Video.
- A Kindle book to borrow for free each month - with no due dates
- Listen to over 2 million songs and hundreds of playlists
- Unlimited photo storage with anywhere access
Important: Your credit card will NOT be charged when you start your free trial or if you cancel during the trial period. If you're happy with Amazon Prime, do nothing. At the end of the free trial, your membership will automatically upgrade to a monthly membership.
Buy new:
-36% $41.71$41.71
Ships from: Amazon.com Sold by: Amazon.com
Save with Used - Good
$33.08$33.08
Ships from: Amazon Sold by: Burlington MA- Used Book Superstore -new books too

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Working Effectively with Legacy Code 1st Edition
Purchase options and add-ons
This book provides programmers with the ability to cost effectively handlecommon legacy code problems without having to go through the hugelyexpensive task of rewriting all existing code. It describes a series of practicalstrategies that developers can employ to bring their existing softwareapplications under control. The author provides useful guidance about how touse these strategies when refactoring or making functional changes to codebases. One of the book's key points is that it teaches developers to write teststhat can be used to make sure they are not unintentionally changing theapplication as they optimize it. Examples are provided in Java, C++, and Csharp,and the book assumes that the reader has some knowledge of UMLnotation. Strategies using UML and code in C++ and Java primarily whilelanguage independent advice will be delivered in side bars and appendices forlanguage specific users.
- ISBN-100131177052
- ISBN-13978-0131177055
- Edition1st
- Publication dateSeptember 22, 2004
- LanguageEnglish
- Dimensions7 x 1.2 x 9.25 inches
- Print length464 pages
Frequently bought together

More items to explore
From the brand

From the Publisher

Must-Read for Every Programmer and Developer
This classic, endorsed by Robert "Uncle Bob" Martin (author of Clean Code), is on many must-read lists for programmers and developers including lists featured on Guru99, DZone, Built In, Dev Community (dev.to), and more.
"The book is important, as almost every developer at some point in career, has to work with a legacy system and it still represents the most challenging problems for many companies. The book goes deep into understanding the general process of a software change like adding features, fixing bugs, optimizing performances, etc."
—Milan Milanovic, DZone, November 2021
Editorial Reviews
From the Back Cover
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, 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.
© Copyright Pearson Education. All rights reserved.
About the Author
MICHAEL C. FEATHERS works for Object Mentor, Inc., one of the world's top providers of mentoring, skill development, knowledge transfer, and leadership services in software development. He currently provides worldwide training and mentoring in Test-Driven Development (TDD), Refactoring, OO Design, Java, C#, C++, and Extreme Programming (XP). Michael is the original author of CppUnit, a C++ port of the JUnit testing framework, and FitCpp, a C++ port of the FIT integrated-testing framework. A member of ACM and IEEE, he has chaired CodeFest at three OOPSLA conferences.
© Copyright Pearson Education. All rights reserved.
Product details
- Publisher : Pearson; 1st edition (September 22, 2004)
- Language : English
- Paperback : 464 pages
- ISBN-10 : 0131177052
- ISBN-13 : 978-0131177055
- Item Weight : 1.65 pounds
- Dimensions : 7 x 1.2 x 9.25 inches
- Best Sellers Rank: #80,403 in Books (See Top 100 in Books)
- #10 in Software Design & Engineering
- #17 in Software Testing
- #67 in Software Development (Books)
- Customer Reviews:
About the author

Discover more of the author’s books, see similar authors, read book recommendations and more.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Customers find the book's advice practical and approachable, with one noting it's based on tested knowledge from many projects. Moreover, they appreciate its readability, particularly the early chapters, and its value as a guide for dealing with untested applications. Additionally, the book effectively combines useful techniques for legacy code processing. However, the text quality receives negative feedback, with several customers reporting missing portions and duplicated content throughout the book.
AI-generated from the text of customer reviews
Select to learn more
Customers find the book's advice practical and approachable, providing great approaches to solving specific problems. One customer notes it serves as an excellent resource for dealing with untested applications.
"...This book is dedicated to given practical techniques to remove that fear, and get to a place where you can actually enjoy working in your code base...." Read more
"...Why is that useful? First, it is an effective way of documenting what a system actually does, particularly if --- as with most legacy code --- there..." Read more
"Refactorings in last chapter are heart of book. Much timeless advice here. The primary concept is that code without automated tests is legacy code...." Read more
"...your perceptions about testing on their head, Feathers also provides good advice on how to create loosely coupled code, how to identify and..." Read more
Customers find the book to be a worthwhile and enjoyable read, with one customer describing it as the best guide ever written.
"...I would highly recommend this to book to anyone. It is worth the money, time, and effort to read it cover-to-cover...." Read more
"...But overall, this book is simply supurb, a tour de force of an important topic that has received little coverage before." Read more
"...Having said that, it's still worth a read. The main problem I have with the book is that a good number of the examples use C++ or even C!..." Read more
"...Pretty useful but you still have to put it all together yourself into a routine that is right for you/your team/your project, and then actually do..." Read more
Customers find the book readable, particularly noting that the early chapters are easy to understand and serve as a great reference for writing unit tests.
"...It is worth the money, time, and effort to read it cover-to-cover...." Read more
"...Feathers' style is easy to read. As you would expect there is lots of example code here, and it is folded naturally into the explanatory text...." Read more
"...It is quite readable and accessible, and doesn't overwhelm. I found a lot of valuable techniques in here that I have not found anywhere else...." Read more
"...The book, for all its wisdom within, is not particularly engaging to read and the examples are just. plain. awful...." Read more
Customers appreciate the book's approach to code testing, as it combines useful techniques for legacy code processing and provides wisdom for dealing with it. One customer notes that the strategies can be applied even to writing new code, while another mentions it shows ways to make legacy code testable.
"...that fear, and get to a place where you can actually enjoy working in your code base...." Read more
"...The primary concept is that code without automated tests is legacy code. The book explains how to get code to be testable." Read more
"...It's not just about testing it's also about turning procedural code into object oriented code and bringing your object oriented thinking to the..." Read more
"...to less tightly-coupled, more modular, understandable, and verified code from the time-tested battle-worn code many of us call home...." Read more
Customers report issues with the book's text quality, including missing portions and duplicated content, with specific problems noted on pages 59, 69, and 7.
"...Hard to read, annoying editorial errors (duplicate text on following pages), and not really getting a lot out of it...." Read more
"...Missing sections in the first 10 pages of content. Decided to return it and order it from Barnes & Noble (hopefully their print is better)." Read more
"...and formatting errors throughout, including spots where it appears whole paragraphs are missing...." Read more
"...the book frequently has printing errors that leave out entire passages or sentences from what I can tell...." Read more
Reviews with images

Poor print quality
Top reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on October 19, 2009This was one of those famous, timeless books (like Code Complete) that I had heard many people talk about, and I finally read it. To be honest it was in my Amazon "Wish List" for several months before I ordered it, but it lived up to the hype.
Remember when you first started writing software? Like most people, for me it was a very exciting time and I truly enjoyed learning and trying to push the boundaries of programming. It is a very primal passion that engulfed me, and it is the reason many of us got into this industry. Where did that go? Do you still feel that today? If so, you are one of the lucky ones. In this book, Michael explains how large code bases (that don't have tests around them) can sometimes suck that enjoyment out of our day-to-day tasks, because we slowly develop a fear making changes to this monolithic application because we are worried about what we might break or what expected side-effects fixing a bug or adding a new feature might have. Although we might not typically acknowledge this fear, it is present whether we admit it or not.
Sometimes we romanticize the idea of working on "Greenfield" projects, because if we were just able to start from scratch ... this would be much easier and a lot more fun. I have slowly become convinced that isn't the case. There is tedious and unexpected ripples in new projects just like existing projects. This book is dedicated to given practical techniques to remove that fear, and get to a place where you can actually enjoy working in your code base. It is possible, and Michael has the experience and expertise to help you bring your legacy systems under control.
I often am weary that books like this that are on "hot" topics like test-driven-development are fluff, and aren't very relevant to my day-to-day real-world code. Not true ... at least not on this book. I would highly recommend this to book to anyone. It is worth the money, time, and effort to read it cover-to-cover. This is probably in my top 5 for technology books in terms of real-world value they provide.
To read the full review or find more reviews for technical books, visit [...]
- Reviewed in the United States on January 4, 2005The vast majority of software texts are about greenfield development: creating a new application from nothing at all. But the vast majority of software work involves existing code: adding features, finding bugs, or refactoring code that someone else wrote. This book is a supurb first step in fixing that imbalance.
This is not a theoretical work. For example, Feathers does not present a grand ontology of legacy systems. Not is this book heavy on methodology. Instead Feathers describes techniques --- lots of techniques, roughly 50 --- for working with legacy code.
The techniques are organized by the problems they address. For example, one chapter is entitled "My Application Is All API Calls" and then presents two techniques for working with existing code that is full of calls to APIs.
Feathers comes from the XP school, and he adopts that school's premise that you can safely change code if (and only if) there are sufficient tests in place to tell you when your new change has introduced a bug. Many of the techniques in this book are about different ways of putting legacy code into test harnesses, and doing that safely without introducing bugs along the way.
He also introduces new concepts, or at least concepts I had never seen before. For example, a "characterization test" is a test that characterizes the actual behavior of the code, not what the code is supposed to do, but what it actually does. Why is that useful? First, it is an effective way of documenting what a system actually does, particularly if --- as with most legacy code --- there is no other documentation. And it can tell you when you have changed that existing behavior.
Feathers' style is easy to read. As you would expect there is lots of example code here, and it is folded naturally into the explanatory text. My only gripe with the book is with the examples: they are largely in Java, C++, or C. I would have liked some examples in older legacy-only languages, like COBOL.
But overall, this book is simply supurb, a tour de force of an important topic that has received little coverage before.
- Reviewed in the United States on June 11, 2024Refactorings in last chapter are heart of book. Much timeless advice here. The primary concept is that code without automated tests is legacy code. The book explains how to get code to be testable.
Top reviews from other countries
-
María d.Reviewed in Mexico on November 23, 2020
5.0 out of 5 stars Great!!!
Llegó en excelentes condiciones. Y muy rápido también 😁
-
Paolo MazzoniReviewed in Italy on September 9, 2017
5.0 out of 5 stars Grande libro
Grande libro, devo ancora finire di leggerlo ma è molto utile.
Consigliatissimo a tutte le persone che sviluppano, non solo a chi lavora con codice legacy.
Lo consiglio soprattutto a chi scrive molto codice affiché non lasci in eredità ad altri altro pessimo codice legacy....
- ReviewerReviewed in Australia on January 12, 2024
1.0 out of 5 stars This book is a reprinting of very low quality - beware!
The book arrived with "Printed in the United States of America" in the front, and "Manufactured by Amazon.com.au in Sydney" at the back. On my copy, the cover is misprinted, and the contents of the book include printing and typesetting issues which are not present in the genuine article, such as page titles being half cut off. This book is not a genuine copy of the book, it is a locally printed book which is of severely less quality than the genuine book.
-
elReviewed in Japan on February 7, 2006
5.0 out of 5 stars 設計が悪いシステムの保守でお悩みの方へ
レガシーコードの定義ですが以下のようになります。
ーーー
レガシーコード =
テストできない、していない、設計に問題があるようなコード
ーーー
つまり、どんなに最近に構築されたとしても上記の定義にあてはまるものはレガシーコードです。
本書は、このレガシーコードを
どうやって修正、機能追加を行っていくのか
どうやって既存の設計を改善していくのか
ということが記述されています。
java, c++, c が対象となっています。(javaの扱いが一番多いです)
本書の目次をちょっとみてみると、レガシーコードで悩んでいる方は
興味を持たずにはいられません。以下は目次を一部抜粋しました。
○My Project is not object oriented. How do I make safe changes?
○I need to change a Monster Method and I can't write test for it.
保守担当以外の方でもレガシーコードに対する解決策を学ぶことで、新規開発の際に自分がレガシーコードを書かかずに済みますので、将来的な勉強にもなります。
実際に、設計が悪いシステムの保守をしています。
しかし。この本のおかげでやる気になり良いシステムにどうしたら変えていけるのか?ということを実践できるようになりました。設計の勉強にもなっています
作者の頑張れという気持ちが伝わってくる大変な良書です。
設計が悪いシステムの保守に悩んでいたら本書を手にとってみてください。
きっとシステムを改善していけるようになるでしょう。
- danieleReviewed in Spain on May 12, 2024
5.0 out of 5 stars amazing
great book