
Polished Ruby Programming
Build better software with more intuitive, maintainable, scalable, and high-performance Ruby code by

What makes this book different from other Ruby titles on the market Most Ruby programming books are aimed at teaching the reader how to program in Ruby. Polished Ruby Programming does not teach you how to program in Ruby. It assumes you already know how to program in Ruby, and discusses trade-offs between different approaches to programming in Ruby, and principles for deciding which tradeoffs may make the most sense in certain cases. Apart from focusing on these fundamental principles, I’ll also be highlighting principles for better library design, where you’ll be shown how best to design extensible plugin systems as well as how to approach metaprogramming, testing, refactoring, and

even optimization. What are the key takeaways you want readers to understand I think the key takeaway in the book is that there isnt a single way to do things in Ruby There are many ways to accomplishing your goals, and each of them has trade-offs. I’ve tried to highlight important principles of Ruby programming so that you will be able to choose the appropriate trade-offs for your applications. There are only a few cases where the book strictly recommends against using certain parts of Ruby, such as class variables, and certain techniques, such as enforcing arbitrary limits on method or class size. How has your background and experience helped you to write the book Ive been a Ruby programmer for over 15 years, and during that time Ive authored and maintained many Ruby libraries, with a few of them becoming popular. There are definitely parts of the book that are specifically aimed at Ruby programmers who develop libraries for other programmers to use, and my extensive experience in authoring and maintaining Ruby libraries was helpful in writing those sections. Additionally, I became a Ruby committer a couple of years ago, and since then I have become very involved in fixing bugs in Ruby. Doing this has required me to learn much more about the internals of Ruby than most Ruby programmers are aware of. Knowledge of the internals was very important when writing many parts of the book, particularly about why some approaches to Ruby programming are faster than others. What is your favorite part of Polished Ruby Programming and why My favorite part of the book is the extended discussion on implementing a plugin system for Ruby libraries in chapter 8. This is a technique that is not yet popular in Ruby libraries but has been gaining popularity over the last few years. I would like to see this technique spread to more Ruby libraries, as I believe it offers numerous advantages for not only the maintainers of the library but also the users of the library and other programmers who wish to
extend the library. I hope that after reading the book, library developers will consider using a plugin system in their current libraries or in future libraries they develop.