Menu Sidebar
Menu

Avdi Grimm

Hacker; code documentarian.

Ruby

Benchmarking Ruby Dispatch Strategies

Let’s say we’re dispatching events to listener objects. Events look like this: Event = Struct.new(:name, :source, :args) Events should be routed to different handler methods based on the name of the event. For instance, when an object is sent the #call message with an :accepted event: listener.call(Event[:accepted, obj])

RubyTapas Freebie: Sequel

Today on Ruby Rogues we spoke to Jeremy Evans, the prolific Open Source maintainer of the Sequel gem and creator of the Roda web framework. (The episode will drop next Wednesday). It was a terrific conversation, and it reminded me that a while back I did a RubyTapas video about on the subject of Sequel. I’d love […]

So what’s the deal with Ruby refinements, anyway?

If you’ve been following Ruby developments for the past couple of years, chances are you’ve heard about refinements. You may have heard that they are controversial, confusing, or even “broken”. It’s true that refinements had some growing pains in their early, experimental versions. But having spent some time exploring the feature as it now exists in […]

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 […]

Older Posts

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