Using Rails 3.0's notification system

How to use Rails 3.0's new notification system to inject custom log events. Ever wondered what the notification/subscription stuff in Rails 3 is? Wonder no more! I just used this to add performance logging around some Cassandra stuff in our Rails 3 app. Once you get the hang of it, this is really rad stuff.


Computers should do the boring bits

Future-proofing, Uniform Access, and Masquerades:

Boring work should be a cardinal sin in programming: it indicates something that the computer should be doing but isn’t.


Michael Feathers on how code grows

Festering Code Bases and Budding Code Bases:

Some teams produce what I call a festering code base. In a festering code base, the team changes the code primarily by adding code to existing methods and adding methods to existing classes. The results are predictable. Classes and methods grow malignantly, eventually becoming thousands of lines long.
Better teams produce budding code bases. Developers create new classes and methods and delegate work outward. Periodically, they collapse structure back into a simpler form, but the dominant trend is to grow the code by creating new structure.

I'd never put much thought into how code bases grow in the past. Feathers has some interesting ideas here about the characteristics of good and not-so-good growth and how languages and tools might promote good growth.


Incremental deployment at GitHub

Over the past year, I've read a lot about how teams are deploying their software. I've known for a while that Google has the ability to roll out new code to a small percentage of their servers and ramp up the breadth of deployment if they like how the software is behaving.

Lately, I'm starting to see more and more teams implement that sort of functionality. Rick Olson describes how GitHub implements it in How we deploy new features, and includes links to how Forrst and Flickr do it as well. At Velocity, Paul Hammond explained how to build an application-specific kind of version control into your app.

I'm a little surprised that few libraries have emerged for managing this. It would seem that, given all the excitement about continuous deployment, automated rollbacks, and incremental rollouts, someone would come up with something that they think is neat enough to share. I suspect that in fact, this is a really ugly, deeply application-specific sort of thing, no one likes to look at how they do it, and that's why there is plenty of talk about how to do it, but no libraries making it a simple thing.


Curated Awesome, the 2nd


Curated awesome, the 1st

A bumpy subway wall, loving things for their Unix-y qualities, Kurt Vonnegut looking dapper, the final movement of Dvorak’s Ninth Symphony (originally his fifth), and a music video by Talib Kweli that makes me want to go get my hair cut. Oh, and I can’t leave out the connection between prototyping physical things and applications operating on large data, Ben Scoffield’s take on database taxonomy and a screed on reading one book per week.

(Editor’s note: I recently took to using Tumblr again. For a while, I’ve been curating interesting stuff here. But Tumblr has evolved into a really fantastic application for doing this. So, my policy going forward is to post my stuff here and curate other people’s awesome stuff over there. That said, I’ll probably do “best-of” posts, like this one, to keep you interested and informed.)


Dallas could get a pedestrian bridge

Trinity gift is $10 million for pedestrian bridge. Catering to pedestrians, in Dallas? Surely you jest!

I’ll just sit here and quietly hope that the plans for an urban park around the Trinity aren’t derailed by everything that is politics.


Ghostbusters then and now

What happens when you take scenes from Ghostbusters and see how New York used to look and how it looks today? Pretty awesome, actually. In two parts.


Birthing Born to Run

The birth of Born To Run. On the creation and evolution of the song and album. Great read for Bruce-o-philes.


Ain't talkin' 'bout the man

Here’s a fun game. “The Government”:

Try something. Every time somebody complains about the evils or failings of “the government,” strike out “the government” and see what results.

Often, simply striking out “government” reveals a completely different, and far more useful, commentary.


Polyglottin' your data

Polyglot persistence:

I think that many of the NoSQL crowd either fail to either recognize, or to properly describe that their preferred databases don’t replace applications like MySQL and Postgres, just as Ruby doesn’t replace Java. Instead, the explosion of these new options for persistence just work better for some domains (and worse for others).

Ben Scofield’s spot-on here. One of the many transitions we’re undergoing is from “I’ll use MySQL most of my career” to “I’ll tinker with a different database for every project over a couple years and then pick and choose the best as time goes on”.


Tons of FP fun

A programming language zoo, a week of FP heaven, rewriting PHP with Haskell and a game for kids of any age to learn the untyped lambda calculus. Did I ever mention it’s a good time to have a fascination with functional programming languages?


On American political insanity

Still crazy after all these years:

Politicians should tone down the rhetoric. Protesters should read some history before making Hitler comparisons. Talk-show hosts should stop pretending that paranoid nitwits are asking reasonable questions.

The Economist does well to explain the insanity that is propagated by American political media. Reading articles like this help me stay sane. Also: ignoring media with deadlines shorter than a week, and consuming as much constructive satire as possible.


Gird your greyscales

Logan Hicks has some really great subterranean photography going on. (Via Infrastructurist)

And if you like that, you’d probably also like some Russian submarines, their interiors, and their underground bases.

While we’re dwelling on intriguing/depressing concrete structures: one dude’s home built into a former missile silo and the Oak Ridge plant where the materials for the Manhattan Project were refined.


Getting to know your bookshelf

The Book Stalker - Rands figures you out by your bookshelf:

Where’s your bookshelf? It’s this awkward moment whenever I first walk into your home. Where is it? Everyone has one. It might not be huge. It might be hidden in a closet, but in decades of meeting new people, I’ve never failed in finding one and when I do I consume it.

Here’s mine from almost two years ago (plus more):

Bookshelf, after

I’ve since expanded to two shelves and look forward to the day when I can devote a whole wall to just reading. As I often tell myself as I sit down to start, “reading is the best”.


Free Parking Is Not Free

Free Parking Isn’t Free. Turns out those parking lots, while sometimes handy, are actually pretty gnarly, if your goal is to build a nice place to live:

Throughout the 1940s and 50s, as automobile use became prolific in the United States, parking became a problem, congesting streets and overflowing into neighbors' lots. In response, most municipalities instituted off-street parking minimums requiring developers to provide all the parking that the residences or shops would need on-site. This seemingly sensible notion has created a cascade of problems. It encourages sprawl by spreading buildings apart to make room for more parking (requirements usually demand more area for parking than the building it supports). It also weakens urban design, as urban buildings are torn down to make room for desolate surface lots, and hulking parking garages sprouted in downtown areas. It discourages revitalization of existing historic buildings, since developers have trouble meeting modern parking requirements in neighborhoods that were built before auto dominance. And the requirements drive up the cost of development: parking spaces can cost between $10,000 and $50,000 – typically more than the cost of the car that occupies it. High parking requirements can raise the price of homes and apartments by $50,000 to $100,000, a serious challenge to affordability.

When I have more money that I know what to do with, I’m going to start buying up parking lots and turning them into parks. It’ll be my little way of sticking it to people who drive over-large cars.


Kill your menubar darlings

The Menubar Challenge - everybody, clear out your menubars! It’s one of my secret productivity weapons, I highly recommend it. Also, read everything on Minimal Mac; it’s the best.

Here’s my current attempt to use as little as possible in my menubar:

OS X menubar.png

LittleSnapper normally isn’t running, so that doesn’t count. If I could, I would run DropBox and FastScripts without menubar icons. I’m still not sure I like having a clock visible at all times, but at least analog clocks are classy-lookin'. I’d love to remove the battery icon, but it appears doing so disables the “your battery is tapped” warnings, leading to spontaneous laptop sleeping.


My setup

Shawn Blanc has been cataloging sweet Mac setups. Last week, he published a description of my own creative den. If you find this sort of thing as intriguing as I do, also check out The Setup.


Balmer =~ Tarkin

Steve Ballmer:

Evacuate? In our moment of triumph? I think you overestimate their chances.

OK, maybe that’s Grand Moff Tarkin. Either way, I’m considering this my birthday present from John Gruber.


Disastersploitation

DISASTER!

Crank that funk.