25 Jan 2011

Simpler API for Zend’s built-in Firebug Logger

Zend Framework has functionality to send messages to the Firebug console (via Firefox’s FirePHP addon), but if you’re not using the ZF front controller, the API is a bit of a pain. Besides your instance of Zend_Log, you must keep track of a few additional objects just to manually flush the headers after all your logging calls. Since I knew the old FirePHP class didn’t need this follow-up step, I figured I could just flush the headers after each send.

The result is FireLog. On the FireLog instance, calls to methods like log(), info(), warn(), etc. are proxied to an internal Zend_Log instance, while the methods send(), group(), and groupEnd() are proxied to the static methods on Zend_Wildfire_Plugin_FirePhp. In both cases the headers are set immediately using some simple ZF subclassing. Read the rest of this entry »

15 Jan 2011

Goodbye Trish Keenan

The singer of one of my favorite bands passed away.

It is with great sadness we announce that Trish Keenan from Broadcast passed away at 9am this morning in hospital. She died from complications with pneumonia after battling the illness for two weeks in intensive care.

Our thoughts go out to James, Martin, her friends and her family and we request that the public respect their wishes for privacy at this time.

This is an untimely tragic loss and we will miss Trish dearly – a unique voice, an extraordinary talent and a beautiful human being. Rest in Peace. [Warp records]

12 Jan 2011

Content Delivery and Format Fail

screenshot from Ney Year's DaeThe pic on the right is from The Berrics’ “New Year’s Dae” video. The skating is amazing—well worth a dollar—and the site’s registration and checkout was painless, but the rest has been a disappointment:

  • There’s no way to download this “downloadable part,” as it’s advertised. You must install an Adobe Air application, which downloads the video.
  • There was nothing in the checkout process to let me know I needed to install Air first. The only link to “download instructions” (who would think they need to read this?) was on the “add to cart” page. Once most people have checked out they’ll have to run to Google what an .air file is.
  • The app isn’t digitally signed, so the publisher reads “unknown” and it asks for “unrestricted” access to my system. Does not inspire trust.
  • You can only watch the video via the app! So no fancy controls you might want while, say, watching a skateboarding part.
  • Considering I downloaded 150MB for a 5 minute video, the quality is astoundingly bad. See the horizontal lines in the screenshot? They’re a constant distraction and it all looks even worse at full screen. Every video on the The Berrics site looks better than this. Like most Rodney and Daewon parts, the filming is just not exciting, but it’s forgivable.
  • Since I downloaded it on my wife’s PC last night, the download link in my account is already “expired”, so I can’t install it on mine.

The pic is actually from a copy I found immediately on Vimeo, highlighting the absurdity of this level of copy control. Lesson: Only paying customers have to deal with DRM nonsense.

Update: 5 days later, the video no longer plays.

4 Jan 2011

2000 Brian Wilson “Pet Sounds Symphony” Show Review

[More nostalgia: Copied from an e-mail I sent Oct 18, 2000.] Read the rest of this entry »

4 Jan 2011

Brittle Stars 2000 East Coast Tour Diary

[Hey, only 11 years late. Found this rummaging through some old files. With the title "Tour diary – achingly detailed version", you know it's gonna be riveting.] Read the rest of this entry »

24 Dec 2010

Gainesville: PHP/Javascript Developer Position Open

The Office of Distance Learning is seeking a web programmer with considerable experience with PHP, Javascript, and SQL to aid in the creation of and maintenance of several web and mobile applications.

The person we’re seeking will need a strong understanding of and experience with:

  • PHP5
  • Javascript
  • object-oriented and functional programming styles
  • related technologies such as SQL, CSS, the HTML DOM, Apache, and HTTP

Preferred applicants will be able to demonstrate:

  • sites/projects worked on, including open source projects
  • code created that is highly extensible, loosely coupled, testable, etc.
  • ability to create APIs/frameworks to be used by others
  • intuition of impact of code on underlying systems and client-side experience
  • ability to communicate well with teammates and end users

The applicant must be comfortable:

  • coding with third party libraries like Zend, jQuery, YUI, etc.
  • customizing third party applications like WordPress
  • using source control and documenting code

The Office of Distance Learning is an exciting, creative environment where we manage and customize applications like WordPress, Moodle, and Elgg, and serve thousands of users.

Search jobs.ufl.edu for Requisition number: 0806823

19 Dec 2010

Allen Hunt: Gay marriage is worse than incest

On December 13th (just rebroadcast on 97.3 The Sky), radio host Allen Hunt, in a conversation about a recent adult incest case, stated that “incest is easier to defend than gay marriage because…at least incest is opposite sex and has the capacity to create new life.” Earlier the implication was made that gay marriage is “re-engineering society” inviting a slippery slope to incest marriage.

I’m all for freedom of speech and have no desire to legislate disgusting views like this off the radio, but more rational people need to pay attention to what hosts like Hunt/Savage/Levin are broadcasting in their community, and be willing to let local stations and their advertisers know when these hosts step over the line.

Update: BTW, Hunt’s brilliant argument—sexual behaviors that might create life are better than ones that don’t—would imply that incest, sex with young girls, and rape would all be preferable to gay sex, hetero sex using contraceptives, and masturbation. If you’ve ever enjoyed sex without intent to conceive, here’s to the Constitution for stopping big thinkers like Hunt from using the government against you.

17 Dec 2010

Magical Translator Window

Indistinguishable from magic, and available in your pocket.

Your jetpacks have arrived!

8 Dec 2010

Closure Compiler is smarter than you

I’ve known about Google’s Javascript minifier, Closure Compiler, for awhile, but after sending a couple snippets through it today I realized it’s a pretty impressive piece of work.

Input:

function howManyMatch(arr, pattern) {
   var l = arr.length;
   var total = 0;
   var i = 0;
   for (; i < l; i++) {
       if (pattern.test(arr[i])) {
           total++;
       }
   }
   return total;
}

Output:

function howManyMatch(b,d){for(var e=b.length,c=0,a=0;a<e;a++)d.test(b[a])&&c++;return c};

Or with whitespace re-added:

function howManyMatch(b, d) {
    for (var e = b.length, c = 0, a = 0; a < e; a++)
        d.test(b[a]) && c++;
    return c
}

Optimizations:

  • shortened parameter names and removed unneeded semicolons (YUI Compressor already did this much)
  • combined multiple var statements into one declaration
  • moved that declaration into the first section of the for loop (to save one semicolon!)
  • removed brackets around blocks with only one statement
  • replaced if statement with && operator (to save two bytes)

Several of these are often done by JS devs by hand. With closure compiler on tap, we no longer have to. Just concentrate on readability and maintainability and let CC worry about size optimization.

4 Dec 2010

Less is More: Billie Davis 1969

“Nobody’s Home to Go Home To” was a 1969 B-side for Billie Davis that I have a weakness for. The bass playing is incredible and the song cleverly jumps between three keys, but the strings and backing vocals kind of take over the recording. I noticed this morning that they’re both panned hard right and the vocal is centered, so I got to work.

  • Dumped the right channel to make a mono track of the left, leaving all the essentials: drums, bass, piano, elec & acoustic guitars, a quiet organ, tambourine, and the vocal.
  • Made several surgical cuts to bass frequencies that took over the mix at points.
  • Mitigated some incidents of “breathing” and “pumping” in the breaks. This is where a compressor had turned up the gain while the band’s last note of a section was fading out. This can be done to great effect (after the snare hit at 0:21 in Elvis Costello’s “Busy Bodies”), but on this track it just sounded like a someone with coffee jitters was leaning on a fader, and it made the snare hits that preceded the following sections unnaturally loud.
  • Raised some high frequencies to bring some sparkle to the vocal
  • Added a tiny bit of stereo echo to widen the sound

In the result, you get a more interesting intro (IMO) and a tighter rhythm section, and you can actually hear the piano, the backbeat snaps of the electric guitar, what sounds like a low temple block on the snare hits, and Billie’s quiet falsettos at the end of the choruses.

Billie Davis – Nobody’s Home to Go Home To (mrclay.org mix)

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Here’s the original [youtube].