Jump to ratings and reviews
Rate this book

Refactoring in Ruby

Rate this book
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

263 pages, Paperback

First published January 1, 2009

3 people are currently reading
58 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
4 (15%)
4 stars
9 (34%)
3 stars
9 (34%)
2 stars
3 (11%)
1 star
1 (3%)
Displaying 1 - 2 of 2 reviews
421 reviews84 followers
March 28, 2012
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.
Profile Image for Anton Antonov.
356 reviews50 followers
July 26, 2024
Don't read such books, don't.

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.
Displaying 1 - 2 of 2 reviews

Can't find what you're looking for?

Get help and learn more about the design.