Effective Ruby

Effective Ruby

48 Specific Ways to Write Better Ruby

by Peter J. Jones

240 pages· 2014· ISBN 9780133847062
About
If you’re an experienced Ruby programmer, Effective Ruby will help you harness Ruby’s full power to write more robust, efficient, maintainable, and well-performing code. Drawing on nearly a decade of Ruby experience, Peter J. Jones brings together 48 Ruby best practices, expert tips, and shortcuts—all supported by realistic code examples. Jones offers practical advice for each major area of Ruby development, from modules to memory to metaprogramming. Throughout, he uncovers little-known idioms, quirks, pitfalls, and intricacies that powerfully impact code behavior and performance. Each item contains specific, actionable, clearly organized guidelines; careful advice; detailed technical arguments; and illuminating code examples. When multiple options exist, Jones shows you how to choose the one that will work best in your situation. Effective Ruby will help you systematically improve your code—not by blindly following rules, but by thoroughly understanding Ruby programming techniques. Key features of this concise guide include How to avoid pitfalls associated with Ruby’s sometimes surprising idiosyncrasies What you should know about inheritance hierarchies to successfully use Rails (and other large frameworks) How to use misunderstood methods to do amazingly useful things with collections Better ways to use exceptions to improve code reliability Powerful metaprogramming approaches (and techniques to avoid) Practical, efficient testing solutions, including MiniTest Unit and Spec Testing How to reliably manage RubyGem dependencies How to make the most of Ruby’s memory management and profiling tools How to improve code efficiency by understanding the Ruby interpreter’s internals

Discuss Effective Ruby with other readers

Join or start a book club for Effective Ruby on Readfeed. Live chat, shared reading progress, and AI discussion questions — free to get started.

Frequently asked questions

How do I join a book club for Effective Ruby?

Sign up free on Readfeed, then browse public clubs or start your own club with Effective Ruby as the current read. Invite friends with a share link and discuss together with live chat and AI discussion questions.

Can I discuss Effective Ruby with other readers online?

Yes. Readfeed book clubs let you chat live, share progress, and join discussions about Effective Ruby with readers worldwide — whether your club is virtual, in-person, or hybrid.

Is Readfeed free?

Yes. Creating an account and joining book clubs is free. Sign up to find readers who love the same books and start discussing today.