Category Archives: Ruby

A smarter Rails url_for helper

Problem In my Rails application, I want to be able to determine a URL for any given model, without the calling code having to know the type of the model. Instead of calling post_path(@post) or comment_path(@comment), I want to just … Continue reading 

Also posted in Misc | Leave a comment

EmberJS: Initial Impressions (Compared To Backbone)

It’s been a little less than a year since I dove heard-first in to Backbone. It seems there’s been a tremendous amount of movement on the JS-MV* front in that time, and one of the up and coming contenders for … Continue reading 

| 20 Comments

Powerfully simple persistence: MongoDB

In my post “Great time to be a developer“, I listed MongoDB as one of the tools that made my task (track travel times for a given route) easy. This post will show you how. What do I need to … Continue reading 

Also posted in NBehave | Leave a comment

Great time to be a developer

I am in awe of the free tools available to software developers today. It is amazing how fast, and cheaply, you can turn an idea into productive code. I was so pumped by a recent experience, I decided to share. … Continue reading 

Also posted in Misc | Leave a comment

Composition Of Responsibility vs Interface Implementation

This started out a comment in a Google+ stream, which is in response to the brujahahahahalols that have been going around concerning ActiveRecord, FubuMVC and Rails. I’m not defending any of these posts or perspectives. I have my own opinions … Continue reading 

| 10 Comments

Learning Haskel For Fun (and profit?)

I found a little spare time recently, so I started learning Haskell via LearnYouAHaskell.com. I’m learning it specifically because it’s completely foreign to me. I’ve never done any functional programming and I wanted to bend my mind around and see … Continue reading 

| 8 Comments

Dependency Injection Is NOT The Same As The Dependency Inversion Principle

A long time ago, when I first started blogging with LosTechies, I wrote up a few posts on Dependency Inversion and Dependency Injection, and how I finally started to understand what Dependency Injection was all about. At the time, I thought … Continue reading 

| Leave a comment

Test-Driving Backbone Views With JQuery Templates, The Jasmine Gem, and Jasmine-JQuery

In my current production rails app, I use Cucumber to test my backbone code as an integration test – to make sure that the entire system is playing nice. Over the weekend, I decided to dive a little deeper into my … Continue reading 

Also posted in Uncategorized | 3 Comments

Integrating Toto and a Sinatra app in 10 steps

Integrating a Sinatra and toto application is a little tricky for those unfamiliar with hosting multiple Rack applications in a single Rack instance. To integrate these two for AutoMapper.org, I followed similar instructions from the toto wiki: cd your_sinatra_app mkdir … Continue reading 

Also posted in Uncategorized | 1 Comment

Debugging Cucumber Tests With Ruby-Debug

Today I ran into a scenario where I needed to step through some ruby code and examine the state of various objects in my rails app. I’ve used the ruby-debug gem a number of times to do exactly this. However, … Continue reading 

| Leave a comment