hacks

  • Using a bunch of Amazon metrics to track the popularity of game systems. [via AWS blog]
    filed under: visualization, amazon, hacks, webservices, games
  • "But simply by enhancing my ability to google, this guide -- now in a meaty third edition -- is worth the price. It's the Missing Manual to Google." - Kevin Kelly
    filed under: books, google, hacks
  • Jason's vacation photos from Austria are great.
    filed under: photography
  • This is a colorful headline from The Money Times. They could have had a trifecta by working in the phrase "thin blue line".
    filed under: greatheadlines
  • Climatologist James Lovelock: "Our global furnace is out of control. By 2020, 2025, you will be able to sail a sailboat to the North Pole. The Amazon will become a desert, and the forests of Siberia will burn and release more methane..."
    filed under: environment, cosmic
  • Google's Flickr competitor (via nelson)
    filed under: google, photography

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!

My Road to Google Hacks

I'm happy to announce that the new edition of Google Hacks has been released into the wild. I started working on Google Hacks, 3rd Edition earlier this year and now it's finally hitting the shelves. I had the fun task of contributing a slew of brand new hacks to the book, updating existing hacks, and tweaking the structure of the book to bring it up to date. Rael and Tara had already put together two editions of Google Hacks that were fantastic, and I'm glad to be in their company by bringing the book up to date.

Working on Google Hacks has brought me full circle on my personal Hacks Series adventure. In April, 2002—shortly after Google announced their Search API—I put together Google Smackdown to try out the API. I didn't think of the Smackdown as a hack per se, but a few months later I got an email from Tara asking if I'd like to contribute the code to a book about Google. I added some comments to my code, passed it on to her, and that was my first contribution to the Hacks Series. It turns out the Smackdown is a hack, and I'd been hacking applications together for quite a while.

Since then I've contributed three books to the series, one with co-author Jim Bumgardner (Flickr Hacks). In the process I even came up with my own method for writing hacks for the series: How I Write a Hack. The chance to work on Google Hacks brought me back to my first contribution, and if I remember correctly, the first book in the series.

The second edition of Google Hacks came out toward the end of 2004, and nothing's really been happening at Google since then. ;) There was a lot to cover, and this new edition tackles hacking Google Maps, covers working with blogs and Blogger in more detail, and covers tinkering with a host of other new Google applications such as Google Video Search, Google Talk, Google Reader, Google Personlized Search, Google Analytics, and on and on. I also added information throughout about protecting your privacy, and I hope it helps readers understand the trade-off we all make between convenience and sharing personal information with a large company. I found there's an art to keeping up with news about Google, so I included an Appendix of sources you can tune into to stay on top of Google's moves. And of course the book still provides a complete reference to squeezing the most out of Google's Search Syntax, Gmail, tuning your site for Google, their Search API, their desktop tools, and a bunch of fun tricks and games (like the Smackdown) that people have built to customize Google or generally mess around. shew!

I received my copy of the book a couple days ago:

Google Hacks, 3rd Edition

And it's satisfying to see the end result. You should be able to get your copy at bookstores everywhere now. To preview some of the new stuff, check out O'Reilly's page for the book: Google Hacks, 3rd Edition. You'll find a Table of Contents there, and five sample hacks. Happy Google Hacking!

Update: Here's O'Reilly's press release about the book: The World According to Google.

Yahoo! Hacks Video

Molly Wood (hooray for!) over at CNet took some tips from Yahoo! Hacks, and made a four minute video pointing out some Yahoo! Search tips: Video: Yahoo hacks.
« Older posts  /  Newer posts »