Description
The Definitive Refactoring Guide, Fully Revamped for Ruby
With refactoring, programmers can develop into even the most chaotic software into well-designed systems that are far easier to evolve and handle. What’s more, they may be able to 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 all the way through–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 the usage of them, and example code illustrating how they work. Among 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 beef up 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
• Be mindful 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 verify your refactorings work properly
• Be mindful the challenges of refactoring and how they may be able to 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 Be mindful and use
• Generalize more effectively
• Perform larger refactorings that develop into entire software systems and may take months or years
• Successfully refactor Ruby on Rails code