“Confident Ruby” now in Beta!

Confident Ruby 3DHey, remember when I said I’d finish Confident Ruby by September 1, 2012? Ha ha! That was a funny joke!

Seriously though, this book has taken much longer than intended, partly as the scope grew, but mostly because of other projects getting in the way. Such as the launch of RubyTapas. I’m hugely appreciative of all the early-access buyers who supported the project and have been patient through this process.

Those early buyers have already heard the news, but now I’m letting the rest of the world know: as of now, Confident Ruby is finally content-complete and entering a Beta phase. That means that while there is plenty of editing, clean-up, and tweaking to do, all the major content (a little over 150 pages’ worth) is now in place.

I intend to spend one month getting Confident Ruby into shape for a final release. At the end of that month, I will be raising the price to $35. Until then, you can still get it for $25. As always, if you don’t have the scratch you can send me a postcard instead.

UPDATE 2013-08-26: Confident Ruby is done! Go here to purchase a copy.

Curious about what’s inside? The nutshell version is that this is a patterns book, focused on the method level of code. It’s all about how to make methods that are “confident”: that is, they tell a clear, straightforward story without a lot of distracting provisos and digressions. In order to get you from “timid” code to confident code, I lay out 32 patterns for collecting input, delivering output, and handling failure within a method. There’s a strong emphasis throughout on removing the scourge of nil values from code, and replacing them with more semantically meaningful constructs.

Here’s the current table of contents, if you’re curious:

  • Introduction
    • Ruby meets the real world
    • Confident code
    • A good story, poorly told
    • Code as narrative
    • The four parts of a method
    • 3.times { rejoice! }
    • Collecting Input
  • Sending a strong message
    • Conditionally call conversion methods
    • Define your own conversion protocols
    • Define conversions to user-defined types
    • Use built-in conversion functions
    • Use the Array() conversion function to array-ify inputs
    • Define conversion functions
    • Replace “string typing” with classes
    • Wrap collaborators in Adapters
    • Use transparent adapters to gradually introduce abstraction
    • Reject unworkable values with preconditions
    • Use #fetch to assert the presence of Hash keys
    • Document assumptions with assertions
    • Handle special cases with a Guard Clause
    • Represent special cases as objects
    • Represent do-nothing cases as null objects
    • Substitute a benign value for =nil=
    • Use #fetch for defaults
    • Use symbols as placeholder objects
    • Bundle arguments into parameter objects
    • Yield a parameter builder object
    • Receive policies instead of data
  • Delivering Output
    • Write total functions
    • Call back instead of returning
    • Represent failure with a benign value
    • Represent failure with a special case object
    • Return a status object
    • Yield a status object
    • Signal early termination with =throw=
  • Handling Failure
    • Prefer top-level rescue clause
    • Use checked methods for risky operations
    • Use bouncer methods
  • Refactoring for Confidence
    • MetricFu
    • Stringer
    • Parting Words

And here’s a video of the talk that started it all:

And here’s that big friendly “buy now” button again!

Buy Confident Ruby now