Pythonic Confessions

So, I have a confession to make.

Many years ago, I had an job interview with Canonical. This was, I think, my second interview. The first had gone well, and the second had been postponed because the original interviewer scheduled to talk to me kept forgetting.

Luckily, I got a new interviewer, who quite rightly asked me if I had any Python code that I could share with him.

Trouble was, I didn't. I'd written plenty of Python by that point, but nothing that was more than a couple of tiny, hacky modules. The place I was working at the time was a PHP-only shop (we wrote our daemons in PHP, FFS... more on that another time).

Thinking on my feet, I told the interviewer that I did have Python to share with him, but that our Subversion server was down for maintenance at the time (which was true enough) and so could I send it to him in 24 hours' time?

"Of course," he said. And so I went home and ported one of our aforementioned PHP daemons -- which I'd written from the ground up so I knew its foibles -- to Python. It didn't take more than a few hours.

And lo, I sent the code the next day, and was then invited for a final interview, and then finally landed a job that I kept for 7.5 years.

But anyway, that's my confession. Sorry, Elliot, and thanks for giving me the job anyway :).

The code I wrote is available on GitHub, for them as is interested. It betrays a complete lack of knowledge of PEP8 or PEP257, and looks like Python written by someone who wrote PHP in his dayjob.