Book description
As a programmer, you need to be able to recognize and improve problematic code, so the program remains in a working state throughout the software lifecycle. Refactoring-the art of improving the design of existing code safely-provides an efficient, reliable system for bringing order to the chaos, and one that keeps the surprises to a minimum! Refactoring can be difficult to learn, but Refactoring Workbook, by consultant William C. Wake, presents the material in a easy-learning format that makes learning enjoyable and effective.
For many, the obstacle to learning refactoring is in identifying the "smells"—the potential problem areas-found in code. Instead of having you read about the smells, Refactoring Workbook makes sure you understand them. You'll solve a carefully assembled series of problems, and you'll find yourself learning at a deeper level and arriving at a few insights of your own. Wake uses the workbook method—a learning-focused approach that forces you to apply the techniques presented in the book-in the rest of the book. This approach helps you learn and apply the most important refactoring techniques to your code and, as a side benefit, helps you to think more about creating great code even when you're not refactoring.
Refactoring Workbook provides user-friendly references such as:
A handy, quick-reference "smell finder"
A standard format for describing smells
Appendices showing key refactorings
A listing of Java™ tools that support refactoring
This book is intended for programmers with a knowledge of Java, though a C# or C++ programmer with a basic understanding of Java would also be able to follow and learn from the examples. It can be used as a companion to Martin Fowler's Refactoring (also from Addison-Wesley Professional), which provides step-by-step instructions for many refactorings.
Table of contents
- Copyright
- Preface
- 1. Roadmap
-
1. Smells Within Classes
-
2. The Refactoring Cycle
- What Is Refactoring?
- Smells Are Problems
- The Refactoring Cycle
- When Are We Done?
-
Inside a Refactoring
- Step 1: Create getter and setter methods.
- Step 2: Find all clients; replace references with calls. Do this one at a time.
- Step 3: Compile and test.
- Step 2: Replace the other reference.
- Step 3: Compile and test.
- Step 4: Once all clients are changed, make the field private.
- Step 5: Compile and test one last time.
- Challenges
- Conclusion
- 3. Measured Smells
- 1. Smells and Refactorings
- 4. Names
- 5. Unnecessary Complexity
- 2. Inverses
- 6. Duplication
- 7. Conditional Logic
- 3. Design Patterns
-
2. The Refactoring Cycle
-
2. Smells Between Classes
- 8. Data
- 9. Inheritance
- 10. Responsibility
- 11. Accommodating Change
- 12. Library Classes
- 4. Gen-A-Refactoring
- 3. Programs to Refactor
-
4. Appendixes
-
A. Answers to Selected Questions
- Chapter 2. The Refactoring Cycle
- Chapter 3. Measured Smells
- Interlude 1. Smells and Refactorings
- Chapter 4. Names
- Chapter 5. Unnecessary Complexity
- Chapter 6. Duplication
- Chapter 7. Conditional Logic
- Interlude 3. Design Patterns
- Chapter 8. Data
- Chapter 9. Inheritance
- Chapter 10. Responsibility
- Chapter 11. Accommodating Change
- Chapter 12. Library Classes
- Interlude 4. Gen-A-Refactoring
- Chapter 13. A Database Example
- Chapter 14. A Simple Game
- Chapter 15. Catalog
- Chapter 16. Planning Game
- B. Java Refactoring Tools
- C. Inverses for Refactorings
- D. Key Refactorings
-
A. Answers to Selected Questions
- Bibliography
Product information
- Title: Refactoring Workbook
- Author(s):
- Release date: August 2003
- Publisher(s): Addison-Wesley Professional
- ISBN: 0321109295
You might also like
video
Pyramid of Refactoring (Java) - Clean Code Gradually
This course is the first module of the Pyramid of Refactoring series dedicated to achieving clean …
book
Refactoring to Patterns
In 1994, Design Patterns changed the landscape of object-oriented development by introducing classic solutions to recurring …
book
UML for Mere Mortals®
"There are many books that shine light on the darkest corners of the UML, but Eric …
book
Refactoring for Software Design Smells
Awareness of design smells – indicators of common design problems – helps developers or software engineers …