Computers

Oxford Laptop Orchestra : Lecture 1 : Music and Programming

oxlork

I’m very excited to be involved with the nascent Oxford Laptop Orchestra. This project, run by and for students at the University of Oxford, follows on from the work of the Princeton Laptop Orchestra. PLOrk, as its known, and now OxLork, is an effort to reproduce the form of performance embodied by a real orchestra or chamber group — that is, a number of individuals performing in concert, in a certain arrangement in space — with modern advances in electroacoustic music.

Read more →

IndexError 'list index out of range' in Django Admin

Have you just got an exception from Django saying:

IndexError at /admin/mything/

list index out of range

Read more →

Sound file Plotter in Go using gosndfile / libsndfile

It’s no secret that golang is my new favourite language. I’ve used it to implement the latest folktunefinder search engine and really enjoyed it.

On an unrelated note, whilst looking at what libraries are available I came across the gosndfile library written by Matt Kane / @nynexrepublic. It’s a wrapper for libsndfile, a C library for reading and writing sound files.

Read more →

Strange error in Go: 'fmt.Println not used'

I had a mysterious error in a project in Go:

myproject/types.go:89: fmt.Println not used

If you declare a variable or import a package in Go, that’s a compiler error. Good thing too, in my opinion. But this one was puzzling. It wasn’t complaining about an imported package, it was complaining about a function within a package. As far as I’m aware, the syntax of Go allows only for importing a whole package (or sub-package) at a time, rather than members of that package (as Python does).

The odd thing was that the error was reported on the last line of the file. The entire contents of that line was:

}

Read more →

Mapping Live River Conditions on the Thames

I love going out on my boat and I do it as often as I possibly can. Unfortunately the recent rain has meant that I’ve been unable to as often as I’d like. If the current is too fast, it’s not sensible or safe to do it. The Environment Agency has an excellent site which gives live information. But I wanted to put it on a map. Cue an evening of hunting down coordinates of every lock on the non-tidal thames (Google data is surprisingly bad) and writing an app to take data out of the online service and put it on a map.

Read more →

Trouble with local cross-domain Django cookies

I’m working on a Django app which is able to serve content on a number of subdomains. The app has a number of sites, which appear as subdomains of the main domain. There’s some middleware to look things up from the request and do the right routing.

In the wild the subdomains will be done with DNS, but for local development, I’m creating entries in my /etc/hosts such as demosite.local, using .local as my ‘main domain’ locally.  After a colleague integrated some authentication code, I suddenly found I couldn’t log in on my development environment. It didn’t work with either the custom login screen or the Django admin. Very odd.

Read more →

Using Subversion with PIP: Cannot find command 'svn'

Came across this when deploying a Django app to a fresh VM, installing with Python PIP from a requirements file.

Read more →

Facebook JavaScript login doesn't work in Safari

I have been banging my proverbial head against a brick wall (or my actual head against a proverbial wall) for the best part of a few days, on and off, trying to find the cause of an inconsistency in behaviour between Safari and Chrome in a Facebook canvas app.

Read more →

GET parameters in Facebook Canvas applications

I’m developing a Facebook app at work and was stuck on an issue for a bit. This post is just a mental note, and to prevent this happening.

Read more →

Almost identifying the music in a BBC trailer

The BBC love their esoteric, obscure electronic music. I think it all started with Sigur Rós in Planet Earth and proliferated from there. It’s even started creeping into BBC Radio 4 trailers now. The trailer for Will Self’s ‘A Point of View: In Defence of Obscure Words’ had just such a music bed. I decided that I would very much like to know what that music was.

Read more →