A few months ago, I read a blog post by the Flickr developers on how they built an internal tool called a “feature flipper”. A feature flipper lets a site admin deploy/rollback features from a simple dashboard with a single click. Think of being able to add an on/off switch to any piece of code [...]
Searchlogic is a Rails plugin that adds useful named scopes to all of your models.
I had a little trouble building a search form for a datetime attribute. After reading a blog called Craic Computing Tips and the Issues section on Searchlogic’s Github page, I arrived at this simple solution:
addthis_url [...]
¶
Posted 16 May 2010
† admin
§
‡
°
I recently asked a question on Stackoverflow about when it’s best to use a case statement versus using a Hash in Ruby. I got a few answers including a really good specific answer. But another more general answer really struck me, so I’m sharing it here.
Igor Krivokon wrote:
In general, “better” in programming means different things. [...]
I’ve been working on an admin panel for a certain Rails app. One of the most common tasks to writing an admin panel is to generate a table where each column is a different attribute for your model. This is easy to do, but very tedious.
To simplify the task, I looked at metaprogramming. Metaprogramming with [...]
CATA (Centre Area Transportation Authority) recently released a free iPhone app for tracking their buses in real time. Although I don’t own an iPhone, based off the few times I’ve seen my friends use the app, I’ll say that CATA did an excellent job with it.
The iPhone app wasn’t CATA’s first foray into real-time [...]
Eager loading in ActiveRecord is a great feature. It prevents what’s called the “n+1″ problem. From the docs (emphasis mine):
Eager loading is a way to find objects of a certain class and a number of named associations. This is one of the easiest ways of to prevent the dreaded 1+N problem in which fetching 100 [...]