WORKING EFFECTIVELY WITH LEGACY CODE MICHAEL FEATHERS PDF

adminComment(0)
    Contents:

software-development-ebooks/[Working Effectively with Legacy Code (Robert C. Martin Series) site Edition by Michael Feathers - ].pdf. Find file Copy. Working Effectively with Legacy Code. Michael C. Feathers. Prentice Hall Professional Technical Reference. Upper Saddle River, NJ www,phptr. com. This books (Working Effectively with Legacy Code [PDF]) Made by Michael Feathers About Books Get more out of your legacy systems: more.


Working Effectively With Legacy Code Michael Feathers Pdf

Author:GRETA PORTLOCK
Language:English, Indonesian, German
Country:Italy
Genre:Personal Growth
Pages:758
Published (Last):05.10.2015
ISBN:560-6-40291-770-1
ePub File Size:30.52 MB
PDF File Size:16.87 MB
Distribution:Free* [*Registration Required]
Downloads:23308
Uploaded by: SHELLY

Working with Legacy Code “When we change code, we should have tests in place. To put .. Legacy Code. Michael Feathers, Prentice Hall, 1 edition, From the Library of Brian Watterson Working Effectively with Legacy Code Michael C. Feathers PRENTICE HALL PTR Prentice Hall Professional Technical . Working Effectively with Legacy Code. Michael C. Feathers.\\\. PRENTICE. HALL . PTR. Prentice Hall Professional Technical Reference. Upper Saddle River, NJ.

There are methods I would have never thought about myself, without reading the book.

But what is even more important is that Feathers explains what precisely makes a code unit testable. You need to cut dependencies and introduce barriers into your code, but for two distinct reasons: sensing - in order to check and verify the effects of executing a piece of code, and separation - in order to get the specific piece of code into a test harness first of all. Cutting dependencies safely can be tricky. Introducing interfaces, mocks and Dependency Injection is clean and nice as a goal, just not necessarily safe to do at this point.

So sometimes we have to resort to subclassing the class under test in order to override some method which would normally e. To me, the most important concept brought in by Feathers is seams.

A seam is a place in the code where you can change the behaviour of your program without modifying the code itself. Building seams into your code enables separating the piece of code under test, but it also enables you to sense the behaviour of the code under test even when it is difficult or impossible to do directly e.

Customers who bought this item also bought

This knowledge allows you to notice the seeds of testability in the nastiest heap of code, and find the minimal, least disruptive, safest changes to get there. In other words, to avoid making "obvious" refactorings which have a risk of breaking the code without you noticing - because you don't yet have the unit tests to detect that. Code without tests is bad code. With tests, we can change the behavior of our code quickly and verifiably.

We then rely on developer and manual testing in order to find the defects. They help us localize problems. This increases the length of the feedback cycle.

See a Problem?

The point of unit tests is to shrink the length of this feedback cycle to the time it takes to do a build.

You build your code and the unit tests run every build giving you instant feedback on whether or not your change represented forward progress or backward progress. What are the implications of this approach to unit tests? They would be higher-level tests, often called functional tests or integration tests.

The coupling—to another class or an API—represents the dependency that makes it difficult to test the class. By breaking the dependency you can get the class to work in isolation and make it testable. Getting legacy code under test is the art and practice of identifying the points where you can break the dependencies of a class in order to get the class under unit tests.

Michael introduces the concept of a seam to identify points where you can insert layers to break apart the dependencies and get a test harness wrapped around the class. Part II: Changing Software is the meat of the book and gives practical strategies for getting legacy code under control of unit tests using the concepts introduced in Part I.The point of unit tests is to shrink the length of this feedback cycle to the time it takes to do a build.

Another is that sometimes you have to make code more ugly to get it under test. site Drive Cloud storage from site. Steve McConnell.

No notes for slide. Do you understand it?