Working Effectively with Legacy Code and over 2 million other books are available for Amazon Kindle . Learn more
£27.34
  • RRP: £40.99
  • You Save: £13.65 (33%)
FREE Delivery in the UK.
In stock.
Dispatched from and sold by Amazon.
Gift-wrap available.
Quantity:1
Trade in your item
Get a £0.05
Gift Card.
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

Working Effectively with Legacy Code (Robert C. Martin) Paperback – 22 Sep 2004


See all 4 formats and editions Hide other formats and editions
Amazon Price New from Used from
Kindle Edition
"Please retry"
Paperback
"Please retry"
£27.34
£22.80 £20.00

Frequently Bought Together

Working Effectively with Legacy Code (Robert C. Martin) + Refactoring: Improving the Design of Existing Code (Object Technology Series) + Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin)
Price For All Three: £81.97

Buy the selected items together


Trade In this Item for up to £0.05
Trade in Working Effectively with Legacy Code (Robert C. Martin) for an Amazon Gift Card of up to £0.05, which you can then spend on millions of items across the site. Trade-in values may vary (terms apply). Learn more

Product details


More About the Author

Discover books, learn about writers, and more.

Product Description

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.


Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index
Search inside this book:

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

4.2 out of 5 stars
Share your thoughts with other customers

Most Helpful Customer Reviews

8 of 8 people found the following review helpful By Matthew Skelton on 18 Jun 2012
Format: Paperback
What is your view of unit tests and test-driven development (TDD)? If you believe that these techniques are merely a passing fad, or largely a waste of time, then read no further, and good luck with that approach! However, if you want to understand how TDD can be a powerful weapon for attacking the 'monsters' of ageing and not-tested code, or want to ensure that new code you write is maintainable, or indeed you (like me) are concerned about how we can effectively improve and develop legacy systems in the context of infrastructure-as-code and end-to-end automation, then Working Effectively with Legacy Code is essential reading.

The reason why we left behind the TDD skeptics (and they still exist, even as I write this in 2012) is that Michael Feathers is very clear about the nature of legacy code: legacy code has no test coverage, and 'code without tests is bad code'. Let's consider the implication of this view: even if your code was written yesterday, if there are no unit tests to characterise or define the behaviour of the code, then the code is legacy, and will be difficult to change without introducing bugs. On this basis, it becomes dangerous, disrespectful to others and perhaps even unprofessional to write code without tests.

We are also urged to expand our view of why we write tests, especially when working with legacy code: instead of specifying correctness, tests can be written to characterise behaviour of code. This is particularly helpful when we are breaking dependencies, as using tests to characterise behaviour helps to build an understanding of how non-tested code actually operates.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
26 of 27 people found the following review helpful By A Customer on 26 Feb 2006
Format: Paperback
This book focuses on how best to treat existing, large and probably poorly designed code, when needing to add features. This is most likely to happen when you have big old code that needs maintaining, but a lot of the advice is directly applicable to open source projects that lack tests and documentation. Therefore this can be considered as a valuable addition to the literature on testing and refactoring.
The advocated approach is rooted in writing unit tests and refactoring. Each chapter is themed around a problem (e.g. "Dependencies on Libraries is Killing Me", "I Don't Understand the Code Well Enough to Change It"), and then a series of techniques are suggested. At the back of the book are a series of refactorings, specifically for dealing with large classes, with some platform specific approaches, such as C++ forbidding the use of virtual functions that resolve to subclasses in constructors.
The code is mainly in Java, with a large number of examples in C++, and a handful in C and C#. You can probably get by with just knowing Java.
To get the most out of this book, I would suggest having read Martin Fowler's Refactoring first. It would also help to be familiar with the JUnit Java testing framework, which is used for the testing examples throughout. If you don't already know JUnit, you can pick up enough knowledge from the many articles on the web, and you certainly don't need to have read a book on Test Driven Development.
A reasonable measure of the quality of a book such as this is if it changes the way you code. It did so for me, and I recommend this as another high quality book in the Robert C. Martin series.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
8 of 9 people found the following review helpful By Anders Juul Larsen on 4 Dec 2009
Format: Paperback
I attended Feathers' speach at JAOO this year and was highly motivated to work with legacy code - I really wanted to try out all the presented techniques! I wished for the next contract to be a legacy project, and lo and behold, wishes do come true.

Given that, I was highly motivated when my copy arrived in the mail and ate it in three healthy bites - not leaving too much time to sleep when you have a wife and two small kids that you want to see too!

MF starts by stating that 'good code is code under test'.

The highligt is to some extend the 20-something page introduction. MF manages to set the arena for working with legacy code and pass on the enthusiasm of getting a job done on difficult terms. I mean, if you can be a success with green field projects, thats fine, but how well do you cope with legacy code?

Following that is a rather lengthy catalog of ways to get code under test. Much of the time you'd nod and say, yes, I've seen mess like this before - so that is how I could have dealt with it!

Having had the time to try to work by the principles, I'd summarize that the book has given me a professional lift. Many a time, I'd have to bypass the good advice due to pressure to produce short-term results, but over-all I'd say that more and more of the 'tricks' gets used and with good results.

Highly reccommended!
Anders, M.Comp.Sc., Contractor, Denmark
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
1 of 1 people found the following review helpful By Ian London on 24 Mar 2014
Format: Kindle Edition Verified Purchase
There are a handful of reviews slating this book for dealing with code less than a decade or two old. The reality is, code becomes legacy almost as soon as it is written especially if it wasn't written by people with a strong architectural foundation.
With that in mind, this a book about refactoring with an assumption the reader sees the value of TDD and works in a C# like language. This should not be too much of a surprise given the link to Robert Martin.

If you have a code base which has no test coverage and grew organically and you don't know how to approach fixing it, you will find some guidance.

I've docked stars for a couple of reasons. First, it's too long. The material feels stretched. I'd have been happier if it were a third of the size. I've also docked a star for being restricted in the number of simultaneous Kindle devices it will work on (5). Probably not an issue for a lot of people, but it is for me. I started with a two star rating, but if you take it as an introduction level text, it's probably sufficient.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Most Recent Customer Reviews



Feedback