Ruby Best Practices and over 900,000 other books are available for Amazon Kindle . Learn more


or
Sign in to turn on 1-Click ordering.
or
Amazon Prime free trial required. Sign up when you check out. Learn more
More Buying Choices
Have one to sell? Sell yours here
or
Get a £5.85 Amazon.co.uk Gift Card
Ruby Best Practices
 
 
Start reading Ruby Best Practices on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Ruby Best Practices [Paperback]

Gregory T Brown
4.5 out of 5 stars  See all reviews (2 customer reviews)
RRP: £26.99
Price: £22.94 & this item Delivered FREE in the UK with Super Saver Delivery. See details and conditions
You Save: £4.05 (15%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In stock.
Dispatched from and sold by Amazon.co.uk. Gift-wrap available.
Only 2 left in stock--order soon (more on the way).
Want guaranteed delivery by Friday, February 24? Choose Express delivery at checkout. See Details

Formats

Amazon Price New from Used from
Kindle Edition £14.59  
Paperback £22.94  
Amazon.co.uk Trade-In Store
Did you know you can trade in your old books for an Amazon.co.uk Gift Card to spend on the things you want? Visit the Amazon.co.uk Trade-In Store for more details.

Frequently Bought Together

Ruby Best Practices + Metaprogramming Ruby: Program Like the Ruby Pros (Facets of Ruby) + Design Patterns in Ruby (Addison-Wesley Professional Ruby)
Price For All Three: £71.44

Show availability and delivery details

Buy the selected items together


Product details

  • Paperback: 336 pages
  • Publisher: O'Reilly Media; 1 edition (23 Jun 2009)
  • Language English
  • ISBN-10: 0596523009
  • ISBN-13: 978-0596523008
  • Product Dimensions: 23.1 x 17.8 x 2 cm
  • Average Customer Review: 4.5 out of 5 stars  See all reviews (2 customer reviews)
  • Amazon Bestsellers Rank: 435,335 in Books (See Top 100 in Books)
  • See Complete Table of Contents

More About the Author

Gregory T. Brown
Discover books, learn about writers, and more.

Visit Amazon's Gregory T. Brown Page

Product Description

Book Description

Increase Your Productivity - Write Better Code

Product Description

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.


Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(1)

Your tags: Add your first tag
 

What Other Items Do Customers Buy After Viewing This Item?


 

Customer Reviews

2 Reviews
5 star:
 (1)
4 star:
 (1)
3 star:    (0)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.5 out of 5 stars (2 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

2 of 2 people found the following review helpful:
5.0 out of 5 stars Beats the free PDF version, 28 Mar 2010
By 
G. Lazu (London, UK) - See all my reviews
(REAL NAME)   
This review is from: Ruby Best Practices (Paperback)
Even though the PDF is now available free online, having the print version is worth it. Gregory gives some really sweet tips and tricks in the book, it's very handy for Ruby developers that want to go past introductory, superficial explanations. Very happy with the purchase!
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


2 of 2 people found the following review helpful:
4.0 out of 5 stars Very good, 25 Jun 2009
By 
Mr. S. Reed (London, England) - See all my reviews
(REAL NAME)   
This review is from: Ruby Best Practices (Paperback)
Purchased RBP on ebook and paper formats and i've been glued to it ever since. Whilst some of the subjects may not be new to you they go on to explain power parts of Ruby which at first are not clear.

Very good intermediate Ruby book and you don't have to heave a massive book around with you!
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com: 4.3 out of 5 stars (14 customer reviews)

18 of 18 people found the following review helpful:
5.0 out of 5 stars Excellent., 6 July 2009
By Benjamin Orenstein - Published on Amazon.com
This review is from: Ruby Best Practices (Paperback)
One of my favorite simple pleasures is reading a technical or instructional book where the level of complexity perfectly matches my expertise. I've been enjoying this exact experience while reading Greg Brown's new book, Ruby Best Practices.

I have been programming professionally for over three years, with the last five months doing full time Ruby on Rails development. I would label myself an intermediate Ruby user: comfortable with the basics, but with limited exposure to its more advanced topics. Lately, I have been reading more and more open source Ruby projects, and have been looking for ways to contribute back to our teriffic community.

Given my experience and goals, Ruby Best Practices was a perfect read. The book is a collection of general strategies for solving problems in Ruby, with a focus on real-world code examples. Its author is an experienced Ruby developer who also happens to be an excellent writer.

Ruby Best Practices has a number of notable strengths. First, Brown is highly pragmatic. When discussing closures, he writes "I could show some abstract examples or academically exciting functionality such as Proc#curry, but instead, I decided that I wanted to show you something I use fairly frequently." This attitude has lead to a book that is full of ideas you can actually use. It feels like the experienced guy down the hall showing you all his best stuff.

Secondly, RBP's examples are almost uniformly excellent. As contributor or creator of several popular Ruby projects (Prawn and Ruport) Brown has no lack of real-word code examples to choose from, and he does so with skill. In addition, he's not shy about trimming down the examples to leave behind just the most relevant code elements. These two factors combine to produce code listings which are indicative of real open-source programs while remaining quite comprehensible. Not only are Brown's examples excellent, but they are plentiful. Nearly every new idea he introduces is demonstrated through a case study of real (or plausibly real) code. Working through this book will definitely sharpen your code-reading skills.

Beyond simply being clear, Brown's writing is also fun to read. His enthusiasm for the subject matter is obvious: "I could stop here and move on to the next topic, but similar to when we looked into the belly of lazy.rb earlier in this chapter, I can't resist walking through and explaining some cool code." This sort enthusiasm continues throughout, and leads to a technical book that I'm tempted to call a page-turner. Making my way through the book really excited me to read and work on open-source projects.

If you're still on the fence, take a read through the sample chapter, Mastering the Dynamic Toolkit (available through O'Reilly or the book's blog). If you like what you see, don't hesitate to pick up a copy of this excellent book.

13 of 14 people found the following review helpful:
5.0 out of 5 stars Very Unique Ruby Book. A Challenging Teaching Tool., 25 Jun 2009
By Dylan Clendenin - Published on Amazon.com
This review is from: Ruby Best Practices (Paperback)
Ruby Best Practices (RBP) by Gregory Brown is unlike any previous book on Ruby written yet. This is not a book of commandments, recipes, design patterns, or style guides. Rather this is a book that is designed to help intermediate Ruby programmers learn how to think about writing and analyzing software.

If RBP had a biggest strength it would be its case-study approach of looking at real-world Ruby software as the context for best practices. It is not a theoretical or hypothetical book but very practical. One of the premises of RBP is that best practices have a context--a time and place--and aren't just rules we slap across everything indiscriminately. It is meant to spur dialogue and provoke thought. It will help give you a new set of eyes as you read through Ruby source code (which brings up another premise of RBP--you should be learning by looking through the source code of real projects).

If RBP had a biggest weakness, it would be that it was written by one guy with help from a few others and it is limited to their observations and experience. Not everything is covered nor can it be. Somebody will complain that it is not complete but Gregory has sort of preserved himself from that sort of fault-finding by presenting this more as a "one side of the diamond" than a "here are the best practices, follow them" approach.

I think that RBP is important for the Ruby community not because it contains the solutions to everyone's problems but more because it can serve as a great launching point for important discussions that will help us to think through the Ruby software we write and how to glean from the outstanding solutions other Rubyists smarter than ourselves have come up with.

I like the way this book is organized for the most part. The chapters are topical and focused and can be read in any order according to what is most interesting to you at the moment. There is a lot of code in this book and doesn't make for an easy skim--you should just know that. I got the most out of this book when I had my text editor open and tried out some of the ideas as I went along.

One of my favorite O'Reilly books is Perl Best Practices by Damian Conway (go ahead and tease). I expected this book to to take a similar format--PBP is categorized into chapters and sub-divided into about 100 core principles such as "Use croak instead of die", "Use hashes for arguments > 3", and so on. RBP is not organized like that at all--perhaps because it would not serve Ruby developers as well... I don't know.

It should be mentioned RBP is a Ruby 1.9 "moving forward" book and will hopefully remain relevant longer.

RBP is very rich with ideas and perspectives and examples but there are also a lot of simple takeaways that will stick with me as long as I write code in Ruby. Though it is rich and probably not a book you can master in one reading there are many nuggets and tips that will give you immediate gratification. Some of these tips seem so minor but they amount to be the things that save us tons of time (see Chapter 6 "When Things Go Wrong" on making the most of Ruby's reflection for debugging). You should check it out, read it in your user group or dev team and discuss it. I really think we need more of these type of practical best practices books and blogs and case-studies and discussions and I am glad for the appearance of this book.

8 of 8 people found the following review helpful:
5.0 out of 5 stars Intermediate-to-expert Ruby programmers should absolutely read this book, 3 Aug 2009
By Jerod Santo - Published on Amazon.com
This review is from: Ruby Best Practices (Paperback)
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!
 Go to Amazon.com to see all 14 reviews  4.3 out of 5 stars 
Were these reviews helpful?   Let us know
 
 
Only search this product's reviews



Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Listmania!


Look for similar items by category


Look for similar items by subject


Feedback


Amazon.co.uk Privacy Statement Amazon.co.uk Delivery Information Amazon.co.uk Returns & Exchanges