codahale.com٭blog

This is my old blog. My current writing is here: codahale.com

BloglinesReader v0.2

So either Bloglines changed its OPML structure, or my code was really weak sauce. Either way, what wasn’t working earlier today is now working like a champ, and after spending 30 minutes fussing around with PHP, I need to go take a shower. Ugh.

Anyhoo, BloglinesReader v0.2 has some bug fixes, added respect for escaping HTML entities, plus some other things I’ve probably totally forgotten about.

Go get it!

Comments Off

First there is a blog, then there is no blog

My good friend Peter Dolan is up to his usual crazed hijinks. This time he’s writing a blog without words.

This is your brain on math, kids. It’s actually quite pretty.

Behold: a numblog.

The blog is dead! Long live the numblog! Long live doing seriously weird things to web pages!

(Mmm… whitespace…)

Comments Off

Off To FeedBurner; Me vs. Car

So, I switched the feeds here over to FeedBurner, mainly in hopes of getting Google to finally get that my site is not just a collection of empty RSS2 files. Yeesh.

In other news, I got hit by a car last Thursday night. I’m fine, really: missing some skin on my knee and elbow, but my rib right below my right pec hurts like hell. I don’t know if I pulled a muscle or cracked a rib, but the pain is a nuisance, not a grinding horror, so I figure I just try not to get hit by cars until it gets better. Yeah, that’s my health plan these days. Duck and cover.

In other news, the search plugin I’ve spent so much time on recently is about done. It’s cleaner than hell, does a decent job of ranking results, plays very nicely with associations, and uses only two database queries per model. It’s wonderfully extensible, rather compact, and requires that you use Rails Edge (soon to be 1.1!). I will post more details perhaps this weekend.

Until then, remember: that car does not see you and will not signal or otherwise indicate its intention to merge right over your ass.

1 comment »

Google Limbo

Well, I’m not terribly sure why, but for whatever reason, Google decided that the authoritative version of each of my posts was the content-less RSS2 comments feed:

Witness the lack of content.

Now, I can understand that my being number one in Google’s results for “ruby howto” may have been a fluke. That said, I find it absolutely insane that searching for “Coda Hale” doesn’t return any hits from my main website which is updated every week or so.

Whisky tango foxtrot, Google?

Obviously I’m miffed because this happened right after I got Mint, so I get to see the number of people coming to this blog dropping off until, instead of a histogram, it just has a cartoon of some sad mothballs. Anyways, I’ve removed links to the RSS2 comments feeds (sorry, world) and set up a 301 redirect from them back to the actual content.

DO YOU HEAR ME, GOOGLE? I’M RIGHT OVER HERE. WITH THE CONTENT.

I’ve even delayed releasing a few plugins because no one would notice, so to commemorate Google rediscovering this site (knock on wood), here’s a taste from an upcoming plugin:


class Person < ActiveRecord::Base
  has_one :teddy_bear
  has_many :robot_enemies
  searchable_by :fields => [:name, :description, :teddy_bear, :robot_enemies],
                :include => [:teddy_bear, :robot_enemies]
end

class PeopleController < ApplicationController
  def search
    @results = smart_search :for => params[:query],
                            :in => [Person],
                            :limit => 10
  end
end

And I’ll say this much: it’ll even work in SQLite.

2 comments »

ResponsibleMarkup v0.1: Unit Test Your Way To Responsible Markup

I’m proud to announce a new Rails plugin: ResponsibleMarkup. It allows you to write functional tests for your Rails application which test for things like:

  • (X)HTML markup validity
  • Backwards-compatible empty HTML elements
  • Well-formed doctypes
  • Unobtrusive Javascript
  • Well-formed XML prologs
  • Separation of display and structure in your markup

You can check out the documentation or go ahead and install it:


./script/plugin install http://svn.codahale.com/responsible_markup/trunk

Or, if your application is source-controlled via Subversion:


./script/plugin install -x http://svn.codahale.com/responsible_markup/trunk
6 comments »