The First Hands-On, Practical, All-Ruby Refactoring Workbook! 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. Refactoring in Ruby will help you
A refactoring workbook for Ruby. It assumes you know Ruby and its libraries fairly well, and that you've read Refactoring: Ruby Edition. Rather than focus on the refactorings, this book focuses on the "smells" that indicate the need for those refactorings. The idea is that refactoring itself is fairly straightforward, while identifying the smells is what takes practice. This book is designed to give that practice.
It's a hands-on workbook, with lots of exercises to challenge your "smell-finding skills." However, these exercises are not worded very well and are often of the "guess what I'm thinking about" variety that is so common for poorly-conveived quizzes. I didn't find the exercises worth spending much time on, but I did get a little better at identifying smells by thinking about them.
It's a Ruby workbook that teaches you the author's idea of refactoring. There are much better resources that focus on the actual principles of refactoring.
If you're stuck in a code monkey approach where you need to pattern match code with your eyes, apply a refactoring principle that you memorized, sure. This book is good for you.
Read Martin Fowler's refactoring book if you want to learn to think and analyze what refactoring is and its outcomes.
Regardless, experience shows refactoring small pieces of code rarely solves any problems. Addressing issues architecturally and bad data flows is the best return of investment.