Book description
The Definitive Refactoring Guide, Fully Revamped for Ruby
With refactoring, programmers can transform even the most chaotic software into well-designed systems that are far easier to evolve and maintain. What’s more, they can do it one step at a time, through a series of simple, proven steps. Now, there’s an authoritative and extensively updated version of Martin Fowler’s classic refactoring book that utilizes Ruby examples and idioms throughout–not code adapted from Java or any other environment.
The authors introduce a detailed catalog of more than 70 proven Ruby refactorings, with specific guidance on when to apply each of them, step-by-step instructions for using them, and example code illustrating how they work. Many of the authors’ refactorings use powerful Ruby-specific features, and all code samples are available for download.
Leveraging Fowler’s original concepts, the authors show how to perform refactoring in a controlled, efficient, incremental manner, so you methodically improve your code’s structure without introducing new bugs. Whatever your role in writing or maintaining Ruby code, this book will be an indispensable resource.
This book will help you
• Understand the core principles of refactoring and the reasons for doing it
• Recognize “bad smells” in your Ruby code
• Rework bad designs into well-designed code, one step at a time
• Build tests to make sure your refactorings work properly
• Understand the challenges of refactoring and how they can be overcome
• Compose methods to package code properly
• Move features between objects to place responsibilities where they fit best
• Organize data to make it easier to work with
• Simplify conditional expressions and make more effective use of polymorphism
• Create interfaces that are easier to understand and use
• Generalize more effectively
• Perform larger refactorings that transform entire software systems and may take months or years
• Successfully refactor Ruby on Rails code
Table of contents
- Title Page
- Copyright Page
- Contents
- Foreword
- Preface
- Acknowledgments
- About the Authors
- Chapter 1. Refactoring, a First Example
- Chapter 2. Principles in Refactoring
- Chapter 3. Bad Smells in Code
- Chapter 4. Building Tests
- Chapter 5. Toward a Catalog of Refactorings
- Chapter 6. Composing Methods
- Chapter 7. Moving Features Between Objects
- Chapter 8. Organizing Data
- Chapter 9. Simplifying Conditional Expressions
- Chapter 10. Making Method Calls Simpler
- Chapter 11. Dealing with Generalization
- Chapter 12. Big Refactorings
- Chapter 13. Putting It All Together
- References
- Index
Product information
- Title: Refactoring: Ruby Edition
- Author(s):
- Release date: October 2009
- Publisher(s): Addison-Wesley Professional
- ISBN: 9780321603968
You might also like
book
Polished Ruby Programming
Elevate your Ruby skills to an advanced level by deepening your understanding of the design principles, …
book
The Ruby Programming Language
The Ruby Programming Language is the authoritative guide to Ruby and provides comprehensive coverage of versions …
book
Ruby on Rails Tutorial, 6th Edition
“Ruby on Rails™ Tutorial by Michael Hartl has become a must-read for developers learning how to …
video
Ruby on Rails Tutorial, 6th Edition
20 Hours of Video Instruction is the best-selling complete video training course on web development with …