Django Template Tag for Dictionary Access
Code: , , ,
Comments Off on Django Template Tag for Dictionary Access

About a million times when writing Django pages I’ve been iterating through a list of objects and wanted to look up a value in a dictionary keyed by object.id. But you can’t, the built-in tags don’t allow it.

Continue this post

My Four-Year Patch
Code:
Comments Off on My Four-Year Patch

I’d actually forgotten it and had to scratch my head a bit when I got the message my ticket was closed. In August of 2003 I submitted a patch to Fluxbox to allow users to hold Alt and middle-click to push a window to the bottom of the stack. The source to Fluxbox has changed so much I can’t even find the section of code that the patch was written for, so I suspect that my ticket was closed when a developer swept through old tickets and recognized this as done.

Painless Upgrade to Rails 2.0
Code: , , , , , , , , , , ,
Comments Off on Painless Upgrade to Rails 2.0

I spent a dead-easy 2.5 hours last night updating NearbyGamers to Rails 2.0. My svn commit message read (with links added here for convenience):

Continue this post

Drifting Into Test-Driven Development
Code:
Comments Off on Drifting Into Test-Driven Development

About two years ago I first read about Test-Driven Development on the c2 wiki. It’s a simple plan: before you write code, write the tests that will exercise it.

Continue this post

Choose Your Candidate
Biz: , , ,
Comments Off on Choose Your Candidate

I haven’t posted a work update in a while, because mostly I’ve had a lull between projects and a new coworkers, so we’ve been cleaning out the bug and minor feature list. There’s a really neat project I want to link to called
Choose Your Candidate that I was only peripherally involved with (I gave advice for how to do the ranking math).

Continue this post

An Academic Inconvenience of Python
Code:
Comments Off on An Academic Inconvenience of Python

Sometimes Python’s roots in academia bug me. Lots of functions have a computer science feel instead of a software development feel. Here’s an example I just ran into: I wanted to fit as many sentences as possible from a long text into 255 characters. So I wrote:

Continue this post

Because Internet Explorer is a Failure, That’s Why
Code: , , , , , ,
Comments Off on Because Internet Explorer is a Failure, That’s Why

About once a month since Firefox came out and was promptly recognized as a six-gallon bucket of awesome I read a blog post about how developers are lazy, shiftless bastards because they don’t want to support Internet Explorer anymore. Most recently I read Brian Reindel make this claim, so I’m going to pick on him while I rebut this insult.

Continue this post

Keep Ruby Gems in Your Home Directory
Code: , , , ,
Comments Off on Keep Ruby Gems in Your Home Directory

I like keeping my Ruby Gems in my home directory. I don’t have to type sudo in front of every gem command, it’s easier to remember the path to them when I want to read their source, and I don’t have to worry about a sysadmin on a shared host updating a gem before I test it. Here’s how to make those benefits yours:

Continue this post

How To De-Asshole-ify Links
Code: , , , , ,
Comments Off on How To De-Asshole-ify Links

I loathe sites that set unvisited and visited links to be the same color. There are exactly two reasons that sites do this:

Continue this post

Post: Politics and Blogs
Biz: , , , , , , , , , , ,
Comments Off on Post: Politics and Blogs

The Politics team has kept me busy the last two weeks at the Post, so I’ve got plenty to mention here. The 2008 Campaign Tracker has gotten some big new features. Pull up Barack Obama (my former-hometown’s hero) and look at the column on the right side.

Continue this post