Featured Video Play Icon

Controlling superclass argument pass-through in Ruby

In Ruby class-based programming, superclass versions of subclass methods are always invoked explicitly using the super keyword. There are some nuances to using super though, particularly when it comes to passing (or not passing) arguments and blocks along to the base class. In this sample from from the RubyTapas archives, we’ll talk about some of those “gotchas”.

Read More

Featured Video Play Icon

Ruby Singleton Objects

Here’s another freebie from the deep RubyTapas stacks. This one is about a truth of object modeling that we don’t often talk about: not every object needs to have state. If an object has no state, there’s no need to have more than one of it. And for stateless objects, having a class just to generate a single instance may be superfluous!

Read More

SIGAVDI #88: Endless Beans Edition

Hello friends,

It smells like autumn. This will likely be an autumn without apple-cidering and hayrides, which makes me sad.

I'll Trade Ya!

Hey there! Archived SIGAVDI letters are for newsletter subscribers only. All it costs to join (and unlock this post) is an email address! I'll write to you weekly-ish with a few interesting links, some updates, and some reflections on the intersection of software and life. And I'll respond to your replies! Whattya say?

A photo of Avdi Grimm

I’m still on a dead-tree kick, so more book quotes this week…

Read More

Featured Video Play Icon

Alternative Ruby Symbol Literals

Periodically I take episodes from the RubyTapas archives and publish them for free. This episode from October 2012 is about symbol literals, and how you can use alternative quoting syntax to embed and interpolate any kind of character sequence in a symbol. And also: why you might not want to take advantage of this. Enjoy!

Read More

SIGAVDI #86: Fancy Ramen Edition

Hello friends,

Long time no write. I spent the summer at home with my kids. Quarantining in the woods with four small children turned out not be very conducive to writing. Or to doing most of my usual work, for that matter. I focused on keeping RubyTapas ticking along, and otherwise investing in family time, home improvements, and watching democracy fall apart.

Read More