Jump to ratings and reviews
Rate this book

Ruby Science

Rate this book
The reference for writing fantastic Rails applications

You build web applications, and you love Ruby on Rails because it provides a framework for developing applications that are are fast, fun, and easy to change. Over time these applications can become bloated, development slows down, and changes to the codebase become painful.

This book was written to help you learn to detect emerging problems in your codebase; we'll deliver the solutions for fixing them, and maintaining an application that will be fun to work on for years to come.

In addition to the book (in HTML, PDF, EPUB, and Kindle formats), you also get a complete example application, and the ability to get your questions about Ruby on Rails answered by the thoughtbot team.

The book is written using Markdown and pandoc and distributed via GitHub. When you purchase, we give you access directly to the repository, so you can use the GitHub comment and issue features to give us feedback about what we've written and what you'd like to see. Give us your toughest Ruby questions with GitHub issues, and we'll answer. Last but not least, also included is a Ruby on Rails reference application. What the book describes and explains, the example app demonstrates with real, working code. Fully up to date for Rails 3.2.

This book is a work in progress.
The book isn't finished yet, but that's the point! By getting involved now, you get access to updates as we make them as well as the ability to influence the content of the book.

227 pages, ebook

10 people are currently reading
161 people want to read

About the author

Thoughtbot

4 books4 followers

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
19 (26%)
4 stars
36 (49%)
3 stars
16 (21%)
2 stars
2 (2%)
1 star
0 (0%)
Displaying 1 - 9 of 9 reviews
Profile Image for Moski Doski.
19 reviews6 followers
January 6, 2015
Great book, it covered lots of design patterns that can be used in any ruby application.
Profile Image for Salva.
9 reviews
October 16, 2014
I liked it, it shows a lot of patterns to improve rails codebase ( some things can be useful for plain ruby, but it is centered in rails ). Some parts of the book are a bit difficult to follow and you can get lost, I miss a clearer structure.
Profile Image for Edham Arief.
25 reviews
January 3, 2017
A good reference especially if you've been doing Ruby on Rails for years. You can refer the book when doing code cleanups, reviews and refactoring.

Warning: The book is a bit hard to follow, the structure is a bit weird. You don't have to read it from front to back. Pick a subject you're interested in and just have a look.
Profile Image for Mehmet Davut.
35 reviews2 followers
February 10, 2024
It is like a nice collection of good blog posts. It can be useful to check its content by titles ehen you need them. However, it doesn’t add a value when you read like a book, because the story focuses much technical solutions than the problems. So you learn their solutions and may not get the points which will lead you to your own solutions.
Profile Image for shiva kumar.
16 reviews1 follower
October 10, 2020
Great book with all the best practices and SOLID principles explain with sample code .
Profile Image for Murilo Andrade.
43 reviews20 followers
September 1, 2014
Wow. What a great book for any rails developer, specially if you are constantly refactoring code in ruby

The authors behind well known ruby gems as paperclip, voltage, shoulda, factorygirl, etc. made a great work in writing this book.

The first part describes many of the most common code smells in ruby, as duplicated code, large class, large method, shotgun surgery, etc, with a brief way on how to approach these.

The second part details the solutions started on the first part: Replace Conditional with Polymorphism, replace conditional with null object, extract value object, extract validator. etc

The third party describes the most important principles when developing in ruby/rails. Law Of Demeter, DRY, Composition over inheritance, Open/Closed are always perfectly summarised.

The whole book is of course full of examples illustrating each of the chapters.

A must read.
Profile Image for MGC.
1 review
June 2, 2015
Very practical. Recommend for Ruby/Rails developers who haven't learn much about code refactor.
Profile Image for Adam Wan.
17 reviews2 followers
February 21, 2023
Still relevant even today. The proper name of the book should be refactoring ruby.
218 reviews30 followers
November 16, 2015
One star off for being a bit weirdly organized. Very informative, though.
Displaying 1 - 9 of 9 reviews

Can't find what you're looking for?

Get help and learn more about the design.