Monthly Archives: August 2012

Capture the Flag 2.0

Another nicely put together hacking challenge by @stripe.

Flex your hacking muscles in 8 increasingly difficult challenges. This time the challenge is more web oriented. What? You think just because you’re not a web programmer you don’t need to know this stuff? Oh I think you do mister! Now get your ass over there and put some effort in it. The contest ends on August 29, 2012.

You can skip the intro and dive right in on this page:

Problems using Launchpad through proxy finally resolved

A long-standing bug with Bazaar/Launchpad has finally been resolved! Until recently I was not able to checkout anything from Launchpad through a corporate proxy, getting errors like:

bzr: ERROR: Connection error: Couldn't resolve host '' [Errno 11004] getaddrinfo failed


bzr: ERROR: Certificate error: hostname '' doesn't match either of '*', ''

Finally this has been resolved in Bazaar 2.5.1 (you do need 2.5.1, the problem still existed in 2.5). Another important piece is that if you are using the command line, the proxy should be set in https_proxy environment variable, in the format:

export https_proxy=http://proxyuser:proxypass@proxyserver:port/path

Notice the “s” in “https_proxy”, this is different from “http_proxy”, and required for Launchpad urls such as “lp:someproject”.

With this in place now I can checkout with bzr co lp:theproject as usual.

How to get involved in an open-source project?

Obviously everybody has a different approach to this. Mine involves these main elements:

  1. Find a project you like
  2. Find a project that needs you
  3. Jump in

How to find a project you are interested in?

Ask yourself:

  • Is there a particular open-source software that you just love so much?
  • Is there an open-source software that is almost what you want but just almost?
  • Is there an open-source software where somebody you admire is involved in?

How to find a suitable project that needs you?

Based on your answers above, get on Google and find the website of a suitable project. Some additional factors to look for:

  • When was the last commit? (i.e. recent enough?)
  • How many active committers are there? (i.e. more than one, less than 10?)
  • Which VCS do they use and how can you submit branches? (i.e. a VCS you don’t mind using)

How you evaluate these factors is entire up to you. Personally I prefer small-ish projects where my work will be noticeable, but not too small where the developers might not be too welcoming to new faces.

How to get involved?

Please, please suppress your inexplicable desire of sending an introductory mail saying “hey I’m here I want to work on X”. Do NOT send such rubbish. Also do NOT brag about your past projects either.

The only meaningful introduction is contributing code, period! Just pick something you can improve in the project. Anything! Preferably something small, and indisputably an improvement. Your first commits should not be about showing off your genius. Your first commits should NOT be a big refactoring that makes more sense to you. Your first commits should be small, rock solid and easy to accept. In the beginning keep doing small things, gradually bigger and bigger.

Coding style: in the beginning you just have to adopt the coding style used by the others. Make sure to spend some time on observing the coding style of the core contributors, and adopt the same style in your own contributions. If you disagree with it you can propose an alternative later after you are already a recognized member.


Be patient. Don’t get your hopes high early. It takes time to get to know the members, and it is impossible to know in advance if your personalities will be compatible or not.

If for some reason things don’t work out with the project you picked, don’t let that bring you down. There are plenty of fish in the ocean of open-source projects, don’t expect you’ll find the right one for the first try. Be patient and keep looking. As long as you learn something from the experience, your efforts will never be wasted.

From zero to Django: get Django going in windows within minutes

My 5-step banana ice cream recipe got more reaction in one hour than my usual geeky posts in years. Maybe I should combine the two concepts! Or maybe not. Heck, I already like this title so here’s the geeky recipe: a decidedly imperfect recipe for getting my django project up and running on a fresh new install of windows.

Preparation time




  1. (optional) Install putty, create ssh key with puttygen, save private and public keys, add to authorized_keys on repository server, start pagent, add the key to it.

  2. Install python, install setuptools

  3. Edit environmental variables:
    1. Append to PATH: c:\python27;c:\python27\scripts
    2. Set BZR_SSH=c:\program files\putty\plink.exe
  4. (optional) Install git

  5. Fire up the bash terminal (git bash or DOS command prompt)

  6. easy_install pip

  7. (optional) Install Bazaar, bzr co bzr+ssh://myserver/~/repos/project

  8. Install Django using pip: pip install django==1.4 (use the version you need!)

  9. Install dependencies of the Django project, typically listed in a file: pip install -r requirements.txt

  10. Run in Django’s local server: python runserver

Best served in a modern browser like Chrome at http://localhost:7000/ Enjoy!

Variations for the more adventurous

  • Screw putty, use the openssh that comes with git bash
  • pip install virtualenv, create a virtual env and run Django inside it.