Customer Reviews


16 Reviews
5 star:
 (10)
4 star:
 (2)
3 star:
 (3)
2 star:    (0)
1 star:
 (1)
 
 
 
 
 
Average Customer Review
Share your thoughts with other customers
Create your own review
 
 

The most helpful favourable review
The most helpful critical review


8 of 8 people found the following review helpful
5.0 out of 5 stars If you design, build or support software systems, you should read this book.
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...
Published on 18 Jun 2012 by Matthew Skelton

versus
1 of 1 people found the following review helpful
3.0 out of 5 stars Code sample formatting on Kindle edition
I would likely give this book a higher score if it weren't for the fact that the code samples contained in the e-book (and there are a lot of them) are so poorly formatted on the Kindle. I appreciate this is likely due to a limitation of the device but surely the publisher could have found a workaround (using images maybe?)
Published 11 months ago by ALASTAIR TAYLOR


‹ Previous | 1 2 | Next ›
Most Helpful First | Newest First

8 of 8 people found the following review helpful
5.0 out of 5 stars If you design, build or support software systems, you should read this book., 18 Jun 2012
This review is from: Working Effectively with Legacy Code (Robert C. Martin) (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.

Michael Feathers uses the real-world image of a workbench clamp to show how tests can be used to hold tightly or 'clamp' the existing behaviour under test, just as a component in a workshop would be clamped when being worked on to avoid unexpected movement or behaviour during testing. We want to clamp the part of the code under test to enable us to work safely with it without unintended side effects.

Structure of the Book

The book has three main sections. In the first section, The Mechanics of Change, Michael asks us to consider why we want to make changes to software: is the change to fix a bug, to implement a new feature, to improve the use of resources (memory, disk, CPU), or to improve the design via refactoring? Crucially, a change set committed to version control should contain only one of these change types, not a mixture; the change set will thus have a single responsibility, and make future branching and merging easier.

The first section also introduces concepts such as 'seams' (alter behaviour without editing in that place) and 'enabling points' (the place where you choose a particular behaviour) which struck me as very effective mental constructs with which to approach any code, not just legacy code.

The second part of the book, Changing Software, consists of a set of scenarios in which you might find yourself when confronted with a codebase without tests; there are chapters such as 'My Application Has No Structure' and 'This Class is Too Big...' Use this part of Legacy Code when you have already characterised the situation you face, and want to go directly to a solution.

The third and final section, Dependency-Breaking Techniques, covers much of the same ground as part two, but from a different perspective: it is organised as a 'cookbook' of 'recipes', and the entries here together form a kind of toolbox for working with legacy code, allowing you to `dip in' to particular solutions without needing to have read the earlier sections.

Concluding Remarks

Some reviewers have noted that Legacy Code covers only those languages (C++, Java, C#, etc.) which have xUnit frameworks available, and can therefore be covered by unit tests; other 'testless', legacy code written in VB, Pascal, embedded C, COBOL, etc., is left 'out in the cold' by the book, as these languages generally cannot have unit tests retro-fitted. To my mind, this view somewhat misses the point. Feathers is clear to associate legacy code with an absence of tests, irrespective of the language.

To work effectively with legacy code, we need to bring it under test; other techniques do exist, but are likely to be unsafe and error-prone when compared to a test-driven approach.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


26 of 27 people found the following review helpful
4.0 out of 5 stars practical and helpful advice on testing, 26 Feb 2006
By A Customer
This review is from: Working Effectively with Legacy Code (Robert C. Martin) (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.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


8 of 9 people found the following review helpful
5.0 out of 5 stars Excellent!, 4 Dec 2009
By 
Anders Juul Larsen (Denmark) - See all my reviews
(REAL NAME)   
This review is from: Working Effectively with Legacy Code (Robert C. Martin) (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
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


1 of 1 people found the following review helpful
3.0 out of 5 stars Code sample formatting on Kindle edition, 25 Sep 2013
Verified Purchase(What is this?)
I would likely give this book a higher score if it weren't for the fact that the code samples contained in the e-book (and there are a lot of them) are so poorly formatted on the Kindle. I appreciate this is likely due to a limitation of the device but surely the publisher could have found a workaround (using images maybe?)
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


9 of 12 people found the following review helpful
5.0 out of 5 stars A very useful book, 20 Sep 2008
Verified Purchase(What is this?)
This review is from: Working Effectively with Legacy Code (Robert C. Martin) (Paperback)
The biggest single problem I had when I moved from working for myself as a programmer back to the mainstream was dealing with other people's code. For nearly twenty years I only had to deal with my own code. Suddenly I had to understand and change other people's code. It was quite a culture shock, and one of the most difficult things I've done.

I wish I'd found Michael's book earlier, it would have helped ease the transition. Of course, not everyone else's code is legacy code, but even if you are not handling true 'legacy' code, this book will help you deal with the problems you face.

The book is in three parts. The first is a discussion of how you go about changing software that is badly structured and has complex interactions and side effects. Where do you start, and how do you make sure that you don't break things further down the convoluted chain of dependencies. The answer to the latter, of course, is testing, testing, testing, and the author makes a good enough case to persuade even the most sloth like to get into the testing mode.

The second part of the book is organised almost like an FAQ with chapters devoted to common problems like 'I don't understand the code well enough to change it'. This one crops up all too often, and is an excellent example of how the author doesn't avoid difficult questions. The final part of the book is a useful catalog of mostly pattern based techniques that can be used to break dependencies.

The book is well written and features clear examples that are written in either C++, Java, C and C#, and the problems caused by the different features, or lack of them, available to the different languages are discussed and work arounds suggested. I enjoyed reading this book.

Highly recommended!
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


6 of 8 people found the following review helpful
3.0 out of 5 stars Good but limited, 8 Jun 2011
By 
It is essentially another refactoring book. It largely assumes you will work with code written fairly recently in a modern language and to which you can apply automated unit tests.

I deliver projects integrating disparate legacy systems, some of which are 30 years + old, written in Cobol, Assembler and other ancient technologies. Languages which were old when the author was still a high school kid. This book wont help you with this very real problem.

So, good for what it does, but if your software estate is ancient you are still on your own.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


5.0 out of 5 stars A good summary of techniques you might have used, 17 May 2014
Verified Purchase(What is this?)
This review is from: Working Effectively with Legacy Code (Robert C. Martin) (Paperback)
You probably have used most of these techniques here and there but you probably never approached them with the clarity this books provides. In other words, when you have a problem working with legacy code (who doesn't?) have a look at the relevant chapters and you will get techniques that you might have thought of or you might overlook and waste lots of time or compromise code quality. Great book.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


5.0 out of 5 stars Everyone who works as a maintenance developer should read this., 14 May 2014
Verified Purchase(What is this?)
...especially if you work in Java with code that is currently not covered by unit tests. This is the best argument for refactoring I've read, and a good guide to ways to safely refactor your code. If you work in support or maintenance programming, fixing bugs, you need this. If you're a blue-sky / green-field developer, writing brand new stuff, buy it too, especially if you're not yet convinced enough to do TDD. This hopefully should give you an idea of what your code is like to support, and give you the impetus to write better supportable code, properly covered by unit tests.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


3.0 out of 5 stars Some useful information., 24 Mar 2014
Verified Purchase(What is this?)
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.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


2 of 3 people found the following review helpful
5.0 out of 5 stars Standard Text, 20 Feb 2010
By 
O. Arnold (Herts United Kingdom) - See all my reviews
(REAL NAME)   
This review is from: Working Effectively with Legacy Code (Robert C. Martin) (Paperback)
I have a few (5 or so) programming books that I hold in very high regards. This is one of them. I intend to keep this one close to hand.

I've spent the last 4 months enhancing and bug-fixing a very old MFC application for a customer. I wish I'd read this book before I took the project on.

I thought that this book was very well planned out. I found it easy to read with excellent practical advice on working with legacy code. Each chapter in this book is golden and it's worth taking your time to absorb the advice presented. In fact, I thought that every page in the book was useful (this is rare in programming texts).

To get the most out of this book you should be familiar with GOF Design Patterns and Martin Fowler's Refactoring to Patterns.

My minor complaint about the book is that the examples could be better written to stress the mechanics of the strategies the author is explaining.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


‹ Previous | 1 2 | Next ›
Most Helpful First | Newest First

This product

Working Effectively with Legacy Code (Robert C. Martin)
Working Effectively with Legacy Code (Robert C. Martin) by Michael Feathers (Paperback - 22 Sep 2004)
33.84
In stock
Add to basket Add to wishlist
Only search this product's reviews