Ruby Best Practices et plus d'un million d'autres livres sont disponibles pour le Kindle d'Amazon. En savoir plus

Identifiez-vous pour activer la commande 1-Click.
Plus de choix
Vous l'avez déjà ? Vendez votre exemplaire ici
Désolé, cet article n'est pas disponible en
Image non disponible pour la
couleur :
Image non disponible

Commencez à lire Ruby Best Practices sur votre Kindle en moins d'une minute.

Vous n'avez pas encore de Kindle ? Achetez-le ici ou téléchargez une application de lecture gratuite.

Ruby Best Practices [Anglais] [Broché]

Gregory T Brown

Prix : EUR 35,94 Livraison à EUR 0,01 En savoir plus.
  Tous les prix incluent la TVA
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
Il ne reste plus que 2 exemplaire(s) en stock (d'autres exemplaires sont en cours d'acheminement).
Expédié et vendu par Amazon. Emballage cadeau disponible.


Prix Amazon Neuf à partir de Occasion à partir de
Format Kindle EUR 15,13  
Broché EUR 35,94  

Offres spéciales et liens associés

Produits fréquemment achetés ensemble

Ruby Best Practices + The Ruby Programming Language + Ruby Cookbook
Acheter les articles sélectionnés ensemble

Les clients ayant acheté cet article ont également acheté

Descriptions du produit

Ruby Best Practices Helps programmers learn how to design beautiful APIs and domain-specific languages, write code that's readable and expressive, work with functional programming ideas and techniques that can simplify code and make them more productive, and more. Full description

Détails sur le produit

En savoir plus sur l'auteur

Découvrez des livres, informez-vous sur les écrivains, lisez des blogs d'auteurs et bien plus encore.

Dans ce livre (En savoir plus)
Parcourir les pages échantillon
Couverture | Copyright | Table des matières | Extrait | Index | Quatrième de couverture
Rechercher dans ce livre:

Quels sont les autres articles que les clients achètent après avoir regardé cet article?

Commentaires en ligne 

Il n'y a pas encore de commentaires clients sur
5 étoiles
4 étoiles
3 étoiles
2 étoiles
1 étoiles
Commentaires client les plus utiles sur (beta) 4.3 étoiles sur 5  14 commentaires
22 internautes sur 22 ont trouvé ce commentaire utile 
5.0 étoiles sur 5 Excellent. 7 juillet 2009
Par Benjamin Orenstein - Publié sur
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.
14 internautes sur 15 ont trouvé ce commentaire utile 
5.0 étoiles sur 5 Very Unique Ruby Book. A Challenging Teaching Tool. 25 juin 2009
Par Dylan Clendenin - Publié sur
Format:Broché|Achat vérifié
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 internautes sur 8 ont trouvé ce commentaire utile 
5.0 étoiles sur 5 Intermediate-to-expert Ruby programmers should absolutely read this book 3 août 2009
Par Jerod Santo - Publié sur
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!
9 internautes sur 11 ont trouvé ce commentaire utile 
3.0 étoiles sur 5 Ok only 4 avril 2010
Par AmazonH - Publié sur
3 stars - the book as it stands
5 stars - the book how it WILL be

David Flanagan and Yukihiro Matsumoto's book "The Ruby Programming Language" was much more useful for me honestly.

My gripes for "Ruby Best Practices" include:
* Missing design patterns applications (eg, how to implement the Strategy pattern using Proc or Method objects; Singleton was actually discussed on pp. 72-74 but could be more explicit)
* Any exception handling best practice advice, besides what's touched on in Chp. 1?
* Should be in cookbook format
* Summarize Ruby's best idioms (the one on p. 257 with [:month, :day, :year, :hour, :minute, :second].map { |attr| dtime.send(attr)} was kind of neat)
* Summarize Ruby's naming conventions and known anomalies
* Performance considerations? Even "TRPL" touched on what's fast and slow in Range membership tests for example, for both Ruby 1.8 and 1.9
* Module objects used as a namespace mechanism, any best ways or distilled advice, besides what's touched on p. 133?
* Summary of corner-case gotchas of Ruby syntax? (eg, when parentheses are required for method invocations, as covered in "TRPL")
* XML processing could be better other than what's in Chp. 1 (with the Nokigiri module) Comparison of modules would be great
* Any Perl-ish Unix filter best practice advice? (ala Tim Maher's "Minimal Perl")
* DSL advice?
* Any install-specific advice, what's the best and most flexible configuration for production for example? (ie, environment variables, proper location according to Linux FHS, and so on) How about Mac OS X or Windows installs?
* Brief Rails best-practices section would be nice, but that's probably pushing it ;)
* Some Factory methods best practices?
* C extensions best practices?
* Ruby 1.8.6 syntax left behind, and was not mentioned on book front or back cover (where it should be), though it's in the Preface. There's an Appendix that touches on some 1.8.6 migration issues however (Ruby 1.9.1 and beyond are the future I agree, but 1.8 is still being distributed for Mac OS X and Debian GNU/Linux at the time of this writing)
* Some so-so advice:
Eg: "I'm not generally a big fan of logfiles." (p. 168) author shows that /[0-9][0-9][0-9][0-9]/ can be rewritten as /\d{4}/ (p. 105) Chapter 2 Designing Beautiful APIs - most of this material already covered in D. Flanagan/Matz' book

Appendix B. Leveraging Ruby's Standard Library was the most useful part of the book for me. (I find it to be the most accessible! Most of the other content is just too buried in prose.)

A cookbook or "Power Tools" format can benefit this book IMHO. Mike Loukides (editor) should've seen this beforehand I think (Mike was one of the authors of the venerable "Unix Power Tools.")
3 internautes sur 3 ont trouvé ce commentaire utile 
5.0 étoiles sur 5 Rubyists that want to learn how to write code like the experts should read this 12 mars 2010
Par Raoul Felix - Publié sur
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.

The Good

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).

The Bad

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.

Reading Tips

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!

The Verdict

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.
Ces commentaires ont-ils été utiles ?   Dites-le-nous

Discussions entre clients

Le forum concernant ce produit
Discussion Réponses Message le plus récent
Pas de discussions pour l'instant

Posez des questions, partagez votre opinion, gagnez en compréhension
Démarrer une nouvelle discussion
Première publication:
Aller s'identifier

Rechercher parmi les discussions des clients
Rechercher dans toutes les discussions Amazon

Rechercher des articles similaires par rubrique


Souhaitez-vous compléter ou améliorer les informations sur ce produit ? Ou faire modifier les images?