Hackers Hacking in a Hackerspace

Sometimes I think we forget how good we have it in the Rails world. I don my ruby-colored slippers to work every morning and it‘s easy to forget this wasn‘t always the case. I was recently reminded of this dark past when our local hackspace needed to write some database-backed web software.

If I was hanging out with my Ruby friends, this is the moment that the cool ones (myself included) suggest we use Sinatra. Sure, it doesn‘t ship with an ORM, but you can try out a new one! And despite Rails being leaps and bounds more capable of leaping and bounding than other frameworks out there, Sinatra has an elegance factor that appeals to me. There‘s a certain joy from building complex things out of simple components.

However, I was not in Ruby land. I was at a hackerspace. Sinatra is that guy who sings New York, New York and Ruby is seen as a to-be-tested improvment upon Perl. Gross.

So a discussion inevitably comes up as to which framework to use. To my shock, Rails does not come up as a winner: being a lingua franca, they debate Java and eventually choose PHP. Great. It‘s going to be a flame war.

I found myself in a common dilemma: having used Ruby frameworks, PHP frameworks, and Java frameworks I was in a clear position to argue for a winner. But this is not a situation for arguments becuase winning one would require everyone else to have the same level of knowledge. I can talk for hours to the Java people about how Ruby‘s objects just "make sense", or the PHP people about how you can still use all your dirty little tricks. However, so long as they think I am making these arguments for the sole purpose of convincing them, which is half true, arguments are useless.

Instead of despairing we opted to use competition. We would take a week and the PHP team could work its magic while I got to be the lone member of team Ruby. After coding up a single-file frontend in Sinatra I was more than prepared to shock and awe everyone with what we could do with Ruby. Instead, I had to listen to the benefits of the Zend Framework.

The Zend fucking Framework. I fail. I showed up with a knife to a gun fight.

And at first, I was legitimately scared. However, these are engineers. We‘re not going for elegance, we‘re going for features. And yet as this realization dawned on me while the show-and-tell continued, I realized I already had this figured out. Zend Framework is so productive, you can generate a form from an array. Imagine that. A whole form out of just a little array. I‘ll see your Zend Framework, and I‘ll raise you RAILZ 3!!

So yes, this is a story about how using Rails 3 made me a badass. Because for a brief moment, it did. That night I went home and rails generate-d my way into a fully functional frontend. Psh. An array to build a form. I was up and going in an evening, despite some issues with the legacy schema.

After generating the backend, I moved to deploy over working on features. This step was crucial, and something you can only do in software. In the real world if you want a bigger boat, you‘re gonna need a bigger boat. You can‘t just tell your current boat to double itself. In the digital world we have this ability and that‘s why its important to deploy quickly and often. By building the entire pipeline to your users, it overcomes the prototype phase by forcing the app to perform or perish.

It turned out the ability to iterate quickly was what gave Rails the edge in our quick battle of the frameworks. The cerberus-prox project updated its database schema. One migration, one commit, and one deploy and my app was already running on the updated database. At this point, the Cerberus Prox Frontend was moved to port 80, where it still remains. A testament to deploying early, iterating often, and just doing what works instead of debating it.

At a the first Austin.rb meeting, we were asked what we like about Ruby. This is what I like about Ruby. It grants a level of control over the machine that once took a great many lines of subtle syntax. Ruby either makes you dumber or unleashes your creativity. Perhaps a little of both, which is probably what makes it so damn fun.

c2

Fork me on GitHub