Refactoring–the art of improving the design of existing code—has taken the world by storm. So has Ruby. Now, for the first time, there’s a refactoring workbook designed from the ground up for the dynamic Ruby language.
Refactoring in Ruby gives you all the realistic, hands-on practice you need to refactor Ruby code quickly and effectively. You'll discover how to recognize "code smells," which signal opportunities for improvement, and then perfect your program’s design one small, safe step at a time.
The book shows you when and how to refactor with both legacy code and during new test-driven development, and walks you through real-world refactoring in detail. The workbook concludes with several applications designed to help practice refactoring in realistic domains, plus a handy code review checklist you'll refer to again and again. Along the way, you'll learn powerful lessons about designing higher quality Ruby software—lessons that will enable you to experience the joy of writing consistently great code.
Review By: Debra Martinez 11/05/2010When I first started reading this book, I noticed a few, unique things. First, it’s more of a workbook than a regular technology book. Second, a "cheat sheet" list of important facts and information to which you might need quick access are provided on the front- and back-inside covers. I just started using Ruby, so I learned a lot as I read along. There are a lot of examples of code in the book that are useful to a new user such as myself.
The writers of this book did a good job of presenting the information in a flowing manner and made it easy for anyone to use. Experienced and new users should gain a lot of information in this book. Don't feel that if you are new to Ruby that you won't understand the examples or what the author is talking about. Everything’s laid out in an easy-to-read format.
You will notice as you look through the different exercise in the book that the author has labeled each exercise as either challenging or something to consider which makes categorizing the exercises easy for new Ruby users.
My favorite part of the book is at the end of each lesson where the author offers the following points:
What to look for
Why this is a problem
When to leave it
How it got this way
What to do
What to look for next
These helpful hints make it easier for a new person or experienced person to move quickly through Ruby and make Ruby a helpful tool.
I wouldn't change a thing in this book and look forward to using this book throughout the years. I have even recommended it to my coworkers as a book to read and one you'll always return to as you work with Ruby.