Hey, 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:
httpv://www.youtube.com/watch?v=T8J0j2xJFgQ
And here’s that big friendly “buy now” button again!
[cta size=”medium” action=”Buy Confident Ruby now” url=”https://shiprise.dpdcart.com/cart/add?product_id=39130&method_id=39361″]
Hi, which format (or formats) is the book? So PDF, epub, mobi,..?
Yes 🙂
Cool, bought. Thanks a lot.
I wish you offered print books…I can’t read that much content on the computer or an iPad…I get lost on where I’m at, my eyes get tired faster, and I’m distracted by the rest of what is grabbing at my attention, plus no highlighting or sticky noting pages. Just food for thought.
You can get a printed version of Exceptional Ruby from the Pragmatic Bookshelf store. I’m hoping to make something along those lines happen for this book as well. Stay tuned!
+1!
I hope e-books with E-Link technology will help you.
Looks like a good read! Glad to see you out there still raising a storm, Avdi
Hey Avdi,
I just got the book and I’m really enjoying it thus far. Great work as usual. If I come across an error how can I let you know about it.
For now I’d just tell you right here: On page 33, Indirect Inputs, I think you meant the #now message and not the #new message. It should be “Then we send it the #now message.” and “… the return value of #now, …”.
On page 55, listing 34 redefines #- but uses a comma instead of doing a subtraction.
Thanks a lot!