Vancouver Visit

I considered calling this post a two-word version of "my only visit to Vancouver in 2010", but then I realized that I'd be attacked by a rabid mob of angry international olympic organizationlawyer-weasels. Anyway, read on to hear about my Canada trip from two weeks ago.


Vancouver hiking

The flight from Glasgow to London was typical. That was the fifth time I've done a 1-hour flight with British Airways, so I knew exactly what it would be like.

My seat from London to Vancouver was upgraded from "world traveller" to "world traveller plus" because they'd oversold the cheaper seats. This gave me a slightly nicer chair, a toothbrush -- but also noise-canceling headphones. Those made the flight incredibly much better. I don't know if it would be worth buying the more expensive seats on their own, though. I'm going to continue flying with the cheapest seats, but I'm buying my own pair of noise-canceling headphones before having another 8-hour flight.

Vancouver was fantastic, as usual. I managed to meet almost everybody I wanted to meet -- I missed two people. One was working in a law firm in London, and the other was flying around BC training local tax workers how to deal with HST. Unfortunately I was sick for the first few days that I was there, but I recovered fairly quickly.

The first full week was spent at the usual West Coast Amateur Musician Society summer music camp. I was concert-master of the string orchestra playing the Elgar String Serenade, first violinist in a quartet playing the first movement of the Dvorak American quartet, and cello in a clarinet quartet op 1 by Rabl. (not a typo; he's a very unknown composer. Very much in Brahms style)

In addition to music-making, the summer music camp was great for my research. I saw the people that my educational music games were really written for -- amateur adult musicians -- but I also just had the chance to talk about my work. Lots of people were asking what I was doing, and talked about it with me. Sure, maybe they were just making polite conversation and feigning interest... but feigned interest is still better than a complete lack of interest! I'm more fired up to work on my research than I have been in the past year! :)

Victoria was Victoria. I saw my old research lab, caught up on the local academic gosspic, etc. It was really interesting to get (briefly) re-immersed in that atmosphere -- in the past few months, I've been in contact with the NUS research group as well, so I'm pretty much up-to-date on three "music technology" labs on three different continents. It's surprising how different they are!

That said, as I type this, I'm realizing that they are on three different continents, precisely separated around the globe by time zone (8 hours each way). So maybe it's not surprising that there would be huge differences between the labs, after all.

Trip back to Glasgow wasn't as nice as the way home. I went to the airport via the new "Canada line", which was quite convenient, but was boring. Too much tunnel.

At the airport, I noticed a Tim Hortons and eagerly went to get some timbits. I'd forgotten to have some any earlier, and I've spent the past year whining about the lack of timbits (and doughnuts in general) in Glasgow. For better or worse, I seem to have identified timbits as the distinctly Canadian food that I miss while abroad. (I'm sure that their marketing department would be overjoyed with this post. :)

Anyway, in my eagerness to have the doughnuts, I forgot how much I disliked their coffee (ok, maybe their marketing department wouldn't be overjoyed). Also, I didn't spot a deal for half a dozen timbits (which is what I remember from 10 years ago), so I got the 10-timbit deal. That was a bit too much, so I began the flight feeling a bit queasy.

Oh, but before the flight, I got called on the PA system! Apparently if you print a boarding pass from home and don't check any baggage, they call you so that they can swipe your passport themselves. I guess that makes sense from a security standpoint... but in that case, what's the point of 24-hour early online checkins? Just to choose seats?!

Flight was distinctly meh. I saw toy story, toy story 2, and another movie which escapes my memory at the moment. Oh wait, it was Alice in Wonderland. It didn't leave much of an impression, other than wincing at the clumsy attempts at romance between Alice and the Mad Hatter. And it wasn't just the amount of time spent on it -- a great romance doesn't need an hour to develop. One of the best love stories I've ever watched was about 5 minutes long. This was just bad writing.

The flight landed 30 minutes ahead of schedule, but then we had to wait for 15 minutes before they brought in some airplane taxis to move the previous airplane that was occupying our gate. They weren't expecting us there that early.

I wandered around in Heathrow in a bit of a daze, feeling lightheaded and a bit dizzy. I spent about 10 minutes reflecting on how I was unusually dehydrated from the flight, or had a problem with low blood sugar or something... but then I remembered that it was about 7am Vancouver time, and I hadn't slept at all, and that I was just experiencing the usual "stayed up way past his bedtime" symptoms. (in my defense, I'll remind you that a decrease of cognitive abilities is one of the symptoms of being awake for a long time)

Final amusing note -- when the flight landed at Glasgow, the pilot announced that it was 23 C, and almost all the passengers burst out laughing. I think he must have heard us, because he quickly corrected it to 15 C.

I felt a brief (and surprising!) burst of pride at the laughter, though. Apparently even though I don't have any accent and still sometimes have problems understanding the dialect, I've picked up the Glaswegian (or Scottish in general? or maybe even British in general?) pride in having poor weather.

Looking ahead, I have a few goals for non-academic life:

Posted at 2010-08-17 09:34 | Permanent link | Comments

Time spent on LilyPond

I'm one of the main developers of LilyPond, which takes a fair amount of time. As discussed previously, I'm trying to keep it under control setting limits on the time I spent on it. I slipped up during the summer, so as of 1 Aug, I'm restarting these limits. This time it's 10 hours per week. And I modified some software to help me!

Is 10 hours ok? Well, it sounds like a lot... I mean, that's 40 hours -- a week of full-time work -- each month! But look at it this way: if I was a serious amateur violinist, I'd practice for an hour a day, plus maybe a two-hour orchestra rehearsal once a week, and maybe a one-hour quartet rehearsal. Hey, that's 10 hours! So I figure that 10 hours a week is a decent amount of time for a "serious hobby".

I modified TimeTracker, a simple python script for timing various projects. The program came from:

My modified version adds a "modify" (or "mod") function, which lets you add extra minutes to an existing project. Read the main documentation first. My new function works like this:

$ mod 1 30
Added 30 minutes to task 1.

This addition is useful when I've been working on my desktop computer -- my time-keeping is done on my laptop, so I just need to remember that I spent 30 / 45 / 90 minutes working on the desktop, and add that time to my laptop's record when I have a chance.

If other people find this program useful, I might clean up the documentation a bit. The program is in the public domain (following the original author's decision).

Posted at 2010-08-09 05:43 | Permanent link | Comments

Tempo Game

As you know, I've been working on educational games to help music students practice rhythms and intonation. Well, I'm finally ready to begin tests of aspects of these programs; the first test is to detect the tempo of a student-performed rhythm.

I've written an online flash game for rhythms. The game presents you with a rhythm and metronome, and you're supposed to tap the rhythm on your keyboard.

Of course, since this game is supposed to be useful for students, you could try tapping the wrong rhythm – ignore the metronome, add an extra note, hold a few notes for twice as long as you should... make whatever mistakes you think a student might make! Or, if you're not a professional musician, you could just try to perform the rhythms correctly, and let the mistakes happen naturally. :)

Information about your gameplay will be automatically sent to me and used to improve the tempo detection. No names or personal information is recorded; I have no idea who is playing the game. Details of the information gathered is available on the website.

Posted at 2010-08-06 07:51 | Permanent link | Comments

Graphing commits per developer

I gave a talk at Rencontres Mondiales du Logiciel Libre, or the Libre Software Meeting 2010, over three weeks ago. This post has the scripts that I used to create the graphs of commits per developer. These scripts aren't particularly inspired, but there's been some interest in them, so in the spirit of open source and just plain good science, here there are. :)

Here's the ultimate goal: a graph showing commits per developer.

More context is in the previous post about the talk, Sustainable Development in F/OSS

First, we need a program to extract statistics. I used gitstats, and heartily recommend it to others.

Second, we need to know the range of dates to use. I used 6-month intervals. I wimped out here -- I'm sure that it's possible to make git tell you this automatically, but instead I just skimmed through the logs in gitk and manually picked out the first commit in each date range. The result is this:

2005-1  cccee40bb3a13b6c230fa98a8ca61f7c526d5f66
2005-7  b28d02e3cbb81b050cf4c6bba3260a331d4f7d3f
2006-1  16b713b9b9616d70c4a1b12506952098c01c5706
2006-7  eaed6aa8f16502d8159530eaf3ed4d56dbf8fef8
2007-1  ad33cc4b37628e047e4c8c3b3d42d93cb7525d0f
2007-7  699feb0fbe8448a94ca5d9de43dd126d34fd5341
2008-1  57221c9ee7a758169c9e2fe4805f0ed3598f50d5
2008-7  b57384106e4e54f4a22a93af88204f86f37d078b
2009-1  015ac40ff340255ea4ac76fbe5b5eab3c2a40adc
2009-7  bee6f18b78c002187d9197b6a334ff61c13a4ef9
2010-1  9429c53e9e4a1f88b32f4897fdc261ed9bd6684f
2010-7  ec376e079a0dc586ba3fe17113993525f2be69c2

(I used a tab between the columns, but that won't come out in the html)

Third, I ran the below script to run gitstats for each range of dates/commits:

# public domain if that matters; this is utterly trivial

#!/usr/bin/env python
import sys, os

GITDIR = "$HOME/src/lilypond"
COMMITS_FILENAME = "lily-dates.txt"

commits = open(COMMITS_FILENAME).readlines()

def getRange(begin, end):
        out_filename = begin.split('\t')[0] + '_' + end.split('\t')[0]
        commit_begin = begin.split('\t')[1].rstrip()
        commit_end   = end.split('\t')[1].rstrip()
        cmd = "gitstats"
        cmd += ' -c commit_begin='+commit_begin
        cmd += ' -c commit_end='+commit_end
        cmd += ' ' + GITDIR
        cmd += ' ' + out_filename
        print cmd

# whole range
getRange(commits[0], commits[-1])

for i in range(len(commits)-1):
        getRange( commits[i], commits[i+1] )

Fourth, I wimped out again. The previous step created a bunch of directories containing info about each date range nicely formatted in html. Instead of grabbing the info I wanted directly with python, I copied the table of authors (from the web page) into openoffice. I split up the commit field (which contains both the raw number, and the percentage of the total like "3656 (26.20%)") with:


Then I copied the columns around and exported it as a csv, ending up with something like this:

"2005-1 to 2005-7"   "2005-7 to 2006-1"   ...
626                  517                  ...
237                  77                   ...
123                  67                   ...

(again, there might be whitespace tab/space issues in this display)

Fifth, it's gnuplot time! Again, I could automate more of this file, but it worked for my purposes.

# combined.plot
set term png enhanced font
'/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf' 12

set title "Git commits to LilyPond, 2005 - 2010 in 6 month
set xlabel "Rank of developer"
set ylabel "Number of commits"

set key autotitle columnhead
set yrange [6:]
#set xrange [:20]

set style line 1  lt 1  lw 2 lc rgb "#0000ff"
set style line 2  lt 2  lw 2 lc rgb "#0033cc"
set style line 3  lt 3  lw 2 lc rgb "#006699"
set style line 4  lt 4  lw 2 lc rgb "#009966"
set style line 5  lt 5  lw 2 lc rgb "#00cc33"
set style line 6  lt 6  lw 2 lc rgb "#00ff00"
set style line 7  lt 7  lw 2 lc rgb "#33cc00"
set style line 8  lt 8  lw 2 lc rgb "#669900"
set style line 9  lt 9  lw 2 lc rgb "#996600"
set style line 10 lt 10 lw 2 lc rgb "#cc3300"
set style line 11 lt 11 lw 2 lc rgb "#ff0000"

set output "combined-normal.png"
plot "combined.csv" using 1 ls 1 w lines, \
        "combined.csv" using 2 ls 2 w lines, \
        "combined.csv" using 3 ls 3 w lines, \
        "combined.csv" using 4 ls 4 w lines, \
        "combined.csv" using 5 ls 5 w lines, \
        "combined.csv" using 6 ls 6 w lines, \
        "combined.csv" using 7 ls 7 w lines, \
        "combined.csv" using 8 ls 8 w lines, \
        "combined.csv" using 9 ls 9 w lines, \
        "combined.csv" using 10 ls 10 w lines, \
        "combined.csv" using 11 ls 11 w lines

set output "combined-log.png"
set log y
plot "combined.csv" using 1 ls 1 w lines, \
        "combined.csv" using 2 ls 2 w lines, \
        "combined.csv" using 3 ls 3 w lines, \
        "combined.csv" using 4 ls 4 w lines, \
        "combined.csv" using 5 ls 5 w lines, \
        "combined.csv" using 6 ls 6 w lines, \
        "combined.csv" using 7 ls 7 w lines, \
        "combined.csv" using 8 ls 8 w lines, \
        "combined.csv" using 9 ls 9 w lines, \
        "combined.csv" using 10 ls 10 w lines, \
        "combined.csv" using 11 ls 11 w lines

If you want to use any of this, go ahead! I declare it to be public domain.

Caution: as I mentioned in my talk, the raw number of commits per developer is a vague measure. It doesn't include emails (either organizing a project, reviewing patches, etc), amount of work behind each patch, etc. For example, in the range of Jan 2010 - July 2010, I'd say that the two programmers who did the most work (both in terms of the bugfixes and new features they wrote, but also in terms of reviewing other people's patches) were #5 and #6 on the "commits per developer" list.

I've considered starting up a project to give a better measure of a project's "health" -- taking into account emails, bugs fixed, reviewing activity... in the case of lilypond, all that info wouldn't be too hard to gather, and it would certainly be a fun task to develop algorithms to deal with that data.

However, if I want my PhD to be finished ASAP -- and I definitely do want this done so that I can start on my postdoc life -- then I really can't afford to branch off onto that type of work. At least, not alone. If anybody else is interested in working on this project, I'd definitely considering on that team. :)

Posted at 2010-08-05 08:01 | Permanent link | Comments

Sustainable Development in F/OSS

I gave a talk at Rencontres Mondiales du Logiciel Libre, or the Libre Software Meeting 2010, over three weeks ago. I promised to put slides online, but travel, a music camp, and a publication deadline conspired to delay them. I also wanted to clarify a few points in the slides, which then turned into a more substantial rewrite as I discovered more and more things which didn't make much sense without me explaining them verbally. And then I showed them to my brother, an experienced BSD conference presenter, who suggested a bunch more changes. But I'm happy to announce that the (rewritten) slides are done!

Talk abstract:

The time and energy which developers spend on open-source projects is not an infinite resource. Developer effort can stall due to external demands on their time (such as family, career, or health), but also due to internal factors (such as a loss of motivation or interest). Long-term projects (5+ years old) should try to engage in sustainable development practices. How can we retain developer interest? How can we prepare for the inevitable loss of developers? How can we train the next generation of developers?

This talk draws upon experiences from GNU/LilyPond (a 14-year old sheet music typesetter), but makes general suggestions (and warnings!) for users, developers, and project leaders.

Slides: sustainable.pdf

Talk source (released under CC BY-SA 3.0): sustainable.tar.bz2
Requires latex-beamer, includes raw data for git commit counts, but not the scripts which generated that data. I left those on my Glasgow computer by accident, but I could send them to anybody after Aug 3 if they really want.

Later edit: my scripts have been uploaded to Graphing commits per developer.

Posted at 2010-08-01 01:13 | Permanent link | Comments

Recent posts

Monthly Archives

Yearly Archives