ANN: Working Effectively with Legacy Code
From: Michael Feathers (mfeathers_at_objectmentorNOSPAM.com)
Date: 10/21/04
- Next message: Phlip: "Re: OO Design, Physical Implementation, DAOs"
- Previous message: oj: "Re: OO Design, Physical Implementation, DAOs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 21 Oct 2004 19:04:28 GMT
Just a note for those you who may not have heard: my book _Working
Effectively with Legacy Code_ was released recently.
In a way, it is sort of like a prequel to Martin Fowler's Refactoring
book. The book contains a set of strategies you can use to understand
tangled OO and procedural code, get it under test, add to it without
mucking it up, and decide on more appropriate designs in light of
what is there. A large part of the book is FAQ-ish with chapters
named after common problems. It ends up with a set of dependency
breaking techniques you can use to help get your code under test.
The Amazon page is here:
http://www.amazon.com/exec/obidos/tg/detail/-/0131177052
but I also have a link to a sample chapter here
called: 'I Can't Get This Class into a Test Harness.'
http://www.objectmentor.com/resources/bookstore/books/welc/
I'll be having a 'Birds of a Feather' session at OOPSLA next week. The
evening isn't set yet, but if you are going to OOPSLA and you are
interested, check the BOF sign-up board there, or shoot me an email.
Here's the Table of Contents:
Preface.
Introduction.
*I. THE MECHANICS OF CHANGE.*
1. Changing Software.
2. Working with Feedback.
3. Sensing and Separation.
4. The Seam Model.
5. Tools.
*II. CHANGING SOFTWARE.*
6. I Don't Have Much Time and I Have To Change It.
7. It Takes Forever To Make a Change.
8. How Do I Add a Feature?
9. I Can't Get This Class into a Test Harness.
10. I Can't Run This Method in a Test Harness.
11. I Need to Make a Change. What Methods Should I Test?
12. I Need to Make Many Changes In One Area Do I Have To Break.
13. I Need To Make a Change but I Don't Know What Tests To Write.
14. Dependencies on Libraries Are Killing Me.
15. My Application Is All API Calls.
16. I Don't Understand the Code Well Enough To Change It.
17. My Application Has No Structure.
18. My Test Code Is in the Way.
19. My Project Is Not Object-Oriented. How Do I Make Safe Changes?
20. This Class Is Too Big and I Don't Want It to Get Any Bigger.
21. I'm Changing The Same Code All Over the Place.
22. I Need To Change a Monster Method and I Can't Write Tests for It.
23. How Do I Know That I'm Not Breaking Anything?
24. We Feel Overwhelmed. It Isn't Going To Get Any Better.
*III. DEPENDENCY BREAKING TECHNIQUES.*
25. Dependency Breaking Techniques.
Adapt Parameter
Break Out Method Object
Definition Completion
Encapsulate Global References
Expose Static Method
Extract and Override Call
Extract and Override Factory Method
Extract and Override Getter
Extract Implementer
Extract Interface
Introduce Instance Delegator
Introduce Static Setter
Link Substitution
Parameterize Constructor
Parameterize Method
Primitivize Parameter
Pull Up Feature
Push Down Dependency
Replace Function with Function Pointer
Replace Global Reference with Getter
Subclass and Override Method
Supersede Instance Variable
Template Redefinition
Text Redefinition
Appendix: Refactoring.
Glossary.
-- Michael Feathers author, Working Effectively with Legacy Code (Prentice Hall 2005) www.objectmentor.com www.michaelfeathers.com
- Next message: Phlip: "Re: OO Design, Physical Implementation, DAOs"
- Previous message: oj: "Re: OO Design, Physical Implementation, DAOs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]