One of my biggest pet peeves in doing QA is when I spend half a day trying to track down why a bug I thought I’d fixed has cropped up again, only to discover that the reporter was looking at an old version of the application. Good revision tracking is vital to doing efficient […]
Working as I do in the Rails world these days, I’m periodically reminded of the difference between me and most Rails programmers. That is, the fact that I came to Rails via Ruby, rather than vice-versa. Usually this happens when someone at work or in the blog world expresses delight (or perplexity) about […]
A passage in Charles Nutter’s reaction to MagLev caught my eye today:
First off, they demonstrated its distributed object database automatically synchronizing globally-reachable state across multiple VMs. It’s an amazing new idea that the world has never really seen…
except that it isn’t. This is based on existing OODB technology that Gemstone and others have been promoting […]
Sure, monkey patching is great and all. That period of disbelief, followed by increasing exasperation as the victim maintenance programmer discovers that an object is behaving differently than it’s source code says it should, is satisfying. But sooner or later he or she wises up and greps through the codebase, discovers where you […]
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 = ""
[…]
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 […]
Monday, February 25, 2008
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 […]
Monday, February 25, 2008
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 […]
Saturday, February 23, 2008
(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 […]
Sunday, February 17, 2008
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 […]