Menu Sidebar
Menu

blocks

Why does Ruby have blocks?

Ruby’s blocks are easily the biggest hurdle most newbies to the language have to overcome. Even for people with years of experience in other languages, the the concept of blocks is often an elusive one at first. In my opinion, some of the difficulty in grokking blocks can be chalked up to how they are […]

The Procedure/Function Block Convention in Ruby

Ruby lets you enclose blocks in either {…} or do…end delimiters. Which you choose is a matter of style. There are two conventions that I know of for deciding which form to use. ┬áThe one I see people using most often these days is the “line count” convention: curly brackets for one-liners, do…end for multiline […]

Virtuous Code

"The three virtues of a programmer: laziness, impatience, and hubris" — Larry Wall

Books and Screencasts

RubyTapas Screencasts

RubyTapas Screencasts

Small plates of gourmet Ruby code.

Confident Ruby

Confident Ruby cover

32 Patterns for joyful coding.

The Making of Cowsays.com

Confident Ruby cover

Watch me build an app in Sinatra and Rails

Objects on Rails

Objects on Rails

A developer notebook on applying classic Object-Oriented principles to Ruby on Rails projects.

Exceptional Ruby

Exceptional Ruby

The definitive guide to exceptions and failure handling in Ruby.

Archives

Categories