Mike Bland

Playing the Changes Hack, Continued

Wrote a new script to update the tags for the playingthechanges.com MP3 files before importing them into iTunes, and accepted a challenge from David Plass

- Boston
Tags: Berklee, music, programming, technical

It turned out that my script from my previous post, Playing the Changes Hack, only got me halfway where I needed to be, because the tags in each of the MP3 files are very old and all of the tracks subsequently looked like “Track N” when imported into iTunes—which kinda defeats the purpose of the exercise. So I wrote another script to update all the MP3 tags to something sane and the iTunes import actually worked.

I would’ve been done there, had David Plass not taunted me on the G+ comment thread for the aforementioned post about my lack of unit tests. So, fine, David here you go: An updated ptc_fetch.py that adds the MP3 tag updating feature to the original script, and a big, juicy set of unit tests to go with it: ptc_fetch_test.py. Happy now?

Well, I do have to admit, the testing did shake out a couple of error case handling bugs that I hadn’t tripped before… And it was fun to write a substantial test with my old pyfakefs baby—which seems all grown up and doing fine without me, in spite of my abandoning it, as per the stats on the pyfakefs Python Package Index page. I even got to mess with Steve Middlekauff’s Mox tool a little bit, too. Good times.

In other news, tomorrow night is the big night for my Apple SSL bug lightning talk at the Automated Testing Boston Meetup. (The “lightning talk” version of the slides are at the end of the deck.) I’ve had a tremendous amount of help from folks near and far, and it promises to be a great time. If you’re in the neighborhood, feel free to stop by and check it out!