Eloquent Ruby, Second Edition

Cover

Write better, clearer, more focused Ruby code by becoming truly fluent in the language. To express yourself eloquently in any language, you need to go beyond its vocabulary and syntax. Ruby is an easy programming language to learn, but to gain the fluency needed to write great Ruby code, you need to break old habits. Start thinking about code the way experienced Ruby programmers do. Grok how they solve problems. Dig below the what to the why of Ruby conventions. Thoroughly updated to reflect modern Ruby usage and with new chapters covering pattern matching and concurrency, Eloquent Ruby, Second Edition will help you take advantage of the power and flexibility of the Ruby programming language.

Writing idiomatic Ruby code is easy: you just have to think like a Ruby programmer. By explaining the conventions and techniques of Ruby programming as well as the thinking behind those conventions and techniques, Eloquent Ruby, Second Edition provides you with the mental framework to create programs that take full advantage of this powerful language.

Dive into the core concepts of Ruby programming by starting small and working through to the bigger ideas. You’ll learn the basics of formatting Ruby code and then move on to constructing methods, classes, modules, and tests. From there, you’ll explore more advanced techniques such as metaprogramming and domain-specific languages. Along the way, you’ll learn to recognize common Ruby pitfalls and how to avoid them. You’ll also discover how to use the code behind popular Ruby gems and Ruby itself as a resource to improve your own code. Completely updated for Ruby 3.4, the book includes new material on recent additions to Ruby such as pattern matching and concurrency.

Whether you’re discovering Ruby for the first time or refreshing your knowledge of a familiar tool, the updated edition of this classic work will level up your ability to write clear, maintainable, and functional Ruby.