I’m excited for this Saturday (Tommorow) and GoRuCo. It looks like the speakers are going to be really interesting. It should also be a little more fun as I’m traveling with a possee this year:
Mike - invisibledetails
Mark - Partner at Intersect
Kronenberg - aka captainpants
Besides going to learn some interesting tidbits, Intersect is also on a mission to find some people to help out on upcoming projects.
If you’re going and your reading this, come find me!
Me:

Posted April 25th, 2008 in NYC, Ruby | No Comments »
A neat way to test for values deep in the heart of a Hash.
class Hash
def deep_value(key_array)
value = self
Array(key_array).each do |key|
value = value.fetch(key, nil)
end
value
rescue NoMethodError
nil
end
end
h = {1 => {2 => {3 => 4}}}
h.deep_value(1) h.deep_value([1,2]) h.deep_value([1,2,3,4])
h = {"farm" => {"animals" => ['sheep','pigs']},
"people" => {"farmers" => ['bill','joe'],
"children" => 'tommy'
}
}
h.deep_value(["farm","animals"]) h.deep_value(["farm","animals","edible"]) h.deep_value(["farm","people","farmers"]) h.deep_value(["farm","city folk"])
Posted March 11th, 2008 in Development, Geekery, Ruby | No Comments »

The Whitney Museum, one of the best and most renowned art museums in New York (and thus the world) is using Flickr to promote their Biennial Show. Regardless of the fact that the lovely woman in charge of this project happens to be my lovely girlfriend, this is an awesome use of Flickr as a tool. I’ve always firmly believed that Flickr’s strength lies not only in its community but by how it can be used as a leap pad for inspiration and exploration of mediums beyond just photography. It’s cool to see bigger institutions jump on the bandwagon and open up to the social web, and in turn the youngin’s.
See also:
The Facebook Biennial
The Whitney Biennial 2008
Friend & Stranger
Posted March 5th, 2008 in Design, NYC, Art | No Comments »

The scenario: Its 3AM. You've been coding all day and youre just about ready to launch this sweet social networking app for steel workers who love to dance. One last thing - you need to replace all the crappy copy you stuck in to your 'flash' messages with real informative text. "sucesfil post" might make sense to you, but wont make sense to the blue collar guy doing the electric slide all over your server. You go to replace these warnings and feedback messages but theyre all over your code. You think: If Rails is so DRY and the business and display logic are all supposed to be separate, then why am I putting messages that will end up in my views all through my controllers?!
Introducing Flashdance
The get-the-view-out-of-the-controller-so-you-can-rest plugin.
Instead of all-up-in your controller files, messages are stored in a single YAML file:
all_is_good: This is great
this_failed: This failed
using_erb: you are an idiot, <%= @email %>
section:
subsection: I'm nested
my_controller:
my_action:
message: I'm soaking wet
Examples
At its most unobtrusive:
def update
flash[:warning] = flashdance(:this_failed) end
A little nicer:
def update
flash(:message => 'all_is_good') end
ERB is evaluated in the context of the controller so you can do fun things like:
def tell_off_the_spammer
@email = 'jon@example.com'
flash(:warning => :using_erb)
end
So what if your app is huge and you use these flash thingies all over the place? Your YAML file might get big and unreadable. Well, thats why you can nest! Nested sections are refered to by arrays.
def make_a_nest
flash(:nest => [:section,:subsection])
end
Flashdance automatically checks for entries nested in the controller/action path where you call it from. And heres where you get splashed with that big bucket of water:
class MyController < ApplicationController
def my_action
flash(:message)
end
end
Install it
From subversion:
./script/plugin install -x svn://svn.quirkey.com/quirkey_tools/trunk/flashdance
or Download: flashdance.tar.gz
You can email me at aaron at this domain for bug reports/comments/suggestions - and I'm looking to set up Trac or something else soon.
Photo credit: http://www.flickr.com/photos/tzofia/185003069/
Posted February 29th, 2008 in Development, Rails, Software/Scripts, Ruby, QuirkeyTools | No Comments »

I’ve been such a Rails mooch. Relying on everyone else’s plugins, gems, and helpful blog posts. A while ago I said how I wanted to be a real part of this community. Well its time to stop coding (briefly) and start sharing. It’s time to give back.
Over the past year and a half (!!!) of doing Rails and Ruby full time, I’ve come up with a lot of code thats useful, at least to me. For a while its all been packaged as a plugin on my private SVN server called QuirkeyTools. It’s chock full of helpers, generators, extensions, macros - its bursting at the seems.
So the idea over the next couple of weeks is to start splitting out the code, cleaning up the tests, and releasing them as separate Rails plugins. I’m also going to look into packaging some gems - which sounds like fun.
All of this is made possible in part by the fact that I’ve got a new VPS from slicehost. I’m not getting paid to say this but its awesome! Super fast, haven;t had any reliability problems and its a blank slate - meaning install whatever you want. They also have some great of the best tutorials for setting up. This blog remains (for the time being) on my shared host at Site5, but I’ve set up an SVN server and repositories with public read permissions. So here comes the code . . .
Photo Credit: http://www.flickr.com/photos/docman/36125185/sizes/m/
Posted February 28th, 2008 in Development, Rails, Geekery, Software/Scripts, Ruby | 3 Comments »