Thoughts on software craftsmanship.

Dynamic Error Pages With Rails 3.2

I’ve long struggled with how best to implement dynamic error pages in Rails. The default solution, simply rendering static HTML files from the public root, is appropriately simple for 500 errors where your app may not be capable of rendering a dynamic page, but falls short for less grave errors, especially the common 404. I’ll often want to render a 404 using my application’s layout so as not to confuse users, include partials such as for a search form, and I recently worked on an internationalized app where I wanted to translate the 404 message. Rails will serve localized static pages (e.g. 404.en.html,, but I’d rather keep everything in my locale YAML files and render it with I18n.t('not_found').

Continue reading...

Form Follows Function

Form Follows Function is a delightful, growing series of experiments by Jongmin Kim, mainly involving the <canvas> element, designed to show off how HTML5 can accomplish some eye-popping effects the likes of which used to require Flash. (Though ironically, the creator’s website requires Flash to view.)

Continue reading...

Building the Future

I had a revelation a few years ago while thinking about Minority Report, specifically that scene in the beginning when Tom Cruise is interacting with the futuristic crime computer like the conductor of an orchestra. (If you haven’t seen it, Tom Cruise is in front of a translucent desktop full of media—documents, videos, images—which he manipulates with his hands in midair.) I realized that one day websites might work like this. Not that they necessarily should, but that they could. It suddenly seemed very silly to be looking for inspiration toward the top sites of last year, or even current trends. No ma’am, not when there was a future to be built.

Continue reading...