Working Effectively with Legacy Code (Robert C Martin)
Working Effectively with Legacy Code (Robert C Martin) by Michael Feathers
- Binding:
- Paperback
- Number of Pages:
- 456
- ISBN:
- 0131177052
- Product Group:
- book
- Publisher:
- Prentice Hall
- Publication Date:
- Oct. 7, 2004
- BooksForGeeks.com ID:
- 1069
Reviews for Working Effectively with Legacy Code (Robert C Martin)
-
Extremely useful!
Rated out of 5 stars, April 12st, 2010
This is definitely one of those books that I will continuously refer to when faced with the task of maintaining legacy software. It has a permanent place on my reference shelf! It provides an almost invaluable insight into some of the most common problems you encounter when you are trying to make changes to _any_ software that is without tests. A recommended read for all software developers, even if your primary language is PHP (like me). Most, if not all of the techniques described in this book are quite obviously tried and tested (yes 'tested' - ha ha) and seem more like the author's collection of useful techniques, however you must really put them into practise before you actually look and say, "wow". I've read this book twice now since I bought it and picked up a lot that I missed the first time around, for that I'm not sure if it is right to say that readability is possibly an issue. The value, however, is potentially priceless! -
Standard Text
Rated out of 5 stars, February 12th, 2010
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. -
Excellent!
Rated out of 5 stars, December 12th, 2009
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 -
A very useful book
Rated out of 5 stars, September 12th, 2008
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!
-
Excellent book
Rated out of 5 stars, May 12st, 2006
Got the book after attending one of the authors presentations. Excellent advice on how to apply TDD to existing code. Anyone involved in maintenance programming who wants to start using TDD within their project should give it a try.

