Tuesday, December 16, 2008

More Thoughts on Australia's Internet Censorship plans

I sent a letter to Stephen Conroy expressing my view that ISP level filtering in Australia would cause a significant negative performance impact on the internet and that the resources (money) spent on the filter would be better spent elsewhere (ie: law enforcement).

I wonder if Stephen Conroy would like to drive a car with a speed limiter that automatically set it's speed limit based on signs on the side of the road....

If it performed like the ISP tests have shown, then it would certainly get the speed wrong some of the time, perhaps limiting him to drive at 80km/h on a freeway or allowing him to drive at 100km/h in a suburban street! Not good for the traffic, and certainly not going to eliminate the possibility of him speeding.

I also support the letter written by Mark Newton, which you can read here. The guy has clearly done his homework, obviously more so than Senator Stephen Conroy.

Say no to censorship of the Internet! Spend the resources on police to catch people doing illegal activities instead of hampering the online performance of an entire country.

Friday, December 12, 2008

Using python to examine your iTunes library

I recently noticed a bunch of music files were missing from my iTunes music library. Here's a simple python program I write to find which ones were missing... (iTunes tells you, but in a modal dialogue window so you can't look at the list and check your library at the same time)


import plistlib
import urllib

filename = "/Users/matt/Music/iTunes/iTunes Music Library.xml"


def check_file(dict):
location = dict['Location']

try:

# try the url
u = urllib.urlopen(location)

# close it
u.close()

# if we get here, it was ok
ok = True

except:
ok = False

if (not ok):
print "file not found: " + location


print "Reading iTunes xml file..."
x = plistlib.readPlist(filename)

tracks = x['Tracks']

for key in tracks.iterkeys():
check_file(tracks[key])