
Polished Ruby Programming: Principles and practices for building scalable, maintainable, and performant software 2nd Edition
Author(s): Jeremy Evans (Author)
- Publisher: Packt Publishing
- Publication Date: July 10, 2026
- Edition: 2nd
- Language: English
- Print length: 432 pages
- ISBN-10: 1803243643
- ISBN-13: 9781803243641
Book Description
Learn design principles, best practices, and trade-offs involved in implementation approaches, to improve your Ruby programming skills
Key Features
- Understand the design principles behind polished Ruby code, and trade-offs involved in different implementation approaches
- See how to use plugin systems to build libraries for maximum flexibility and performance
- Learn about the advantages and disadvantages of different approaches to concurrency
Book Description
Most successful Ruby applications become more difficult to maintain as the codebase grows in size. Polished Ruby Programming, 2nd Edition provides you with the skills and advice you need to design Ruby programs and libraries that are robust, performant, scalable, and maintainable.
The book takes you through possible implementation approaches for many common programming situations, discusses the trade-offs inherent in each approach, and explains why you may sometimes choose to use different approaches. You’ll start by learning fundamental Ruby programming principles, such as correctly using core classes, class and method design, variable usage, error handling, and code formatting. Then you’ll move on to higher-level topics such as library design, metaprogramming, domain-specific languages, and refactoring. Finally, you’ll learn about the pros and cons of different approaches to concurrency, what you should consider when deciding whether to use static types in your Ruby code, and how best to optimize your Ruby code.
The 2nd edition of Polished Ruby Programming has been updated to include relevant changes between Ruby 3.0 and 4.0. While most principles discussed in the book apply to all recent Ruby versions, some of the content in the book is specific to Ruby 4.0, the latest release at the time of publication.
What you will learn
- Use Ruby’s core classes and design custom classes effectively
- Explore the principles behind variable usage and method argument choice
- Design extensible libraries and plugin systems in Ruby
- Use metaprogramming and DSLs to avoid code redundancy
- Implement different approaches to testing and understand their trade-offs
- Discover design patterns, refactoring, and optimization with Ruby
- Learn about the trade-offs inherent in different concurrency approaches
- Determine whether using static types in Ruby makes sense for you
Who this book is for
If you already know how to program in Ruby and want to learn more about the principles and best practices behind writing maintainable, scalable, optimized, and well-structured Ruby code, then this book is for you. Intermediate to advanced-level working knowledge of the Ruby programming language is expected to get the most out of this book.
Table of Contents
- Getting the Most out of Core Classes
- Designing Useful Classes
- Proper Variable Usage
- Methods and Their Parameters
- Handling Errors
- Formatting Code for Easy Reading
- Designing Your Library
- Designing for Extensibility
- Metaprogramming and When to Use It
- Designing Useful Domain-Specific Languages
- Testing to Ensure Your Code Works
- Handling Change
- Using Common Design Patterns
- Choosing Your Concurrency Approach
- Static or Duck
- Optimizing Your Code
Editorial Reviews
Editorial Reviews
About the Author
Jeremy Evans is a Ruby committer who focuses on fixing bugs in Ruby, as well as improving the implementation of Ruby. He is the maintainer of many popular Ruby libraries, including the fastest web framework (Roda) and fastest database library (Sequel). His libraries are known not just for their performance, but also for their code quality, understandability, documentation, and how quickly any bugs found are fixed. For his contributions to Ruby and the Ruby community, he has received multiple awards, such as receiving the prestigious RubyPrize in 2020 and being chosen as a Ruby Hero in 2015. He has given presentations at over 20 Ruby conferences. In addition to working on Ruby, he is also a committer for the OpenBSD operating system.
Wow! eBook


