Thoughts on software craftsmanship.

This Week I Learned #5

Regular expressions in PostgreSQL, a terser where() syntax for ActiveRecord associations, signed cookies in Rails, and some tips for writing great error messages.

Continue reading...

This Week I Learned #4

An assets gotcha to avoid when upgrading from Rails 3 to 4, keeping WordPress theme comments around with Sass, and an intro to one of my favorite new development tools: the virtualization-management tool Vagrant.

Continue reading...

This Week I Learned #3

A robots.txt gotcha, cleaning up asset output in Rails’ logs, reversing a specific git commit (in a way that’s itself reversible), displaying errors with ActiveAdmin, and—spoiler alert—the keyboard shortcut for “View Source” in Chrome on a Mac is Cmd + Opt + u

Continue reading...

Bulletproof Icon Fonts

In excellent detail, Filament Group enumerates the issues around using @font-face to serve up UI icons as a font. It’s a powerful technique to which I often turn, but it’s not without its caveats. Fortunately, the Filament folks have two best-practice techniques for using icon fonts, one for mission-critical icons and a simpler one for more decorative icons. Both techniques require javascript for feature detection, but it’s fairly simple and they’ve even packaged it up in a library cleverly named A Font Garde.

Continue reading...

This Week I Learned #2

How Ruby’s super really works, DRYing out Heroku toolbelt commands, passing Ruby exceptions to blocks, and one weird tricks for making a robot voice speak my git commits.

Continue reading...

Unwrapping Rails 4.1 a Little Early

I know it’s not Christmas yet, but I can’s help opening one of my presents early: Rails 4.1 beta from Rails core! There are some cool new features I want to try out, and since 37 Signals is apparently running the beta in production for Basecamp, it has to be pretty darn stable. So let’s get to it.

Continue reading...

This Week I Learned #1

This is the first post in what I hope will be a weekly feature on things I’ve learned which are neat enough to mention, but not big enough for their own post.

Continue reading...

The Single-Responsibility Principle Applied to CSS

Here’s some sound advice from Harry over at CSS Wizardry. When I first started writing CSS, I mistakenly made a religion of “clean markup,” which I took to mean HTML with the fewest number of classes and IDs possible. But after years of building—and more importantly here, maintaining—websites, I’m beginning to see the virtues of this (and its accompanying CSS):

Continue reading...

What Screens Want

A timely talk by Frank Chimero from this year’s Build conference in Belfast. He drives home the point that the internet isn’t done yet, that it can still be shaped as we want it, which is a good thing because, he states plainly, “things are starting to suck.”

Continue reading...