The If Works This dirt was a building before

Testing

The potentially asynchronous loop

If you write a lot of asynchronous or event-driven code, you’re probably going to end up needing an asynchronous for loop. That is, a loop that runs each iteration sequentially but those iterations may contain non-blocking logic that must halt the loop until the async action resumes. In my case, I need the main loop [...]

Evented programming patterns: Testing event-driven apps

This post is part of a series on event-driven programming. The complete series is: Events: they’re not just for the DOM, you know Observable objects Deferrable values Asynchronous methods First-leg round-up and final remarks Object lifecycle Asynchronous pipelines Testing event-driven apps Thus far all the articles in this series have focused on methods for structuring [...]

Compiling the V8 JavaScript runtime under 64-bit Ubuntu

File under “I’m writing this for the benefit of my future self, and may not work on your machine.” I recently upgraded my home machine to a 64-bit edition of Ubuntu 10.04 and had do to more than the usual dance to get Google’s blazing fast V8 JavaScript interpreter to compile. Here’s what I did. [...]

Terminus: control your browser from the command line

I’ve been saying for a while that I want to use Faye for automating JavaScript and integration testing, especially now that it has server-side clients. Well I took the first step in that direction this afternoon by hacking together Terminus, a distributed JavaScript console. You just install and run like so: $ sudo gem install [...]

Cross-process metaprogramming on the cheap

I will preface my first post of the new decade by saying: this is not by any means elegant. It’s an egregious hack, but it may come in handy for those of you using Culerity for testing your Rails front-end using JavaScript. This is not so much about JavaScript as about dealing with the multitude [...]

Testing command-line apps with Cucumber

.cuke-pass { color: #4e9a06; } .cuke-fail { color: #d73734; } .cuke-pending { color: #c4a000; } .cuke-skipped { color: #06989a; } I recently wrote a tiny little tool called Claw to help me work on large codebases in gEdit. It provides a terminal that lets you search for files by name and content using very minimal [...]

Getting started with Cucumber, RSpec, Webrat and multiruby

.cuke-pass { color: #4e9a06; } .cuke-fail { color: #d73734; } .cuke-pending { color: #c4a000; } .cuke-skipped { color: #06989a; } After a couple years off from full-time Ruby/Rails work, I’m getting back into it having just joined the development team at Songkick. Much as I’ve tried to keep my hand in with the Ruby world [...]

Setting up multiruby on Ubuntu

Archived, mostly for my own personal reference: I’ve spent a decent chunk of today on Google and the Ruby mailing list trying to get multiruby set up for testing on a new machine (I use Hoe’s rake multi for testing across multiple Ruby versions), and this is what I’ve come out with. I’ve skipped Ruby [...]