At work I’m looking at PerformancePoint, and being a newbie with this product I of course do all the newbie errors. That’s why I was so happy when finding Nick Barclay‘s blogpost where he explains all about the way-to-common connection errors. Big thank you to Nick. :-)


Not quite happy with any of the programs I found to identify iTunes duplicates, I spent an hour making my own (beats tracking down duplicates. :-) ) I thought I’d share it with you. It’s my first attempt at using OS X’ ScriptingBridge and written in Python. I have no clue if it runs out of the box, I suppose you should have Developer Tools installed. It’s not the fastest beast either, and Python and iTunes both use 50% CPU. But it gets the job done. :-) If you wonder why I give so many parameters to the track class I should say that I plan on reusing it to do some more iTunes housekeeping. The script will mark all the duplicates with one star. Then I can round them up and delete them afterwards.

import struct
from ScriptingBridge import *

class Track:
   def __init__(self, name, album, artist, size, length, track, path):
     self.name= self.str(name)
     self.album= self.str(album)
     self.artist= self.str(artist)
     self.size = size
     self.length= self.str(length)
     self.track = track
     self.path= self.str(path)

   def str(self, s):
     try:
       return s.encode('utf-8')
     except:
       return "N/A"

   def equals(self, t):
     test = t.name == self.name
     test = test and t.album == self.album
     test = test and t.artist == self.artist
     test = test and t.size == self.size
     test = test and t.length == self.length
     test = test and t.track == self.track
     return test

   def __eq__(self, t):
     return self.equals(t)

iTunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes")
lib = iTunes.sources()[0].playlists()[0]
tracks = lib.tracks()
filetracks = lib.elementArrayWithCode_(struct.unpack('>L', 'cFlT')[0])

Tracks = []
Duplicates = []
duplicates = []
for track in filetracks:
  t = Track(track.name(), track.album(), track.artist(), track.size(), track.time(), track.trackNumber(),track.location())
  if(Tracks.__contains__(t)):
    Duplicates.append(t)
    duplicates.append(track)
  else:
    Tracks.append(t)

print len(duplicates)

# Deal with duplicates
for track in duplicates:
   track.setRating_(20)


I’m a big fan of Amazon EC2 and S3. To be able to use the amount of computing power you need and the amount of storage you need and only pay for what you use is a good way of computing in my view. However, EC2 wasn’t built to run clustered databases like MySQL on, and I’ve had problems finding any service that will let me pay for the capacity I need (cpu time and disk space) and give me a guaranteed query time. Amazon’s SimpleDB seems to be a good step in that direction, and I’m really looking forward to toying with it and hopefully use it for many interesting projects.


ZDNet posts that you should beware of using Silcion Image’s 3132 chipset that’s used for so many noname eSATA ExpressCards (and the one I have) with Leopard. I have had little success using this with Tiger as it seems incompatible with my enclosure (might as well be the other way around, though)


Having read here and there about how to work with Interface Builder 3 that does not have the “Classes” page like IB2, I’ve found that the following YouTube video shows it way better in 3 minutes than what I had spent hours reading: