Books

Exceptional Ruby
By avdi grimm
00
mode_comment 0
0%
0 likes
Exceptional Ruby
By avdi grimm
0%
0 likes

E-book, 102 pages

Published 2011-05-01

Writing code that works is hard. Writing code that handles unexpected errors and still works is really hard. Most of us learn by trial and error. This short book removes the uncertainty. With over 100 pages of content and dozens of working examples, you’ll learn everything from the mechanics of how exceptions work to how to design a robust failure management architecture for your app or library. Whether you are a Ruby novice or a seasoned veteran, Exceptional Ruby will help you write cleaner, more resilient Ruby code.

This work was written and produced entirely by the author. We are proud to be distributing it.

Inside this electronic-only book, you’ll find:

* A detailed look at the lifecycle of a Ruby exception.
* Overriding Kernel#raise for fun and profit.
* Alternatives to exceptions, for when “fail fast” isn’t the right answer.
* How to write a crash logger.
* Advanced dynamic exception matching in rescue clauses.
* Avoiding failure cascades with the Barricade and Circuit Breaker patterns.
* Five questions to ask before raising an exception.
* Exception safety testing for critical methods.
* How to create an error API for your library that will make other developers want to kiss you.
* The three exception classes every app or library needs.
* And much, much more… over 100 pages of tips, guidelines, and awesome hacks!

label object-oriented, ruby

0 Comments

Objects on Rails
By avdi grimm
00
mode_comment 0
0%
0 likes
Objects on Rails
By avdi grimm
0%
0 likes

E-book, 197 pages

Published 2012-03-15

Objects on Rails is a sort of “developer notebook” of some ideas and techniques for applying classic object-oriented principles to Rails development. In order to write it I revisited the classic “blog” example, and tried to apply what I’ve learned over the years about OO and TDD to each step. And then at each step I carefully documented what I did, and wrote down the thinking behind my decisions. Sometimes I went on extended digressions about certain patterns and antipatterns. Other times I went down dead-end sidings, thought better of it, and tried to explain the thinking that lead me down them in the first place.

An early reader jokingly called it “how to build a blog in 15 months”, which I got a chuckle out of, because it’s kind of true. I picked a blog example because it’s something that’s familiar to everyone, a kind of “neutral canvas” that wouldn’t distract from the ideas being demonstrated. But the design choices I chose to illustrate are of the kind that are primarily relevant for growing and evolving large systems. Of course, every large, complex system starts out as a small simple one; and a robust architecture comes from making good decisions early on in the process.

label object-oriented, ruby

0 Comments

Confident Ruby
By avdi grimm
00
mode_comment 0
0%
0 likes
Confident Ruby
By avdi grimm
0%
0 likes

E-book, 296 pages

Published 2014-04-14

32 Patterns for Joyful Coding
For many programmers, discovering Ruby is a revelation. They are overjoyed by how elegantly and succinctly they can state problems in the language. But then the real world creeps in, and that joy gradually wanes as the code becomes cluttered with distracting edge case scenarios, error handling, and checks for nil.

Confident Ruby is a guide to recapturing the joy of writing Ruby by employing small patterns and stylistic choices to make each method tell a coherent story. Over the course of 32 patterns, you’ll learn how to isolate uncertainty at the borders of your code; how to avoid repetitive conditionals; and how to liberate your code from the chore of nil-checking. You’ll discover the four parts of a method, and how to use those parts to construct a narrative. Following along with real-world refactoring sessions, you’ll learn how to apply these lessons to legacy code.

Whether you are a novice or an experienced Ruby hacker, this book will help you become a more confident and joyful programmer.

label object-oriented, ruby

0 Comments