Working Effectively with Legacy Code 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Frequently bought together
Customers who viewed this item also viewed
From the Publisher
|A Handbook of Agile Software Craftsmanship||Practical Advice for the Professional Programmer||A Craftsman's Guide to Software Structure and Design||Professionalism, Pragmatism, Pride||Get Better Performance Out of Your Legacy Systems|
|Title||Clean Code||Clean Coder||Clean Architecture||The Software Craftsman||Working Effectively with Legacy Code|
|Core Concept||Best agile practices of cleaning code “on the fly” that will instill within you the values of a software craftsman and make you a better programmer—but only if you work at it.||Robert C. Martin introduces the disciplines, techniques, tools, and practices of true software craftsmanship. This book is packed with practical advice–about everything from estimating and coding to refactoring and testing.||Uncle Bob presents the universal rules of software architecture that will help you dramatically improve developer productivity throughout the life of any software system.||Sandro Mancuso helped found the world’s largest organization of software craftsmen; now, he shares what he’s learned through inspiring examples and pragmatic advice you can use in your company, your projects, and your career.||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. Michael Feathers offers start-to-finish strategies for working more effectively with large, untested legacy code bases.|
|Endoresement||"It is the best pragmatic application of Lean principles to software I have ever seen in print." —James O. Coplien, Founder of the Pasteur Organizational Patterns project||“Some technical books inspire and teach; some delight and amuse. Rarely does a technical book do all four of these things. Read, learn, and live the lessons in this book and you can accurately call yourself a software professional.” —George Bullock Senior Program Manager Microsoft Corp.||"A good architecture comes from understanding it more as a journey than as a destination, more as an ongoing process of enquiry than as a frozen artifact." -- Kevlin Henney||"If you are the type of programmer, team lead, or manager who craves to be able to go home after a long day of work, look in the mirror, and say, 'Damn, I did a good job today!' then this is the book for you." -- Robert C. Martin||"This book describes a set of disciplines, concepts, and attitudes that you will carry with you for the rest of your career and that will help you to turn systems that gradually degrade into systems that gradually improve." --- Robert C. Martin|
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 platformwith 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.
There was a problem filtering reviews right now. Please try again later.
The only flaw in this book is: It doesn't go far enough. I've now been working for 1+yr with a 20+yr old C++ code base (that's still responsible for over $1B revenue a year, runs on over 1500 servers, handles well over 100000 requests/min in total). I read this book in the first couple of weeks and thought "yeah, ok, but things can't possibly be that bad".
Well, now I know better. They're worse.
This book can help you _a lot_ with the technical aspects of working with legacy code - but some things (esp. long-standing company processes) just can't be fixed by mortal man. So you need a good attitude (including a good sense of humor) as well. Working with good colleagues also helps. But definitely read this book and use its lessons in practice.
“Code without tests is bad code. It doesn’t matter how well-written it is; it doesn’t matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior of our code quickly and verifiably. Without them, we really don’t know if our code is getting better or worse.”
This book goes on to inform you exactly how you can refactor that code, get those tests in place, and move forward knowing you have established some standard of quality and a metric for change. You'll sleep so much better once you get there, but be warned: it won't happen overnight.
Is your code a tangled mess? Are you tired of seeing telescoping methods and methods that are 100s of lines long? Want to clean up code you didn't write and get it under test but everyone's too afraid of breaking things? Does it take you forever to write unit tests? Is it painstaking and laborious? Do you write mainly integration tests because unit testing is too hard? Do you wonder how people can write lots of unit tests, let alone unit test every method? Do you want to kick your object oriented coding skills up a notch? Then this book is for you. It can teach you how to overcome all of those obstacles and so much more.
For me the first roughly 100 pages of the book were a revelation. If you don't understand how to do TDD the problem probably isn't testing, it's probably the code you're trying to test or your perceptions about what it is that you are actually supposed to be testing. Michael Feathers does a great job identifying the mistakes and traps that so many developers experience when trying write and test good code and provides recipes for overcoming them. He adds clarity to what a unit test is and what it's supposed to do and in the process takes a deep dive into what good object oriented code looks like through the eyes of TDD. The book can completely change your perception about what is and is not possible.
In addition to turning your perceptions about testing on their head, Feathers also provides good advice on how to create loosely coupled code, how to identify and eliminate dependencies in existing code as well as strategies for reorganizing poorly structured code into better objects. This book has clearly changed the way I code and the way I think about testing for the better. 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 next level.
I can't say enough great things about this book. It's dearer to me than any other book in my programming collection including books about object oriented code from Bloch, Beck, Fowler and others. It wasn't until I read Working Effectively with Legacy Code that things really came together for me in the object oriented world. I got the concepts individually but failed to recognize how it all comes together. What's so great about encapsulation / getters and setter? Why is it so important to have classes and methods that do just one thing? What's so important about breaking dependencies between classes? How small is a small method? How can I ever hope to achieve open/closed? How is TDD even possible? Your mileage may vary, but if you're like me this book will change your life for the better.
Feathers covers the topics of why, and how to deal with code that is difficult to change with a variety of useful patterns. Most useful of these is the legacy code change algorithm:
1. identify the change points
2. find test points
3. break dependencies
4. write tests
5. make changes and refactor
This book will make you a better developer.
Now, the only downside of this book is that the examples covering several different languages can sometimes obscure the teaching of the narrative. Perhaps in a future edition it would be nice to see a single language (or a couple) and have extra resources available in the electronic versions or websites to cover other languages. To me, this did not represent something worth dropping this from a 5 star review. I gave my physical copy away long ago and repurchased a second copy on the kindle.
Top international reviews
Existem trechos com palavras faltando, existem trechos com parágrafos inteiros faltando.
E se não bastasse, ao ler outros reviews na Amazon americana, descobri que tais problemas persistem há anos (desde 2011, no mínimo).
Isso é ridículo.
Entgegen anderer Kommentare würde ich aber nicht sagen, dass dieses Buch ins Studium gehört. Ich denke es ist nicht Mal für Junior Entwickler geeignet.
Wer dieses Buch wirklich verstehen will, muss schon ein paar Jährchen Software entwickelt haben. Solche Leute werden sich aber direkt angesprochen fühlen und endlich praktische Antworten finden auf die Alltagsprobleme eines Software Entwicklers.
Super Lektüre über das Henne-Ei-Problem des Refactorings (kein Change ohne Test, Tests unmöglich ohne Changes), extrem praktisch und frei vom erhobenen Zeigefinger der Theorie.
Il fatto e' che se sviluppate da 15-20 anni e ve ne siete posti di domande su come modificare il codice esistente (e usate TDD), e' probabile che diventi un po' noioso perche' e' probabile conosciate gia' tutti i pattern indicati.
Incluye todo lo necesario para que puedas hacer funcionar tu proyecto heredado.
Con ejemplos en C, C++, C# y Java, vas a poder enfrentarte a lo desconocido: tratar con lo que otro hizo y que te toca ahora lidiar.
La lectura puede no ser lineal, pero aún así, es absolutamente recomendable incluso leyendo capítulos sueltos.
Si estuviera en español, sería EL LIBRO que todo programador que va a trabajar en una empresa de software necesita.
Feathers' thesis, subsequently elaborated in several lectures available on YouTube, is powerful: when one has difficulty writing automated tests for a codebase, it is an indication that the codebase itself is not well-factored.
Quite often, I have heard developers complain how difficult it is to write tests for a piece of code, and then use that as an excuse to avoid writing the tests. Feathers gives us another way of seeing this situation: the characteristics that make code testable are themselves characteristics of good code. Testability requires composability, reusability, etc., so problems encountered writing tests very often come from a design flaw in the code itself.
Thankfully, this book doesn't leave us hanging at "my code is horrible because it's hard to test." Instead, most of the book is filled with realistic examples that demonstrate patterns for refactoring code to bring it under test. The examples are simple and easy to follow. They're also quite on-point: I recall reading many of them and thinking "yep, I hate it when I have that problem."
Though each example is approached from the perspective of someone trying to solve a specific testability issue, the refactoring techniques taught by the examples are applicable to more situations than merely getting code under test. In this book, Feathers isn't just teaching how to get a piece of code under test, he is teaching how to take a piece of code and incrementally move it towards a better design that actually does what you need it to do.
This book describes common, real-world problems and shows simple solutions to those problems. The examples feel concrete and familiar, not contrived like the examples in so many design patterns books. It is written in clear, accessible language, and is not boring to read. I believe that this book will make anyone who reads it a better programmer.