July 2010
1 post
On Interface Gems
Some members of Boston.rb had a great discussion at last night’s hackfest about library dependencies. In particular, we were discussing the problem of libraries (gems) that depend on other libraries and how Rubygems and Bundler both promote implementation dependency instead of interface dependency. “Interfaces? We don’t need no stinkin’ interfaces!” I hear you cry....
June 2010
1 post
Power-Law Distributions and Code Metrics
Existing Metrics Tools
The Ruby community has a wealth of tools to measure code:
Saikuro for cyclomatic complexity
rcov for code coverage
churn for finding code that changes a great deal over time
Flog for finding complex code
Flay for finding duplication in code
MetricFu, which packages many of the other metric tools together
The Power-Law Problem
The underlying behavior that...
May 2010
3 posts
The Stuff of Stuff
A beautifully-laid out piece of analysis from Steven Pinker’s The Stuff of Thought on how the brain models stuff:
At first glance, the conceptual distinction between an object and a
substance seems to be captured in the linguistic distinction between a
count noun and a mass noun. Count nouns, like “apple” and “pebble,”
tend to be used for bounded hunks of matter....
Holy Jeebus!: Saddened by the heat @lessconf is... →
I was just perusing some of the tweets on the @lessconf twitter stream and started backing up through some of the conversations. Jeebus, it’s crazy-town out there. Several people called the guys at Less out for the fact that the speaker lineup for LessConf is all-male and all-white. Additional…
The discovery, in the early Web browsers, that reasonably-typeset text [that]...
– Tim Bray, “HTML5 and the Web”
March 2010
1 post
I'm a Poet?
When a poet’s mind is perfectly equipped for its work, it is constantly amalgamating disparate experience; the ordinary man’s experience is chaotic, irregular, fragmentary. The latter falls in love, or reads Spinoza, and these two experiences have nothing to do with each other, or with the noise of the typewriter, or the smell of cooking; in the mind of the poet these experiences are...
February 2010
4 posts
How Bose Lost a Customer for Life
A few years ago, my father gave me a pair of Bose’s QC-2 headphones. They were awesome. I wore them while working at coffee shops, on airplanes, and to get the most out of my Brahms and Decemberists.
Last week, alas, I broke a piece of plastic on one side of the headphones. It’s the bit that slides along the headband and swivels. It’s a pretty key element, especially given that...
Trash Day and the Fall of Civilization
Today is trash day. That’s the day wherein we gather up all of our banana peels, used dental floss, socks with holes in them, and broken plant pots and put them on the curb for the nice garbage men1 to collect it. That’s the good part.
Today is also recycling day. That’s the day wherein we gather up all of our wine bottles, empty dental floss containers, and...
Staff Bio
Some day I hope to have a bio as creative as the ones on the Bandcamp FAQ. For example:
Shawn Grunberger helped negotiate the Peace of Westphalia in 1648. It was nontrivial.
Chuck Lorre Productions, #275: Ask Chuck!
Dear Chuck,
At a recent dinner party, I found myself in an awkward situation when the host, a devout atheist, sneezed between spoonfuls of his gazpacho. Without thinking, I said, “God bless you.” He gave me a withering look and said, as if to a child, “Golly gee, I sure hope he does.” The other guests exploded with laughter, while I imploded with humiliation. To avoid future embarrassment, what...
January 2010
11 posts
An Open Letter to Frank D. Wagner
An open letter to Frank D. Wagner, Reporter of Decisions of the Supreme Court of the United States:
Dear Mr. Wagner:
In reading through the slip opinion of Citizens United v. Federal Election Commission, I noticed a grammatical error. Associate Justice Kennedy, writing for the majority, quotes McConnell, supra, as follows:
Section 311 disclaimers provide information to the
electorate,...
Under the majority’s view, I suppose it may be a First Amendment problem that...
– John Paul Stevens, in Citizens United v. Federal Election Commission
But your children aren’t really yours. They have lives of their own. So...
– Wil Shipley, as quoted in The Washington Post
If the problem has a solution, worrying is pointless, in the end the problem...
– Zen proverb
OSX + Multiple Network Locations + Proxies
At work I’m behind a proxy. At home I’m not. OSX provides a nice way to handle that problem: multiple network locations. You can create a location (“work”) with some proxy settings and one (“home”) without, then simply switch between them as you commute back and forth.
Those proxy settings work great for Safari, iChat, and iTunes. They work reasonably well for...
A Fast Random Lookup in SQL with Conditions.
If you want a random element from a table from ActiveRecord, you might be tempted to do this:
def MyModel.random
find :first, :order => 'RAND()'
end
That has two unfortunate problems: it’s unbearably slow for large tables, and it doesn’t work on all databases. To fix those problems, you might try the technique from hgimenez’s fast_random:
def MyModel.random
if (c =...
Getting Rails 3 (pre) up on OSX
I sat down to work on the most recent Bugmash. First I followed Yehuda Katz’s instructions on getting started with Rails 3. Those instructions worked great for running an app on Rails 3, but they’re not quite sufficient for working on Rails itself. Here are some pointers for that, as well as a few unresolved issues:
Install the latest MySQL using the DMG version. By default, it...
Lessons in Toilet Paper Engineering
First, a wonderful brochure created by Chris Rugen, author of an equally informative blog post.
Second, two different Squidoo pages.
Third, a new poll (read: marketing campaign) by Cottonelle.
The evidence is clear, folks. Friends don’t let friends hang toilet paper under.
Wine Review: 2006 Calatrava Sauvignon Blanc
Rating
★✩✩✩✩
Winery
Calatrava
Vintage
2006
Country
Colchagua Valley, Chile
Color
White
Name
Sauvignon Blanc
Grape
Sauvignon blanc
Price Paid
$4.00
Good for
foisting off on others at college house parties
Bad for
a bread and cheese plate
Smells a bit of acetone and citrus rind. The most redeeming thing I can say about this wine is that I can drink a full glass of it without...
Wine Review: 2007 Carmim Terras d'el Rei
Rating
★★✩✩✩
Winery
Carmim
Vintage
2007
Country
Portugal
Color
Red
Name
Terras d’el Rei
Grape
Trincadeira, Castelão, Moreto, Aragonês
Price Paid
$4.00
Good for
not sure. Cheetos?
Bad for
first dates
Sometimes you find a rare gem in the discount bin. This isn’t one of those times. It’s … wine. It’s definitely not horrible wine.
December 2009
1 post
Improved design process, not a perfectly realized building, is the most valuable...
– Matthew Frederick, 101 Things I Learned in Architecture School
November 2009
24 posts
3 tags
Slaying the Autocomplete Dragon
Designing an autocomplete framework is hard. Really hard. How do I know? I need one, and I need it to perform several different duties: as a search box, as the “TO:” field for a social network messaging form, and as a tag list. Each use case demands autocompletion, but they behave differently in subtle yet important ways.
First I tried jQuery.autocomplete, but that uses a silly...
3 tags
I was doing some comparison shopping at Apple today. Here’s a shot of Apple’s “Employee Purchase Program” store:
And here’s the same page at Apple’s “Education” store:
Notice any differences? They’re subtle, to be sure.
The EPP store has a Favicon, while the EDU store does not. Winner: EPP.
The search box on the EPP store is...
Wine Review: 2007 Ruffino Chianti
Rating
★★✩✩✩
Winery
Ruffino
Vintage
2007
Country
Italy
Color
Red
Name
Ruffino
Grape
Sangiovese, I assume
Price Paid
$9.99
Good for
grad school house parties, particularly if you can get it cheaper than I did
Bad for
romantic dinners
This wine has surprising legs and a potent alcohol smell for only being 12.5% alcohol. Other than the alcohol scent, though, there’s...
RT @stephenfry: Dreamt I solved the Poincaré Conjecture using a tennis racket, teapot & rubber sheet. It really worked but vital steps gone
RT @Yardboy: “‘Washington needs a dose of Florida common sense.’ Crist, you couldn’t be more cliché if you were gay and married your beard.”
RT @janettecrawford @dougsdigs Totally awesome Halloween window projection in KC: http://bit.ly/pubm5
Reading through Stephen Few’s comments on the data visualization examples on his site: http://www.perceptualedge.com/examples.php
Gorgeous and useful new @storenvy updates
I’m trying to make pinstripes on a large canvas in Acorn. Zoom out -> crooked lines (don’t snap to grid). Zoom in -> can’t do whole vertical
A bit sad that only one position on the Somerville ballot is contested today. #bostonelection
Just nominated @lessallan for Funniest Person to Follow http://mashable.com/owa #openwebawards
Just nominated http://grasshopper.com for Social Media Ad Campaign http://mashable.com/owa #openwebawards
Just nominated @techpickles for Most Educational to Follow http://mashable.com/owa #openwebawards
Just nominated http://www.fivethirtyeight.com/ for Best Political News Site http://mashable.com/owa #openwebawards
Just nominated http://thedailybeast.com for Best Online Newspaper http://mashable.com/owa #openwebawards
trying to put together a meeting invitation for about 20 people and Entourage keeps crashing. #moremicrosoftsoftwarethatsucks
Settling into another Monday at the office…
Too much to accomplish to do NaNoWriMo or PragProWriMo. They do sound both fun and useful, though.
I don’t suppose anyone has a copy of the Diablo II expansion pack. (HT to my cousin Alex for getting me re-addicted to DII)
I just found a “Bonnaroo 2009” CD in my apartment with a setlist written on “Husch Blackwell Sanders” paper. Does this belong to you?
Watching the MIA/NYJ game because it’s what’s on at the restaurant. Makes of think of @garyvee. I hope he’s well.
RT @Yardboy: “Few things in life match the thrill of a marathon.” Hey, whatever helps you freaks sleep at night, sure, go with it.
mmm, garlicky green beans
October 2009
169 posts
After a day of reading crappy iPhone dev tutorials, I finally found one that taught me something: http://bit.ly/p35Gm. Thanks, @b00giZm
Apparently I’m a “Confirmed Lady Boy.” http://bit.ly/22oJm3 I wonder how @chelseymroos feels about this…
I <3 salad