Programming Books C Java PHP Python Learn more Browse Programming Books
Working Effectively with Legacy Code and over one million other books are available for Amazon Kindle. Learn more

Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 


or
Sign in to turn on 1-Click ordering
Sell Us Your Item
For a $22.53 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Start reading Working Effectively with Legacy Code on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Working Effectively with Legacy Code [Paperback]

Michael Feathers
4.5 out of 5 stars  See all reviews (68 customer reviews)

Buy New
$49.62 & FREE Shipping. Details
Rent
$31.75
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
In Stock.
Want it Tuesday, July 15? Choose One-Day Shipping at checkout. Details
Free Two-Day Shipping for College Students with Amazon Student

Formats

Amazon Price New from Used from
Kindle Edition $29.99  
Paperback $49.62  
Unknown Binding --  
Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Book Description

October 2, 2004 0131177052 978-0131177055 1
This is the eBook version of the printed book. If the print book includes a CD-ROM, this content is not included within the eBook version. 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.


Frequently Bought Together

Working Effectively with Legacy Code + Clean Code: A Handbook of Agile Software Craftsmanship + Refactoring: Improving the Design of Existing Code
Price for all three: $126.39

Buy the selected items together


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

  • Paperback: 456 pages
  • Publisher: Prentice Hall; 1 edition (October 2, 2004)
  • Language: English
  • ISBN-10: 0131177052
  • ISBN-13: 978-0131177055
  • Product Dimensions: 9.1 x 6.9 x 1 inches
  • Shipping Weight: 1.5 pounds (View shipping rates and policies)
  • Average Customer Review: 4.5 out of 5 stars  See all reviews (68 customer reviews)
  • Amazon Best Sellers Rank: #79,162 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

Most Helpful Customer Reviews
86 of 88 people found the following review helpful
5.0 out of 5 stars No more fairy-land October 20, 2004
By Phlip
Format:Paperback
The average book on Agile software development describes a fairyland of greenfield projects, with wall-to-wall tests that run after every few edits, and clean & simple source code.

The average software project, in our industry, was written under some aspect of code-and-fix, and without automated unit tests. And we can't just throw this code away; it represents a significant effort debugging and maintaining. It contains many latent requirements decisions. Just as Agile processes are incremental, Agile adoption must be incremental too. No more throwing away code just because it looked at us funny.

Mike begins his book with a very diplomatic definition of "Legacy". I'l skip ahead to the undiplomatic version: Legacy code is code without unit tests.

Before cleaning that code up, and before adding new features and removing bugs, such code must be de-legacified. It needs unit tests.

To add unit tests, you must change the code. To change the code, you need unit tests to show how safe your change was.

The core of the book is a cookbook of recipes to conduct various careful attacks. Each presents a particular problem, and a relatively safe way to migrate the code towards tests.

Code undergoing this migration will begin to experience the benefits of unit tests, and these benefits will incrementally make new tests easier to write. These efforts will make aspects of a legacy codebase easy to change.

It's an unfortunate commentary on the state of our programming industry how much we need this book.
Was this review helpful to you?
89 of 95 people found the following review helpful
5.0 out of 5 stars a wealth of practical information and solutions October 13, 2004
Format:Paperback
Martin Fowler's book on Refactoring showed us how to improve the design of our code. We learned to make changes safely, by taking small, rote steps, and by ensuring that we ran our tests after each small change. But what if we're working on the typical ugly system with no tests? In Working Effectively With Legacy Code, Michael Feathers tackles the problem that most of us end up dealing with.

Feathers does an excellent job of articulating the problems and scenarios, using clear examples from C, C++, Java, and C#. Many of the code examples look a lot like real examples I come across all the time--they don't appear to be fabricated.

Working Effectively With Legacy Code contains a catalog that provides a wealth of solutions. The catalog shows how to resolve concerns like, "I'm changing the same code all over the place" and "how do I safely change procedural code?"

The book is highly entertaining and comes across as a conversation with a really sharp, really patient guru developer. Often, it's a chore to slog through code-heavy books. But Feathers manages to keep my attention with interesting stories, loads of examples, and well-written text.

I think that Working Effectively With Legacy Code is an important book. The vast majority of existing code presents the classic catch-22: you can't change it safely because it doesn't have tests, and you can't write tests without changing it to easily support testing. It's not an easy problem, and most people will give you high-level ideas for solving it. Feathers is the first person to dig deep and present a wealth of knowledge and insight on the problem, all in one place. I'll be pulling this book from my shelf for years to come.
Comment | 
Was this review helpful to you?
35 of 36 people found the following review helpful
5.0 out of 5 stars excellent reference and guide November 11, 2004
Format:Paperback
"Working Effectively with Legacy Code" is a very valuable resource. The author defines "legacy code" as "code without tests." It doesn't matter whether the code was written last week or ten years ago. There is more emphasis on old code that nobody understands, mainly because it is messier and harder to work with.

The examples in the book are mainly in C, C++ and Java, but there are a couple in C# and Ruby. While it is essential to know one of these languages, the author provides enough information to understand the others. When a technique only applies to a certain language, it is clearly indicated.

The author shows how different diagrams can help you learn how to understand code. In addition to UML, there are dependency and effect sketches. The author uses these to show how to think about understanding and refactoring. Other tools, such as refactoring browsers and mocks are explained.

Speaking of refactoring, there are "dependency breaking techniques" (aka refactorings) with step-by-step instructions (Martin Fowler style) throughout the book. There are also explanations of why patterns and design rules exist. Most importantly, there are lots and lots of cross-references and an excellent index.

Working with legacy code isn't fun, but this book helps make it as painless as possible. With the split emphasis between psychological/understanding/techniques and refactoring, this book is both a great read and an excellent reference.
Comment | 
Was this review helpful to you?
77 of 89 people found the following review helpful
2.0 out of 5 stars Not applicable for Large Legacy C applications December 3, 2009
Format:Paperback|Verified Purchase
I work at a decent sized telecommunications company. We have legacy code written in C that is over 1 million lines of code. Some of the code was written as far back as 1988. Needless to say, we didn't follow TDD and there are not a lot of unit tests. We have recently increase the number developers to add features to this code base and I was hoping that this book would help.

We've been doing a "techincal book club" for a while as part of continuous training. I've had about 20 engineers reading this book a few chapters a week and discussing them. Most of the reviews from the group have been negative. Hard to read, annoying editorial errors (duplicate text on following pages), and not really getting a lot out of it. The main problem is that our system is not using an object oriented language so a lot (most) of the techniques are not relevant.

At first I thought it was just me, but as I asked the other engineers, there was a lot of concensus, even from engineers that have worked on Java/C++ projects in the past.

I picked this book because of the following taglines on the back of the book:

* Techniques that can be used with any language or platform-with examples in Java, C++, C, and C#
* Coping with legacy systems that aren't object-oriented

There is one small section on non-object oriented code. It basically says that you should slowly migrate to an object oriented language.

Anyway - we've stopped reading the book. If you're code is already object oriented, this is probably a great book. If it's not, I wouldn't bother. Instead pick up a differnt book on how to migrate the code to an object oriented language.
Was this review helpful to you?
Most Recent Customer Reviews
4.0 out of 5 stars There is light at the end of the tunnel
For any one who ever had to deal with someone else's spaghetti code (or his own) this book will give you hope.
I don't frown any more when I have to deal with legacy code. Read more
Published 9 days ago by Atanas Zdravkov
3.0 out of 5 stars Good book
Gave me a lot insight into refactoring and also made me a paranoid developer - when chancing code. I will hope this book will be made in a new edition.
Published 25 days ago by Thomas Riis
5.0 out of 5 stars Super. I love it!
Highly recommend for reading. It covers lot's of aspects and explains key points of patterns and where it stands in legacy code.
Published 1 month ago by Bogdan Kulbida
5.0 out of 5 stars A New Way of Thinking About Testing and Refactoring
Does it take you forever to write unit tests? Is it pain staking and laborious? Are there are kinds of dependencies that you have to figure out how to create and layer upon layer... Read more
Published 1 month ago by adamzg
4.0 out of 5 stars Useful approaches, regardless of language
Michael Feathers does a fine job of presenting issues which plague legacy code, without regard to language. Read more
Published 3 months ago by William Meyer
5.0 out of 5 stars Changed my thinking about pragmatism and striving for clean code in...
Great insights into the reality of legacy projects - It can not be made perfect in one go, divide & conquer, iterative improvement and adding test coverage are the goals. Read more
Published 3 months ago by Christian Weiss
5.0 out of 5 stars Opens door to a new set of challenges
The book is written in a very clear and easily readable way.
It offers a practical approach of making our code base better incrementally,
while practicing different type... Read more
Published 5 months ago by Victor Fine
3.0 out of 5 stars Still worth a read...
This book isn't quite what I was expecting based on what I've heard from many other people about it (and some of the reviews). Having said that, it's still worth a read. Read more
Published 6 months ago by Craig E. Shea
5.0 out of 5 stars An excellent book
I've had this classic on my shelf for about a year. I finally push my other books aside to read this. It was well worth it. Read more
Published 6 months ago by Paul Swagerty
5.0 out of 5 stars Perfect
I bought due to Uncle Bob's recomendation and it really worth it !
This book gives a very good explanation on how to test real world existing applications.
Published 6 months ago by Bruno Gama Catao
Search Customer Reviews
Search these reviews only


Forums

There are no discussions about this product yet.
Be the first to discuss this product with the community.
Start a new discussion
Topic:
First post:
Prompts for sign-in
 



Look for Similar Items by Category