Skip to main content

Benjamin Oakes

Photo of Ben Oakes

Hi, I'm Ben Oakes and this is my geek blog. Currently, I'm a Ruby/JavaScript Developer at Liaison. Previously, I was a Developer at Continuity and Hedgeye, a Research Assistant in the Early Social Cognition Lab at Yale University and a student at the University of Iowa. I also organize, ICRuby, OpenHack Iowa City, and previously organized NewHaven.rb. I have an amazing wife named Danielle Oakes.

Filtering for the month September, 2012. Clear

UGtastic Interview

by Ben

I did an interview with UGtastic at WindyCityRails. They just tweeted the video so I thought I’d embed it here. From their description:

Midwestern and East Coast Ruby Community

Benjamin Oakes helped start the Iowa City Ruby user-group before moving out to Connecticut and helping start up the New Haven Ruby. We discuss a little bit of the differences between running a group in the Mid-west versus the East Coast.

(Interview licensed under CC BY-SA 3.0, and also available on Vimeo.)

Filtering output when logging

by Ben

I needed to filter some output when logging. Unfortunately, the filtering built into Rails was no help because the logging wasn’t coming from parameters. It also wasn’t coming from a Hash. (To filter a Hash, you can also use ActionDispatch::Http::ParameterFilter.) Instead, it was coming from a value inside another object.

Although this wasn’t my final solution, I still think it could be useful to someone:

# License: MIT, GPLv2
module InspectionHelper
  def self.filter(object)

    def object.inspect

This will filter output from both inspect and the equivalent in awesome_print (which was the pain point for me earlier today).


data = []
data.inspect # => '[INSPECT-FILTERED]'

# Or nested objects:
h = { something_important: }
h.inspect # => {:something_important=>[INSPECT-FILTERED]}


by Ben

I ran into an error with the VerticalResponse API today, and to my surprise there were no results when searching on Google, Bing, or DuckDuckGo. Not even in the VerticalResponse documentation!

Your search - VRAPI2.NO_EMAIL_OR_POSTAL_ADDRESS_PROVIDED - did not match any documents.

The error was:

A general API error occurred: "VRAPI2.NO_EMAIL_OR_POSTAL_ADDRESS_PROVIDED" - "no email or postal address was provided, but at least one is required"

I tracked it down to a call to editListMember, which I guessed didn’t include the email_address in member_data. After adding it, the error message has gone away.

At any rate, there will now be a result if someone else searches for the error message. :)

Just in case: keep these DNS servers handy

by Ben

Having problems accessing a website? GoDaddy is having DNS problems, which may be the cause.

Using OpenDNS nameservers is a temporary workaround. It’s always good to have these around, so save them someplace handy now (in something that doesn’t require internet access):

Use those in the network settings in your OS, or even in your router.

Personally, I keep these in my public wiki on GitHub, which is synced to my computer using SparkleShare.

WindyCityRails 2012

by Ben

South Shore Cultural Center, Chicago

South Shore Cultural Center, Chicago
(Photo: Jeff Zoline CC BY-NC 2.0)

WindyCityRails was a lot of fun.

As I’ve done in the past, I took notes and put them into an open wiki on GitHub. Some quick stats: the wiki project is up from approx. 220 stars to 241 right now, and even got a few more contributors (~49 → 53).

Anyway, I thought I’d share some of the better talks:

* David Chelimsky: The RSpec Toolbox
* Evan Light: Frustration Driven Development
* Steve Klabnik: Development and Philosophy
* Several really good Lightning Talks

Both David Chelimsky and Steve Klabnik contributed to the wiki, which was a nice surprise. :) Steve’s talk was really good, but hard to do it justice with any notes… I was happy to see that he annotated it.