iTunes Rating Distribution

As an adjunct to another project I am working on (basically an extended version of the experimental writeup I did about iTunes Ratings), I had cause to wonder as to the distribution of ratings in my iTunes library, and in other peoples. I may be unusual in that when I import an album, I grab the whole lot. Even if I really only like one track. I just feel some day I may want to listen to the whole lot! Anyway, I came up with the following script to get the data. Mac only, I’m afraid. Possible to write a much slower version that scans the XML file manually, but I’ll leave that as an extension to the avid reader.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
    #! /usr/bin/env python
    
    import Foundation # Required PyObjC installation.
    import os
    
    library =  os.path.expanduser('~/Music/iTunes/iTunes Music Library.xml')
    
    db = Foundation.NSDictionary.dictionaryWithContentsOfFile_(library)
    tracks = db[u'Tracks'].itervalues()
    
    ratingcount = {}
    for i in range(101):
        ratingcount[i]=0
    
    for track in tracks:
        try:
            ratingcount[int(track[u'Rating'])] += 1
        except KeyError:
            ratingcount[0] += 1
    
    fp = open('RatingData.csv','w')
    for i in range(101):
        fp.write(str(i)+","+str(ratingcount[i])+'\n')
    fp.close()

Plotting this data gives the following graph: Clearly, there are a couple of spikes, most likely from having rated tracks initially on a normal iTunes scale (0-5 stars). I’ve changed the plot scale so you don’t see the zero-rated tracks, as they skew the data totally, and most of them are in fact unrated, rather than zero rated. If I scale my ratings down to full stars (and discard all of the unrated tracks), then my data looks more like: Which is what I expected. And shows that I am probably pretty harsh on my music library - or I dislike most music a bit. • The final plot shows when rating as half-stars, that is, rounding down to the nearest 10, and discarding unrated tracks.

Religion as Delusion?

I’m partway through the 24/9/2005 edition of ABC Radio National’s Podcast of their program All In The Mind. The program description is:

SUMMARY: Cotard’s syndrome is the belief that you have died, and for sufferers it is a terrifying state. Delusions can take many forms, from widespread paranoia to a specific and singular delusion - you might think an impostor has replaced your spouse. These misbeliefs are commonly associated with schizophrenia, but they can also occur in people with brain injuries, Huntington’s and Parkinson’s disease and dementia. The Macquarie Centre for Cognitive Science is seeking to explain delusions by developing a model of how we all come to accept or reject beliefs. We see how this research is progressing.

I don’t know that much about Schizophrenia, but early in the program they are talking about how people with this condition cannot (bear to?) look at faces of people who are angry or fearful. A little later on, the following phrase is used:

[Delusion is] a strongly held belief for which there isn’t any evidence.

I’m not going to make a further statement as to the similarity between this and religion. I’ll let you decide. Flames cheerfully accepted.

Quicktags Bug

For some reason, there is a small bug in the Quicktags.js script I contributed to Blogsome. That is, when putting in an abbr, or an acronym, only some Browsers will automatically add what the abbreviated term stands for (or what it might stand for). I coded in a series of common values, so that, for instance, if you have AAC selected, and press abbr, then it will put Advanced Audio Coding into the title field. It works with Firefox. It also works in Safari, but only if the User Agent is changed - older versions of Safari didn’t support Quicktags at all, so the authors of WordPress coded in a check, and the Quicktags don’t appear in Safari. I must fix the check in the Blogsome code, and submit it to Roger. It doesn’t work, however, with either Opera or Internet Explorer. Something to fix, later.

The Toilet Seat Problem

The Science Creative Quarterly » A GAME THEORETIC APPROACH TO THE TOILET SEAT PROBLEM

The toilet seat problem has been the subject of much controversey. In this paper we consider a simplified model of the toilet seat problem. We shall show that for this model there is an inherent conflict of interest which can be resolved by a equity solution.

We’ve found the ideal solution is that the Toilet Seat Lid is to be left down at all times: then everyone using the toilet incurs the same cost each time they “perform an operation”, be it a #1 operation or a #2 operation.

Cooking Eggs with Mobile Phones?

Boing Boing: HOWTO cook an egg with two mobile phones

HOWTO cook an egg with two mobile phones This site claims to provide instructions for cooking an egg by placing it between two live mobile phones

I’d very much doubt that this would be much different than just placing the egg right next to the antenna of a single phone when making a call. After all, it’s not like mobile phones connect directly to one another, is it? Don’t they connect to a base station?

Buy Danish!

History News Network: “Buy Danish” There’s apparently been somewhat of a furore over some Danish cartoons allegedly portraying Muslims in a not so favourable light. Various Muslim countries have called for a boycott. Various groups are calling for an anti-boycott. Since Danish furniture is pretty much “teh sh1t”, and we have just bought a Hans Wegner day bed, I’ll pretend it’s all part of that.

Search Hilite Plugin

The Search Hilite plugin doesn’t seem to function under Blogsome. I’m not sure if it used to, but it may be possible to modify the stylesheet, or do something (maybe using JavaScript) to highlight search terms. We can get the referer information, after all, and should be able to process this and make a guess as to if it’s a search engine or not. Similarly, you cannot view Page 2 onwards of a site search: I’ll look into this (and highlighting search terms here too, BTW).

Fred Jones, Part One and Two

While listening to Party Shuffle on iTunes, up came:

Cigarette • Ben Folds Five • Whatever & Ever Amen ★★★½

Now, I’ve had this album since, well, it first came out. I remember when “Give Me My Money Back Bitch” was all we were singing (Song for the Dumped). But apparently I’d never really listened to the start of this song. It’s about Fred Jones. So what?

But, then, in his first solo album, Ben has the song:

Fred Jones, Part 2 • Ben Folds • Rockin' The Suburbs ★★★★★

Which, those of you with decent fonts installed can see, is one of my all-time favourite songs. It’s a sad little number, about an old guy who retires from working at a Newspaper, where he’s worked his whole life, and everyone else in the whole place has been there for less time than he. The place has been taken over by the next generation, and he’s being made redundant. The live version on Ben Folds Live is truly excellent, with John McCrae from Cake helping out. (Apparently, he’s in the Album version as well. I always wondered who that was!)

So, what is the first song, Cigarettes about then?

The first hit from Google tells me:

Fred Jones was worn out from caring for his often screaming and crying wife during the day, but he couldn’t sleep at night for fear that she, in a stupor from the drugs that didn’t ease the pain, would set the house ablaze with a cigarette

Now, from what I can recall of Fred Jones, Part 2, there’s no mention of a wife. And Cigarettes makes it sound like he doesn’t have a job. Still, it’s pretty unlikely there’d be two people in the world with the same name - especially one like Fred Jones. And at least one reviewer seems to think it’s the same person…

;)

For the record: the lyrics of Fred Jones, Part 2 are:

Fred sits alone at his desk in the dark, there’s an awkward young shadow that waits in the hall.

He has cleared all his things and he’s put them in boxes, things that remind him that life has been good.

Twenty-five years he’s worked at the paper, a man’s here to take him downstairs.

And “I’m sorry, Mr. Jones, it’s time.”

There was no party and there were no songs, ‘cause today’s just a day like the day that he started.

And no one is left here that knows his first name, yeah and life barrels on like a runaway train, where the passengers change they don’t change anything, you get off, someone else can get on.

And “I’m sorry, Mr. Jones, it’s time.”

The streetlight it shines through the shades, casting lines on the floor and lines on his face.

He reflects on the day.

Fred gets his paints out and goes to the basement. Projecting some slides onto a plain white canvas, and traces it, fills in the spaces, he turns off the slides and it doesn’t look right.

Yeah, and all of these bastards have taken his place. He’s forgotten, but not yet gone.

And “I’m sorry, Mr. Jones,” and “I’m sorry, Mr. Jones,” and “I’m sorry, Mr. Jones, it’s time.”

This song has so much power over me, it makes me feel sad just reading the lyrics. I guess it sums up my fears of wasting my life.

iTunes Coincidence

Having done some experiments about play counts, and having read some articles about the randomness of iTunes random play, I have no doubt that it is fairly random. I know from my Computer Science training that it’s virtually impossible to generate completely random data from a computer system - they just aren’t designed that way. It is possible to get the data from an outside source, like keypresses, or the time between them, or the mouse movements, or whatever. I do recall that if you use a function like random(), you need to seed it beforehand, and you should do this with a value that will change each time the program is run, as if you seed random() with a constant, it will return the same sequence of values each time it is run. Still, it amuses me when coincidences occur with iTunes. I got this one tonight: This is unusual in a couple of ways: the first is that Tim Rogers is a member of You Am I. So, to start with, I had two songs by virtually the same artist one after another. But iTunes could not know this, as there is no reference to You Am I in the second song (which is in the larger part of the window), and no reference to Tim Rogers in the drawer - which contains the data about the song that actually played first. The next unusual thing is that both of them have the name Part 1/One, or at least it’s included in the name. The third weird thing was that two tracks later another Tim Rogers and the Temperance Union track played.

Some Fella’s Heartbreaker • [Tim Rogers And The Temperance Union][2] • [Spit Polish][3] ★★★

[2]: http://www.google.com/search?q=%22Tim Rogers And The Temperance Union%22 [3]: http://www.google.com/search?q=%22Spit Polish%22

Tricky Trackback Spam

I noticed the following Comments, or rather Trackbacks, on a post to my blog today. As you can see from them, it is over a year since I posted the article, but the thing to note is that one comment seems to respond to the other: That’s all well and good, until you look at the post: It has nothing to do with the comments! That twigged me that it was Spam. And the fact that the URIs all point to the same domain. As does another Spam Trackback I received seconds after starting this post. techmp3.org is going into my Spam filter…