Heading to the Future

I'll be in San Francisco next week for The Future of Web Apps conference/summit. Looks like a fun conference with great speakers. And it's always great to be in SF—see (a few of) ya there.

Now Hearing This

I added a sidebar to the front page here at onfocus that shows the last few albums (with cover art) I've listened to in iTunes. Let's skip why I might want to do this for now, and just jump into the how. People have been doing this since MP3 players have existed, and there are several services that can do this for you now. I send my tracks to Last.fm, and there's My Strands—both of these services have HTML snippets you can add to your site that will show some aspect of what you're listening to. Last.fm is great at putting together charts of tracks and artists, but does nothing with albums. So I had to code my own "now listening" widget to show recent albums. Here's how it works in case anyone out there wants to do something similar:
On My Server
My server has a Perl CGI script called getAlbum.cgi that accepts an artist and album name. Once getAlbum receives an artist and album, it searches for a match on Amazon via their API. If a match is found, it puts a little HTML together with the details, adds the album to a local HTML file: now-hearing.html, and removes the last entry. I include the file in my weblog, and that's what you see in the sidebar.
On My PC
With the server script in place, I just needed a little glue between the server and iTunes. A Windows script called now-playing.vbs checks to see if iTunes is open and playing, and then sends the current artist and album to the server. I set the script to run every 20 minutes with the Windows Task Scheduler. It doesn't grab everything that's playing (especially if I'm shuffling around), but it gets pretty close.
On My Mac
I use more than one computer, so I didn't want my Mac to be left behind. I set up an AppleScript that basically does the same thing as the PC script. Instead of using an outside process to run the script at regular intervals, I used the AppleScript idle handler to hit the server every 20 minutes. Then I set the script to open when I log in.
Here's the Code
If you want to try this setup, you can grab the code: You'll need to edit the scripts a bit so they're pointing to your version of getAlbum.cgi on your server, but that's about it. These scripts are working well for me, and they didn't take very long to put together. And hey, who else is going to play Toots and the Maytals back to back with Ladytron? These types of idiosyncrasies need to be put on display!
  • you can get the best of the web at mathowie's community blog (excepting pancakes)
    filed under: music, mp3, joke
  • "To investigate more formally, I purchased some time on a computer cluster and downloaded a copy of the Wikipedia archives. I wrote a little program to go through each edit and count how much of it remained in the latest version..."
    filed under: wikipedia, statistics

Show and Tell: Firefox Extensions

Just set up a new instance of Firefox, and I had to figure out which extensions I couldn't live without. Here's a screenshot of the list:

Firefox extensions

And here are the details:
  • Dom Inspector and Talkback are installed by default.
  • FlashGot - sends large files to a download manager like ReGet (PC) or iGetter (Mac).
  • Clone Window - When you open a new tab or window you'll get the current URL instead of a blank page.
  • Greasemonkey - Does anyone not have Greasemonkey installed? If I could only have one extension, this would be it. It customizes websites with user scripts.
  • Feed Your Reader - Makes that orange feed icon in the address bar actually useful. I use it to subscribe to feeds at Bloglines.
  • Live HTTP Headers - Useful for debugging web stuff. I don't often need the full power of Ethereal, so this extension will give me a look at the headers without the hassle.
  • Live IP Address - I want to know what my IP address is. I'm a geek.
  • Web Developer - This extension does a bunch of stuff, but I've found I use the no-cookies and no-CSS toggles most often.
  • Forecastfox - I use it to show the current weather conditions in the lower-right corner because I don't get outside much. ;) The severe weather alerts are also handy.
Any extensions you can't live without?
  • looks better than parallels for running a single Windows app on OSX. (though I can't get this beta version to run.)
    filed under: mac, software, productivity
  • Marc Hedlund just started a blog for his personal finance startup
    filed under: weblogs, economics
I'm going to start pulling my del.icio.us links in as a post like the cool kids do. Here are the links from yesterday to kick things off...

New onfocus design, finally

I redesigned onfocus in March 2002. Since then, I haven't touched the design except for a few tweaks here and there. This site was way past due for a change, and this is the new look. If you're reading this in your newsreader, you'll have to click to see the new onfocus design in red, white, and black. I still have to work on the sub-pages, but I thought getting the weblog moved over would be a good start.
« Older posts  /  Newer posts »