T-shirt competion results!

Back in November we in the Launchpad team made our contribution to the sartorial health of the free software world: the Launchpad t-shirt!

As someone with a clue about fashion might say, the understated charcoal grey of the shirt provides the perfect background to the bright colours of the Launchpad logo. Walk into any conference wearing one of these and everyone will instantly see that you’re all about the colaboration.

But enough of the shilling: it’s time to announce the winners — that’s right, plural — of our Launchpad t-shirt competition! To stand a chance of winning one of our shirts, you had to answer this question:

What’s the average (mean) number of people per team in Launchpad?

Now, this was always going to be a moving target. Each day, people join Launchpad and people register new teams. So, the competition was more about finding a good way to work out the answer.

Before I go into who won, and why, I’d like to thank everyone who entered and also tell you what the answer is right now: 10.28. Here’s how we worked it out:

  1. add up all the active members of each Launchpad team
  2. divide the result by the number of active Launchpad teams.

An honourable mention must go to João Miguel Neves whose answer of 11 was the closest of all the guesses.

So, our winners are:

Congratulations! Launchpad t-shirts are on their way to you.

So, how did they do it?

Mark Lee

Mark was the first person to send us an answer using the Launchpad API:


from __future__ import division
from launchpadlib.launchpad import Launchpad, EDGE_SERVICE_ROOT

launchpad = Launchpad.get_token_and_login('Launchpad T-Shirt
competition', EDGE_SERVICE_ROOT, 'lp-cache')

team_len = 0
team_members = 0

for team in launchpad.people.findTeam(text=''):
   team_len += 1
   team_members += len(team.members)

print team_members / team_len

(Mark’s entry is licensed under the GPL version 3.)

Markus Korn

Markus had a similar idea:


LPMODE=STAGING ipython -p launchpad -c "x = [len(i.members) for i in launchpad.people.findTeam(text='')]; print float(sum(x))/len(x); print len(x); print sum(x)"

To run Markus’ solution, you’ll need to install ipython, bzr branch lp:~thekorn/+junk/ipython.launchpad.profile and then copy/link it to ~/.ipython

Markus noticed something odd when he was working on his entry: the number of teams the API returned was lower than the number reported on Launchpad’s people/teams page. Turns out it’s a bug in the API: launchpadlib’s findTeam only returns teams that have an email address set.

Get your Launchpad t-shirt

You can get hold of your own Launchpad t-shirt — men‘s and women‘s — over in the Canonical shop.

Congratulations to both Mark and Markus and thanks again to everyone who entered the competition 🙂

One Response to “T-shirt competion results!”

  1. Gustavo Says:

    Funny, I thought you meant Launchpad teams working on launchpad.net itself (i.e., Canonical employees) 😉

Leave a Reply