The Well-Grounded Rubyist
by David Black
Refactoring: Ruby Edition
by Jay Fields; Shane Harvie; Martin Fowler; Kent Beck
Rocket Surgery Made Easy: The Do-It-Yourself Guide to Finding and Fixing Usability Problems
by Steve Krug
Essential ActionScript 3.0, 1st Edition
by Colin Moock
Building a Web Site For Dummies®, 3rd Edition
by David A. Crowder
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.
Average Amazon.com® Rating: ![]()
![]()
![]()
![]()
Based on 7 Ratings
Below average - 2009-09-23
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
Most of the concepts are already covered by other Ruby books. I did learn a few things from this book. The examples in this book have too much baggage. The focus should have been in illustrating the best practice instead of obsessing about code from real projects. Ideally illustration with simple examples that introduces the concept followed by real world code example would have better for the readers.
The author's opinion about functional programming is not correct. For instance higher-order procedures in Ruby are useful in real projects for certain problems. I am surprised by the poor technical review / edit by a publisher like OReilly and the author is not to be blamed for technical correctness. The rating takes a hit due to this because the product is a reflection of the work of the publisher and the author.
The author states "However, judging when it's the right time to bust out some functional goodness rather than going with the more vanilla approach can be difficult, even among seasoned developers. It is entirely possible to make your code too clever, and this often has real penalties in performance or in the ability of other developers to easily learn your code."
There are certain guidelines that can be used to decide whether functional programming techniques is a better fit to solve the problem at hand. Unfortunately it is not covered in this book. Just search for higher order procedures in Ruby and read the presentation / blog by Nate Murray. He has taken the higher order procedure examples based on Lisp and converted them to Ruby. At the end of his presentation you will see some practical examples related to this topic.
Intermediate-to-expert Ruby programmers should absolutely read this book - 2009-08-03
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
In Summary:
If you are an intermediate-to-expert Ruby programmer you should absolutely read this book. Beginners may want to start elsewhere and work their way up. Where To Get It
In Detail:
The purpose of RBP is stated plainly on the front cover: "Increase Your Productivity -- Write Better Code"
With that in mind, here is a breakdown of what it offers:
The first thing I noticed when reading RBP is that it uses real-world code samples. None of that "let's make a tic-tac-toe game" type of stuff. Gregory uses a couple of his own projects (Prawn & Ruport) as well as other popular libraries (Haml, flexmock, XML Builder, Gibberish, faker). This is beyond awesome.
He also steps through a lot of code using IRB, which means you can follow right along in your favorite shell. Gregory highly recommends you get your hands dirty with the code he presents and I agree with him. However, I also like to read physical books in places not my computer, since the opportunity so rarely presents itself.
The book starts, aptly, with a chapter on testing. The following two chapters are (for me) the highlights:
Designing Beautiful APIs and Mastering the Dynamic Toolkit.
The value found in these two sections alone cover the cost of the entire book. A few of the topics discussed include: flexible argument handling, code blocks, implementing per-object behavior, building classes and modules programatically and registering hooks and callbacks. Gregory released a free section of Mastering the Dynamic Toolkit so you don't have to take my word for it, have a taste for yourself.
I need to wrap this up or I'll be forced to remove the "Mini" from the post title. You'll also find sections on File & Text processing, functional programming, debugging, project maintenance (much of which is obsolete if you use the wonderful Jeweler gem), and internationalization.
Tips, tricks and suggestions abound. Even expert-level Rubyists should learn something. RBP left me wanting more of Gregory's teaching. He really does a good job of explaining concepts and walking through code. Thankfully, he started up a Ruby Best Practices blog with more content!
A Must-Have for the Serious Rubyist - 2009-09-25
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
If you're coming here to expect a cookbook you needn't bother. What you'll find instead, is a thoughtful guide to the gestalt of Ruby development. This book digs deeper than a book like "The Ruby Cookbook" because it gets to the underlying principles that guide good Rubyists. This book fills a big void in the are of Ruby books. Other books will tell you how to get something done, this one will explain why to do it a certain way.
No fluff, solid-to-the-core, key information for Ruby programmers - 2009-09-24
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
I'm greatly impressed by this book. I've looked through perhaps two-dozen Ruby books, and with few exceptions they trot out clumsy, contrived examples that not only do a poor job of explaining syntax, but fail to demonstrate better Ruby practices.
Ruby Best Practices excels where these other books fail. It uses honest-to-gosh, real-world code, and thoughtfully explains the reasoning for coding a solution in a particular way.
It explains the choices one may have to make, the possible trade-offs, and leaves you with enough information to start applying these ideas to your own code.
No style of presentation will please everyone, and if you are looking for terse, superficial examples that do not fully demonstrate the real-world how's and why's of a particular approach you will be disappointed. This book requires that you read along, and *think* along, as code is presented and solutions reasoned out. You will, however, be a better Ruby hacker as a result of it.
Excellent Intermediate Ruby Book - 2010-02-06
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
As I was managing a Python to Ruby conversion, Ruby Best Practices was just about the best book I picked up to get over the initial hurdle. Most books waste too much time on basics that anyone who's worth their chops should be able to pick up without much difficulty. Ruby Best Practices was the perfect intermediate point between telling me what a class is and focusing too much on metaprogramming fu that I'll never need.
The code samples are some of the best that I've ever seen in a technical book and the overall focus was perfect for getting from simple code to elegantly constructed Ruby.
Ruby Best Practices quickly became one of my favorite technical books.
Top Level Categories:
Internet/Online
Programming
Sub-Categories:
Internet/Online > Web Development
Programming > Ruby
Some information on this page was provided using data from Amazon.com®. View at Amazon >