Preface
1. Life Is Short
This is a book of recipes: solutions to common problems, copy-and-paste code snippets, explanations, examples, and short tutorials.
This book is meant to save you time. Time, as they say, is money, but a span of time is also a piece of your life. Our lives are better spent creating new things than fighting our own errors, or trying to solve problems that have already been solved. We present this book in the hope that the time it saves, distributed across all its readers, will greatly outweigh the time we spent creating it.
The Ruby programming language is itself a wonderful time-saving tool. It makes you more productive than other programming languages because you spend more time making the computer do what you want, and less wrestling with the language. But there are many ways for a Ruby programmer to spend time without accomplishing anything, and we’ve encountered them all:
Time spent writing Ruby implementations of common algorithms.
Time spent debugging Ruby implementations of common algorithms.
Time spent discovering and working around Ruby-specific pitfalls.
Time spent on repetitive tasks (including repetitive programming tasks!) that could be automated.
Time spent duplicating work that someone else has already made publicly available.
Time spent searching for a library that does X.
Time spent evaluating and deciding between the many libraries that do X.
Time spent learning how to use a library because of poor or outdated documentation.
Time lost staying away ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access