Tuesday, April 25, 2006

I Might Lose on Jeopardy, Baby

A few weeks ago, Jeopardy held their online tryouts for the west coast. I didn't do nearly as well as the time I auditioned in person in Los Angeles. The categories were a little bit vague, the questions a little more America-centric than is good for me. In cases where I had to guess, later when I checked my guesses, they turned out to be mostly wrong. (During the in-person audition I did a year and a half ago, even my complete wild guesses were mostly spot on.) To even be considered for further consideration, I needed to get at least 35/50 right, and later in looking up answers I wasn't sure of, I found about a dozen that were definitely wrong.

Since this test was for the whole west coast, I was extra nervous. There must be thousands of Silicon Valley geeks who would know their art history, American history, etc. better than me, who would take the test only because it was online. If too many people qualified, they might not let everyone audition, even if they qualified based on their score. About 2 weeks ago, I decided enough time had gone by that I hadn't made the cut.

Until today, when I got invited to an audition in San Francisco in June. Excellent!

Last time, I did great in the written test, great in the practice game, but didn't think I was that great in the practice interviews. This time, forget about cramming with trivia, it's all about being smooth in the interview!

Sunday, April 23, 2006

iTunes Cleanup: "Rolling Stones" vs. "The Rolling Stones"

As a database nerd, I'm bothered by inconsistencies in iTunes song data that seem easy to fix, but are too time-consuming for a large library.

I'm using a combination of Perl & Applescript to simplify the process of cleaning up information that is similar but not identical across different songs and artists. I wrap everything in Perl, and call Applescript only when necessary. That way, people on Windows (or even Linux) systems could use the code to identify problems, even if the fixes required editing the song info by hand. And on the Mac, the relevant songs can be automatically put into a playlist for later editing or fixing via other Applescripts.

For example, here's a little snippet that identifies all the artists who are represented as both "something" and "The something". Copy and paste it into the Terminal to run it.

grep "Artist" ~/Music/iTunes/"iTunes Music Library.xml" |
sort -u |
sed -e 's/>The />/' |
sort -d |
perl -e '

while($line = <>)
{
chomp $line;
if ($line =~ /Artist<\/key><string>(.*?)<\/string>/)
{
$artist = $1;

if ($artist eq $last_artist)
{
print "Inconsistent THE: [$artist] and [The $artist]\n";
}
$last_artist = $artist;
}
}
'

What this does is get an alphabetical list of all the artist names, with the initial "The" stripped off. If two consecutive names are identical, the full list of artist names included both the "The" and "no-The" forms.

Advantages:
  • All the songs for an artist will be filed under a single folder, rather than separate folders for "Beatles" and "The Beatles" and so on. Makes it easier to copy or transfer the files via the command line.
  • When going through the iPod "Artists" menu, you'll be able to get to all of the songs by that artist, instead of having separate entries with different groups of songs.
  • Having consistent names makes it easier to check for duplicate songs and weed out other sorts of problems.

Watch this space for more developments on this front!

Tags: , ,

Wednesday, April 19, 2006

Six Months in a Leaky Boat

I've joined the Berkeley Paddling and Rowing Club, as a nearby place for both fresh air and fitness. My particular build responds very well to rowing, rather than running or heavy weights.

I've got rowing in my blood from a great-uncle, Martin Boland, who was part of a record-setting crew in Newfoundland. Not only a record, but a record-setting record! The St. John's Regatta is the oldest continuously held sporting event in North America. The record stood for 80 years, which I believe (citation needed) is some kind of record for athletic records.

Oracle XE in the news

Good review here of the free Oracle "Express Edition" (XE) database. I'm waiting (i.e. pushing) for a Mac version, and would like to see it offered by hosting providers.

Oracle XE: It's Not Your Typical Oracle

Regarding the GUI options... I've tried a lot of them, from various sources, and have never been impressed. But SQL Developer (formerly "Project Raptor") is growing on me!

Monday, April 17, 2006

Life in the Green Lane - New York Times

Some Prius-bashing in the NY Times op-eds today. The idea of Prius mileage "plummeting" on the highway strongly disagrees with my experience.

In our first major trip in the Prius, from the Bay Area to Yosemite, we averaged 48.1 MPG in hours of highway driving to and from the Sierras. A Prius owner soon learns that although you can get great mileage downhill, going up and down the same inclined stretch of road burns more gas than an equivalent flat stretch.

On days when I commute (an hour plus each way, all on the highway), I've noticed that I can increase my average MPG by 1-3, after a few days of purely around-town driving. If I reset the mileage figures at the start, I typically see 52 MPG for the highway commute, vs. around 46 for local driving.

I've always heard that the city driving done by auto magazines is a little unrealistic, that they're babying the cars more than you could in real life. If so, perhaps the reviewers need to pay attention to the Prius's real-time MPG readout; ease up on the gas just a tiny bit at the right time, and you can maintain the same speed (or 1 MPH less) without the gas engine at all. Yes, even at high speeds on the highway.

I didn't notice any URLs of online resources to bolster the article's claim of bad highway mileage. Hope the author isn't just trying for controversy to boost the sales of his magazine...

Another problem with the article is the total straw man position regarding carpool lanes. Laws are being passed allowing carpool lane use based on a combination of mileage and/or emissions specs. See here for the California rules:

ELIGIBLE VEHICLES - SINGLE OCCUPANT CARPOOL LANE USE STICKERS

It's completely bogus for the writer to act as if anything labelled "Hybrid" is getting special treatment. Some non-hybrid cars qualify, and some hybrids don't.

Tags: ,

Saturday, April 15, 2006

Cookin' in the Kitchen

My recipe site has been languishing along with the rest of my personal site. Makes sense to spiff it up first, as it's near and dear to my heart for several reasons. So here goes...

John's Vegetarian Recipes

Oh What a Lucky Man

This article takes me back... or maybe brings me full circle!

Mac Geekery - Pretty-Print Manual Pages as PS, PDF, or HTML

Back in university, learning UNIX was something you had to do on your own time. Here are some commands, they're documented online in "man pages", you figure out the rest and don't be late with your assignment.

After university, it was on to IBM's documentation group for programming languages. Naturally, there was a lot of emphasis on online information. Programming languages lend themselves to hyperlinking to look up language keywords and API names.

When AIX first came out, it had an online hypertext viewer (InfoExplorer) with a whole set of rewritten UNIX documentation. But customers didn't care much for an X11 application just to look up the syntax of ls. They wanted man pages, but didn't find any. I believe the customers finally got their way.

On every UNIX-oriented project I've worked on since then, customers have griped that there weren't any man pages, or they couldn't be viewed from the desired context, or they weren't good enough. (Typically ignoring the whiz-bang online documentation tools that came with the product or OS.) I've had this gripe myself in Oracle's SQL*Plus, where 'help xyz' brings up man-style text help, but it hasn't always been installed.

Now OS X comes along, with BSD UNIX under the hood, so once again my home computer work involves periodic use of the man command. And this article is the coup de grace -- a way to get the man output into the most elaborate viewers yet, Firefox and Acrobat Reader!

To be fair, a lot of man pages are full of obvious flaws. There are some options and restrictions that were unclear when I read a man page 20 years ago... and now on OS X I see exactly the same murky text. 'man tar' and many others don't show enough examples. 'man rsync' puts the options too late on the page.

Berkeley Critical Mass ride

Last night was the first time I saw the Critical Mass ride in Berkeley, rolling down Solano Avenue at 7:30.

That couch looked pretty comfy!

Thursday, April 13, 2006

Knife Is Beautiful

Article today in the SF Chronicle, a retrospective on the Japanese girl punk group Shonen Knife.

ASIAN POP / Knife Is Beautiful

I got introduced to them with their Let's Knife album, and was saddened to hear a few months back that their former drummer had died in a car accident.

Tuesday, April 11, 2006

Web 2.0, Here I Come

Suddenly, it feels like the possibilities on the Web are opening up again. I've set up an account at 1&1 Hosting, and mirrored my home page at JohnRussell.name. Got a couple of other domains reserved for exploring opportunities.

Back in '93 or so, the Web was wide open for anyone who knew their way around Unix and a text editor -- and worked at a big company or went to a connected university. But after the boom and bust, things were kinda dull. Every unused domain was parked. People stopped having "home pages" and put away their FrontPage and DreamWeaver; now they had blogs, but still just content poured into a template with some ads around the sides.

Now we've reached a point where things are once again interesting. You can hook up to Amazon web services, do a mash-up with Google Maps, sell music through the iTunes Music Store, run your own database apps for pennies a day. Every Internet account I've had has come with some paltry amount of web space, usually 10 MB; the 1&1 package has 15,000 times that (150 GB), plus scripting support and full shell access (allowing easy publishing via scp and rsync).