Computers

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 →

Crazy high CPU usage on Snow Leopard and a surprising culprit

After coming back from a team-building trip, I started to notice things were going a bit slow on my work laptop. I took it with me for casual emailing and working on the train, but spent about 4 days not really using it and certainly not ‘working’ on it. It came out once to display the lyrics to a song about Pithivier, and once to check emails, but that was about it.

Read more →

WordPress on Apache being Reverse Proxied by Nginx in an Endless Loop

I have a couple of WordPress installations running on Apache (on a non-80) port, and I’m reverse proxying them through nginx. Somewhere along the line WordPress is getting its knickers in a twist about the port not being the same as it expects. This results in WordPress going into an infinite redirect loop. To solve this, I put this in the nginx virtual server config: proxy_set_header Host $host; Fixed.

Read more →

In Which we Discover Some Rules About Python Scoping (which we already knew)

I’ve just been bitten by scoping in Python. If you gave me this code and asked me what it did, I’d probably guess that it was a trick question and look carefully at it. What would you say? def demo(): number = 100 one = number / 100 numbers = [one, one+1, one+2] big_numbers = [number * 100 for number in numbers] bigger_numbers = [big_number * 100 for big_number in big_numbers] print number  

Read more →

From La Mantovana to the Moldau. Musical similarity in the absence of rhythm and what it means to FolkTuneFinder

Má Vlast is a set of pieces written by the composer Smetana in the late 1800s about his homeland, Czechoslovakia. One of the pieces in the set, The Moldau (Vltava in Czech) is one of my favourite symphonies of all time ever. It could be something in my partially Czech blood, it could be the fact that I’m soppy about Romantic-period orchestral music, whatever it is, I love this piece of music and know it intimately.

Read more →

FolkTuneFinder index building used to be expensive…

The first version of FolkTuneFinder was written in a combination of Java and PHP. I was still working out the best way to do melodic indexing, and the index build process was parallelised. The job ran across 14 Apple Xserves, made available to me by my university. That was back in 2008. These days it runs in a single virtual machine … somewhere.

Read more →

Recent downtime on FolkTuneFinder.com

I started FolkTuneFinder as a student project back in 2008. I’d done websites for a few years before, but this was the first serious one with any kind of heavy lifting or interesting behaviour. Over the years I added features that allowed people to interact, such as the commenting and FolkTuneFinder blogs, which has been surprisingly popular. I have always had a very small problem with spam: I received perhaps a small handful of blog posts a month, which was fine to deal with.

Read more →

Crazy Idea: Auto-reverse images

People like taking photos of themselves in the mirror, it seems. Especially with iPhones. The trouble with taking a photo in a mirror is that the image is obviously mirrored. Here’s my idea. An iPhone, or other phone with a prominent logo on the back, can do some basic shape recognition to decide whether or not there’s a logo reflected in the mirror. It can then decide whether it’s taking a photo in a mirror or not and automatically flip the image if needed.

Read more →

Useful things to have installed on a Mac

I’m a bit of a puritan. I don’t like hundreds of ornate tools. But a few things help. TextMate is quite good. It’s not free but I consider it worth paying for. http://macromates.com/ F.lux adjusts the colour temperature of your monitor according to the time of day. I generally have my monitor set quite yellow and low-brightness anyway. Free. http://stereopsis.com/flux/ ShiftIt allows you to arrange windows into non-overlapping pre-defined layouts with keyboard shortcuts.

Read more →