3 of 3 people found the following review helpful
Rubyists that want to learn how to write code like the experts should read this,
This review is from: Ruby Best Practices (Paperback)
After learning the basics of Ruby and feeling at ease with the language, it's time to take it to the next level. It's time to start writing code like the experts: the Ruby way. Ruby Best Practices is just the book to help you do that, with a friendly tone and lots of yummy code examples for you to chew on and learn.
Ruby Best Practices was written by Gregory T. Brown and comes at 298 pages. The subtitle "Increase Your Productivity - Write better Code" pretty much sums what the book is about: taking your Ruby skills to the next level by learning how to write code like the experts, thus increasing your productivity.
The book covers a lot of topics such as (but not limited to): designing beautiful APIs, testing and debugging your code, taking advantage of Ruby's dynamic features, and how to maintain your projects.
Real Examples. The code examples use throughout the book were extracted from actual open source projects. This is really great because you get to see how other people are actually solving problems, rather than just theoretical and abstract examples.
Practice Code Reading Skills. Each chapter starts off with some sample code taken from an open source project, which you may not understand at first. This is a good exercise at reading other people's code, which is essential to becoming a better programmer. Once you get a grasp of the problem, Gregory Brown then goes into more detail and explains various techniques that can be used to solve that problem.
Nice read. I enjoyed the way the book was written. Gregory Brown writes in an easy-to-understand way, with a friendly "voice" which makes you feel like he is in the trenches with you. Another thing I appreciated was that each chapter ended with a few bullet points summarizing the covered topics and offers some advice on when you might want to use some of them. (Check Tip #2 to make the most out of the examples).
There's not much I didn't like about this book, only a few nitpicks really.
Lost interest when I got to Chapter 7. Although this is not the book's fault, rather it was me that wasn't really interested in that chapter ("Reducing Cultural Barriers") to begin with. I just read it half way and then jumped to the next chapter which renewed my interest. (Check Tip #1 to avoid this).
Long examples with a lot of baggage. The examples presented in the book, namely the ones at the beginning of each chapter, are sometimes long and need a bit of context. I actually think this is good, but some might not like it. What it comes down to is: this is not a cookbook for copy-and-pasting solutions straight into your project. The book tries to show you the many tools Ruby gives you to solve your problems, which you then have to transpose into your project and think about it.
Here are a few reading tips that will help you make the most out of the RBP Book:
Read the most interesting chapters first. Each chapter is fairly self-contained so read the chapters in any order. This way you won't rush through reading Chapter 1 just to get to Chapter 2, for example.
Reread the code examples. Once you've finished reading a chapter, before proceeding to the next, go back and reread the initial example that got you started. Make sure you now fully understand it.
Read your book next to the computer. Take your time reading each chapter and pause often to actually try out the new concepts you've learnt. And most importantly, play with the code, have fun!
If you're really interested in honing your Ruby coding skills, then this book is for you. It will show you how "real" Ruby code is written, what techniques you have at your disposal while tackling those hard-to-solve problems, and at the same time practice your code reading skills.
Even though the book is being open sourced, I still think you should support the hard work of a fellow programmer and buy a hardcopy. Personally, I prefer holding a book in my hand while reading, then again, I might be a bit "old-fashioned" that way. Plus, if you buy it then you're showing O'Reilly that it's worth open sourcing their books.