John Siracusa recently posted about the state of Mac web browsing, which wasn't so much about browsing as it was about state: the fact that applications remember what you're doing. This, along with other events, led to me thinking about state in iTunes and elsewhere.
The other event was a week-long period during which I suffered (what I regarded as) a serious breakage for my pairing of iTunes 5 and mt-daapd, which allows you create shared libraries without having iTunes about. (At home, my music collection is served from a Linux box; at work, from an external drive, so I don't have to worry about iTunes putting little !s next to tracks that are at work when I'm not.)
The breakage is going to seem trivial to many of you: iTunes wouldn't remember view setting state, by which I mean whether the "browse" columns are visible, and which columns are enabled in Edit → View Options (and how wide they are, and their order). What's the big deal, you'll be saying?
Well, I dislike the default view immensly. I find Genre and My Ratings meaningless. (Especially on shared libraries, where My Ratings are actually Your Ratings.) However, I do want to see track number and year, and the time should be shunted across to the right leaving Name, Artist and Album as the most important columns. (There's more, too, but that gives you a good taste.)
Setting this up every time you connect to a shared library is, as you can tell if you've ever done it, really annoying. Since iTunes 4.1, this state has persisted between application restarts, and mt-daapd has provided the necessary
Rendezvous Bonjour information since the turn of the year, at least, so I've got used to not having to mess. iTunes 5 broke it, and (once I'd got used to the new look) it was by far the most annoying thing about trying to use it.
Finally I took the time one morning to play about with the Bonjour records, and it turns out that nowadays you need
txtvers=1at the beginning of the record. This is presumably because there're lots of things that go in that space (iChat 1 seemed to dump in a wodge of XML, for example) and iTunes now makes sure it can parse what comes in. I've made a rather shaky patch and that's working for me, although I'm sure a more robust version will be in a proper release soon.
I'd not have mentioned this, but it turns out that, while iTunes is generally good at remembering state, there's one place that it's badly forgetful: CDs. Nicholas Clark posted to hates-software (third entry: hateful archive) about this this morning, and further discussion showed up that, while track names persist between CD ejects, the view settings (and especially the important "what's my sorting criteria" column selection) don't.
Now, the simple solution is to use iTunes as it was intended; rip the CD and play MP3s. I can see why people don't want to do this, just as I don't want to use tabs in Firefox, and I'm grumpy with Apple for failing to support people who want to do things their way as much as I am with Mozilla. (It wouldn't be so much of a problem if there were other CD playing apps, but the only one I can think of is the retired Audion, and I'm not sure that handles it any better. (I'd check if it was me suffering, of course.)
Talking about state in iTunes with Tom, I realised something else: isn't it odd that it stores state per-share and per-playlist, and that every time I connect to a new user I have to do the same dance to move from its default to my "default"? Wouldn't it be better if I could just change my Library, and then say "make all other shared libraries look like this"? Of course it would. Sadly, that's not the way it is.
(Perhaps unsurprisingly, BBEdit comes closer to this distinction between document state and default state, and what should persist and what not, than anything else I've ever seen, and that's also why I suspect I come away from every attempt to use alternative text editors with the niggling feeling that something's missing. The Finder is half-decent at it; it has default views (good) but they lose settings on reboot (list view's 'relative date' and 'calculate sizes' checkboxes in particular) (bad) and it's hard to apply the default to a window with existing customisations (bad). So other applications can get it right. It's not unimaginable that iTunes could too, except, of course, it's got to version five with nobody fixing it.)
So, what have we learnt?
Now shoo. I need some tea.