Menu Sidebar
Menu

arrays

Treating Arrays as Sets

Reading through the Rake source code the other day (a pastime I highly recommend), I was reminded of a technique I don’t use often enough:

Note that’s a single pipe before the equals sign. The code above adds only unique elements to the array; duplicates are ignored. Ruby Arrays actually implement a small collection […]

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