Jump to ratings and reviews
Rate this book

Ruby Best Practices: Increase Your Productivity - Write Better Code

Rate this book
How do you write truly elegant code with Ruby? Ruby Best Practices is for programmers who want to use Ruby as experienced Rubyists do. Written by the developer of the Ruby project Prawn, this concise book explains how to design beautiful APIs and domain-specific languages with Ruby, as well as how to work with functional programming ideas and techniques that can simplify your code and make you more productive. You'll learn how to write code that's readable, expressive, and much more.

Ruby Best Practices will help you:




Understand the secret powers unlocked by Ruby's code blocks Learn how to bend Ruby code without breaking it, such as mixing in modules on the fly Discover the ins and outs of testing and debugging, and how to design for testability Learn to write faster code by keeping things simple Develop strategies for text processing and file management, including regular expressions Understand how and why things can go wrong Reduce cultural barriers by leveraging Ruby's multilingual capabilities This book also offers you comprehensive chapters on driving code through tests, designing APIs, and project maintenance. Learn how to make the most of this rich, beautiful language with Ruby Best Practices.

325 pages, Paperback

First published January 1, 2009

11 people are currently reading
241 people want to read

About the author

Gregory T. Brown

2 books7 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
48 (28%)
4 stars
66 (39%)
3 stars
35 (20%)
2 stars
16 (9%)
1 star
3 (1%)
Displaying 1 - 15 of 15 reviews
421 reviews84 followers
January 26, 2012
Provides suggestions for writing clean, bug-free, and efficient code. Unfortunately, the book itself isn't so clean, bug-free, and efficient. I can overlook the typos. Some of the suggestions are useful, but most of it is pretty basic stuff you'll find in other Ruby books. The author likes to dump chunks of code from his own open source projects (he couldn't shut up about Prawn) that make your head hurt, and then not explain much of it. It's hard to make Ruby boring, but this book pulled it off.
Profile Image for Michael.
163 reviews74 followers
April 23, 2011
If you have already coded in Ruby for a while, you definitely should check out "Ruby Best Practices". As the title suggests this is not about learning Ruby, it's about getting the most out of the language, for yourself as well as for potential collaborators and colleagues. No matter how long you've been doing Ruby, I'm almost certain you'll still pick up a little trick here and there.
Profile Image for Євген Гінюк.
8 reviews1 follower
February 8, 2019
Useful information in general. But a lot of examples a not relevant in 2019. But it still have good advices for rubyists.
Profile Image for Paul.
169 reviews8 followers
February 15, 2013
It doesn't pretend to be encyclopedic in the manner of The Ruby Way. However, where sometimes I find The Ruby Way curtails topics just when they start to get interesting, Brown dives deep with Ruby Best Practices.

Clear examples are accompanied by thoughtful and full treatments of the subject at hand. It has particularly useful focus on "Mastering the Dynamic Toolkit", "Text Processing", "Functional Programming Techniques", and "Designing Beautiful APIs".

See "Two Ruby Books to Own" ... http://tardate.blogspot.com/2009/12/t...
37 reviews1 follower
September 26, 2012
Utter disappointment! I think the book got to be published just to grab a quick buck, while there was a huge ruby literature demand. It feels like almost no thought nor organisation was put into this publication. Some of the recommendations are actually now considered bad practices.

You are better off doing online research and reading blog posts than reading this book.
Profile Image for Óscar López.
162 reviews1 follower
November 19, 2016
A fine Ruby book. It's a bit outdated - it came out when v1.9 was all the rage, but it still provides lots of useful insights with real-world code samples taken from open source projects; it's impossible to read this book without picking a few new, good tricks along the way. I particularly enjoyed the chapters on metaprogramming and functional programming.
Profile Image for Stefan Kanev.
125 reviews235 followers
March 5, 2010
The second most sophisticated book about Ruby I've read (the first being Flanegan book). It focuses or real examples and covers a lot in depth. I wish it was available when I first started programming in Ruby.
Profile Image for Alex.
15 reviews4 followers
January 28, 2011
Really enjoying this. It might be the best technical book I've ever read. It's also really encouraging that coming back to this book after reading a few of the chapters online when the book came out, I understand the more challenging topics a lot better now.
Profile Image for Clinton.
15 reviews8 followers
October 19, 2009
Not bad - I learned some stuff, and I've been programming in Ruby for 4+ years.
Profile Image for Barry.
170 reviews3 followers
to-read-technical
March 18, 2010
Note: I actually have the PDF of this. OSBook FTW!
33 reviews
Read
April 14, 2014
Nice overview of many Ruby best practices clearly explained with real world examples.
15 reviews
March 9, 2016
It's really outdated. The book covers only Ruby 1.8.x and 1.9.x when we are on 2.2.x.
Displaying 1 - 15 of 15 reviews

Can't find what you're looking for?

Get help and learn more about the design.