Confident Code 4.58 http://spkr8.com/t/7473

Description:

Are your methods timid? Do they constantly second-guess themselves, checking for nil values, errors, and unexpected input?

Even the cleanest Ruby codebases can become littered over time with nil checks, error handling, and other interruptions which steal attention away from the essential purpose of the code. This talk will discuss strategies for writing your Ruby classes and methods in a confident, straightforward style; without sacrificing functionality or robustness. In the process, we'll cover concepts and techniques points including:

  • The narrative style of method construction
  • The four parts of a method
  • Three strategies for dealing with uncertain input
  • Massaging input with coercion and the Decorator pattern
  • Lightweight preconditions
  • Exterminating nils from your code
  • The chaining and iterative styles of method construction
  • Eliminating conditionals with the Special Case and Null Object patterns
  • Isolating errors with the Bouncer and Checked Method patterns

Comments on this Talk

Avatar-missing-icon-07 Patrick Schless, 17 May 07:40 PM

Really great talk! These patterns will definitely be showing up in my code

Face2 Tim Tyrrell, 21 May 07:46 PM

The content was exceptional and you presented very well; the "only" criticism that I can even think of was to cut down on the "umm's"

Viget_avatar1 John Dyer, 23 May 02:26 PM

Great job! Lots of awesome snippets of code spread throughout.

Have an account? Sign in or register.

Leave a Comment

18 Ratings: 4.58

Delivery: 4.44

Content: 4.72

Last Five Ratings