Archive for October 2009

Underscore.js

jQuery is lighter (and often easier to use) than Prototype, but it doesn’t have as rich of a set of functions. That’s why I’m intrigued by Underscore:

Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects. It’s the tie to go along with jQuery’s tux.

Underscore provides 44-odd functions that support both the usual functional suspects: map, select, invoke — as well as more specialized helpers…

Not that every site needs one more framework, mind you, but there are select places where I can see this being useful.

The Philip DeFranco Principle

Last week, when bored, I pulled out my iPhone, opened up the YouTube app, and decided to see what the most downloaded clips were for that day. Amidst the teen blather about Twilight and non-English clips of soccer goals was that day’s episode of The Philip DeFranco Show. There’s a lesson in that show.
(Warning: DeFranco’s show is not always SFW.)

DeFranco’s show is a three-minute monologue on the day’s events, sort of a late-night show monologue for the YouTube crowd, complete with more frank language. DeFranco knows how to play to the crowd; he’ll frequently mention some starlet, even if just in passing, and then work her name into the show’s title and use a photo of her as the show’s thumbnail. But that’s not the only thing contributing to his popularity; for that, you need to watch the editing.

View any episode and you’ll notice there’s a cut after practically every sentence (and sometimes cuts in the middle of sentences.) This makes the show not only fast-paced, with each line coming rapid-fire after the one before it, but also makes the show shorter. By removing every half-second of dead air, DeFranco shaves seconds off of his clips.

The savings are undoubtedly minor, but there’s a psychological value. Sure, that $3.99 item isn’t really much cheaper than the $4.00 alternative, but it feels that much cheaper because of the 3 instead of the 4. Similarly, a YouTube clip that clocks in at 3:18 isn’t that much shorter than one that’s 3:24, but it feels it. In an era of short attention spans (especially on YouTube) and lengthening download times, trimming off six seconds can translate into more page hits.

Does it work? Again, shaving off time is far from the only thing contributing to DeFranco’s success, but it’s at least a contributing factor: one of his clips from last week got 2.5 million views. That rivals some major-network TV shows.

What’s the lesson, not just for YouTube clips but Web development in general? Bandwidth still matters. Broadband might be widespread, but people still don’t like waiting. Unless they’ve clicked on something where they expect a long lag (like a video clip or mp3), users will drop off pretty quickly. Major sites like Amazon and Yahoo saw pretty startling dropoff rates when they increased their page sizes by small amounts.

So before you add one more 20KB banner ad or that 10K of analytics JavaScript, consider the tradeoff. Is it worth it? Will the added value outweigh the lower traffic? Or are you better off, like DeFranco, going leaner but with more hits?