Monthly Archives: October 2007

World Clock Project

Last week, the fellas at Iridesco and I put together a fun little Internet clock for your time-telling needs. It’s officially online and ready to give you the time of day in a world-conscious way.

Visit the World Clock Project.

Technorati Tags: world clocks, time, rails

Kiwi

Ran into this at Joel on Software. Rather touching.

Ruby console spacebar problems

Since early this summer, I have had a severely annoying problem with my Ruby consoles (irb and script/console). My spacebar quit functioning, making quick testing of Ruby and Rails functionality quite limited and in some cases impossible. I’ll give you two versions of my story. First the short version.

Readline, you bane of [...]

Tribute

A version of Tenacious D’s “Tribute” that I’ve never seen or heard before:

When single-table inheritance attacks

Photo by DarlingSnail

Rails provides a very quick and easy way to implement single-table inheritance (STI). The implementation of STI in Rails is so trivial as to make gotchas nearly unavoidable. I’ve spent a couple weeks ignoring, and later dealing with, one of these issues.

As described previously, I’ve [...]

Talkin’ softball

I’ve watched each Simpsons episode of the new season and they’ve been pretty good. No Season 3, but really what could be?

has_many_polymorphs and checkboxes

Previously I discussed getting my feet wet with has_many_polymorphs. In that article I promised a follow-up dealing with checkboxes in a polymorphic world. As I started keying the article, I ran into a much better description of the overall issue by Dylan Fareed (I presume) at I Am Still Alive. Take a [...]

Use Me

D’Angelo is a talented musician. One superficially minor talent he has, which actually turns out to be quite important, is musical taste. Here he is with David Sanborn et al. performing a cover of Bill Withers’s “Use Me.” Hopefully we’ll get another midnight-laced D’Angelo album yet this decade.

Rails migration max key length error in MySQL

I created a has_many_polymorphs table for a project that contains announcer_id, announcer_type, announeable_id and announceable_type. All those types are a necessity since we’re working double-polymorphic here. I wanted an index, which is unique on those four combined values. This was in my migration:

add_index :announcements,           [:announcer_id, :announcer_type, :announceable_id, [...]

A model diagram for your Rails application

Photo by always13

Recently I started working on a fairly large existing application. Lots of stuff going on, and I wanted a visualization of both the model and controller classes to make me feel that indeed the application could be encapsulated. In my search, I ran into two [...]