Reflections on craft.

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...