Skip to content

Category Archives: Uncategorized

Sustainable Development in Ruby, Part 2: Method Injection

Sometimes you have a need for an object method which the class author did not foresee. For instance, in our previous installment, we used the following code to accumulate packets until an ending packet was found:

class BufferedConnection < FMTP::Connection def receive buffer = "" […]

Sustainable Development in Ruby, Part 1: Good Old-Fashioned Inheritance

The first technique we’ll look at in this series is something so basic it may not even seem worth spelling out. But sometimes old-school techniques are overlooked in the excitement of a young language.

Let’s use as our example a hypothetical communications protocol, Flying Monkey Transport Protocol (FMTP). Flying Monkey Transport Protocol is a packet-based […]

The Pipe Cleaner Gang

My stepson is a budding artist, and pipe cleaners are his medium of choice these days.  I recently changed seats at work, and the new location is more conducive to displaying the creations he has entrusted to me.  So I give you my new silent audience:

From left to right: Godzilla; Trogdor the Burninator, Strong Bad, […]

Sustainable Development in Ruby: Introduction

This is the beginning of a series of posts on sustainable development in Ruby. No, I’m not talking about writing code on wind-powered laptops while sipping fair-trade coffee. But the sustainable development movement has a fairly direct analog in software development. As programmers, we work within a code ecosystem. The ease […]

Doctor, it hurts when you say that

In your response, for instance, you say “I prefer thinking before writing code.” Well, so do I, but the fact of the matter is some people don’t and some people make mistakes based on inexperience or ignorance even when they do prefer to think before they code.

— Michael Feathers

A standard response in our office, whenever […]

Full Disclosure; or, What’s in your toolbox?

The one objection I haven’t heard yet to my monkey patching rant is: you’re a hypocrite!

Gasp, yes, I have written code that exploits Ruby’s open classes. It even extends Object, the core-est of the core! And then shamelessly contributed it to a publicly available gem!

As anyone who read past the title of my […]

Followup to “Monkeypatching is Destroying Ruby”

My last article was intentionally provocative, and my expectations of response were exceeded. The ruby-talk thread was full of good comments. I’m appreciative of everyone who has taken the time to respond either there or here on the blog.

I thought I’d write a quick followup and just respond to a few of the points […]

Monkeypatching is Destroying Ruby

(The title of this post is intended to be deliberately provocative, as well as being a nod to Steven Colbert’s “The People Destroying America” segments. It’s provocative because I want to get people talking about this issue.  I don’t actually think that monkey patching is “destroying” Ruby, but I do think the proliferation of the […]

Announcing NullDB 0.0.1

I spent the afternoon coding an alternative to the ARBS and UnitRecord database-elimination plugins.  Definitely scratching a personal itch, as I had a project where I wanted to use one of the above-mentioned libraries but i just couldn’t seem to get them to work.  I’m releasing it in hopes others will find it useful too.

Here’s […]

Why jQuery

The jSkinny on jQuery — err.the_blog  AnnotatedThe best brief intro to jQuery I’ve seen. - post by avdigrimmThere are a bajillion posts about jQuery, all of which introduce you gently, so I will be brief: jQuery is all about a single namespace and kickass querying.