Thursday, October 12

Sync Odeo and iTunes with Automator

I hearts Odeo. It’s slick, gradienty, and nicely usable. It’s also available anywhere the tubes go, so I can subscribe while at work. And, of course, it’s run by awesome dudes. Check out my profile! Nevertheless, it does not match iTunes for podcast usability.

iTunes’s big advantage is that podcasts show up in separate channels on my iPod. This is key. But subscribing is only possible on the Mac that I’ve set up to be my podcatcher, which runs essentially headlessly. (iTunes over VNC: not so fun.)

In an earlier post, I talked about using Automator to print the New York Times crossword every morning. In another I described using a separate, dock-tethered Mac for podcasts while keeping my music library on a different computer.

Now I’m going to revisit both those topics with an Automator script that makes iTunes subscribe to everything I’ve subscribed to in Odeo. Now I can find stuff through the nice web interface, dozens of miles away from my Mac mini, and still have the podcasts sync and download for when I plug my iPod in in the morning. Download it here: Sync with Odeo.workflow.

One requirement this script has is that you need to make your Odeo subscriptions public in order to grab the OPML file unauthenticated. Do this in the privacy settings part of your account settings.

I cheated with OPML XML parsing and just pushed the file through sed. I use curl here instead of Automator’s Safari-backed downloading because keeping the data in stdin and stdout means I don’t have to clean up any temp files.

curl $1 | sed -n -e 's/.* xmlUrl="\([^"]*\)".*/\1/pg'

This pipes into a simple AppleScript that loops through the text items in the input and tells iTunes to subscribe to each in turn. I won’t repeat it here because the formatting is a pain.

And there it is! I run it in the middle of the night so I can be sure that everything will be downloaded by the time I sync the iPod in the morning, by saving it as an iCal plug-in and setting up a repeating event. There are just two remaining caveats:
  • Subscriptions are additive. To unsubscribe, I’d have to unsubscribe in Odeo and also iTunes. However, iTunes is good about not updating shows you stop listening to, so not bothering to unsubscribe works, too.
  • I had to unsubscribe from my Odeo inbox. If I didn’t, I’d get everything twice, both through iTunes and through Odeo. This means that I can’t use the “add to inbox” links on Odeo, which is too bad.

Monday, October 9

Checking All Those Comments Feeds

ongoing • On Comments (II): "Antone Roundy, and others, point out the problems with per-entry comment feeds; namely, that various idiotic clients will poll each and every one regularly from now until the heat-death of the universe and there’s no way to stop them; given the volume at which I post, this would be untenable."

We’re starting to get into this with Blogger. The comment feeds are all there in the new in-beta version — both per-post and per-blog — but there’s no Atom-to-Atom linking going on.

Probably the best solution is one where the feed reader would fetch the per-blog feed, which it could do regularly, and then filter to show only the comments for posts that the user is interested in.

Tim pointed to the Atom Threading Extensions, which I’m planning to investigate.

Thursday, October 5

Cultural Notes and Products

I just grabbed tickets to see The Decemberists at the Warfield. Was listening to “16 Military Wives” yesterday; I hope they play it. There’s something about the dramatic pause right before “cheer them on to their rivals” that I expect would be awesome in a packed hall. New album is on its way from Amazon.

On Tuesday I had the pleasure of joining a handful of other Googlers for lunch with noted blogger Neil Gaiman. He’s a brilliant guy and was very friendly. We chatted about Blogger features and some problems he’s having with text encoding.

I’ve started on Neil’s new collection of short stories and poems (which I am reading!). I’m liking it, and it’s been worth it for the first story alone (itself a 2004 Hugo Award Winner): quite literally a mashup of Arthur Conan Doyle and H.P. Lovecraft.

Also, I hung out a bit with Neil’s son Michael, who’s finishing up his CS degree at Brown. Rawk!

Tuesday, October 3

IDE and Language Religion. Move Along.

Tim Bray thinks you can do refactoring in a dynamic language by getting the necessary data from just running the code. “I’ll bet Tim’s IDE will also be able to tell you when you write an infinite loop!” the programming languages student said snarkily.

Cedric Beust calls him on it. I agree, though I don’t know anything about Groovy. Left out of the discussion is, as always, ML (c’mon, Cornell folks, step up!), which gives you static type guarantees as well as the “convenience” of not specifying types. (At the expense of having to debug type conflicts… always a good time.)

I guess I still have to be a Schemer at heart, and I still have to use JavaScript due to working in the tubes, but I am smitten with Java, for basically one reason: IntelliJ.

Two important features:
  • Control-click to go to a method’s definition. Nothing helps me understand the code more than following a method to its definition. And where I work, there’s a lot of code to understand. My heart actually goes out to my co-workers who try to get by with Emacs and vi, who have to scroll up to find what package a symbol comes from, then tab-complete their way through the package hierarchy to get to the file. Only to find out that that’s just an interface.
  • Renaming. This is Tim Bray’s desire. AKA “find usages.” I am sick obsessive about my names. They have to be perfect. And as I’m developing a chunk of code, sometimes a method’s purpose changes. When that happens, the name must change. Otherwise, when another engineer looks at it in 5 months, they won’t understand what the code does, and they’ll write a bug because of it.
Maybe I’m just spoiled, but I couldn’t imagine working on a project as large as — in both lines of code, dependencies, and number of engineers — as Blogger without IntelliJ without taking a significant hit in productivity, code quality, and maintainability. The IDE lets me be in control of the code in a way that I never felt before.

Perhaps that’s something you kids and your startups should think about. If your project lasts two years (or seven, though things have been rewritten a few times), in what state will your super-dynamic language code be? Will your new hire be able to figure out what’s going on without significant wading? Will methods and classes be named incorrectly because there was too much friction to set things right?

And seriously: the real magic bullet for programmer productivity? Control-space name completion. Someone tell Fred Brooks.

Sunday, October 1

Opera Mini: Where have you been all my recently?

I was discouraged when the Google Personalized Homepage (mobile version) did not render on my Razr V3’s built-in browser. (The error, for those of you finding this via search, is “413: Page Cannot Be Displayed.”)

To my rescue comes Opera Mini, which apparently has been free for a while now. It’s a Java web browser (all in a tiny 97k download) that runs circles around its built-in counterpart, rendering pages that the other would barf on. It works great with the personalized homepage, and with Google Reader’s mobile version as well.

The one problem I had getting it to work on my Cingular Razr is that it kept timing out on the GPRS connections and I’d get a 3.0.1:80 error. I think I have lousy GPRS reception in my apartment. Enough trying and sitting at different angles helped, and also possibly inputting these settings into the e-mail app’s GPRS configuration (of all places). That might just have been me thrashing, however.