PyCon Australia 2015: The Trosnoth Talk

I recently spoke at PyCon Australia. He’s a video of my talk.

I talk about the open source team platformer, Trosnoth, for which I’ve been leading the development team since the project began in 2006. I share some of the lessons that I learnt over the years of managing this project.

Posted in short | Tagged , , , | Comments Off on PyCon Australia 2015: The Trosnoth Talk

Ubuntu: GPG public key not available during apt-get update

I have recently had a problem where apt-get update complained with errors like this (but more of them):

W: GPG error: http://mirror.internode.on.net utopic Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://archive.canonical.com utopic Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32

A little bit of googling revealed that I should import the keys using apt-key  or y-ppa-manager , but this did not fix the issue for me. In fact, apt-key  assured me that I already had the keys in question:

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 3B4FE6ACC0B21F32

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.HxoG9btVKl --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/rickyrockrat_ubuntu_parcellite-appindicator.gpg --keyring /etc/apt/trusted.gpg.d/sil.gpg --keyring /etc/apt/trusted.gpg.d/webupd8team_ubuntu_y-ppa-manager.gpg --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 3B4FE6ACC0B21F32
gpg: requesting key 437D05B5 from hkp server keyserver.ubuntu.com
gpg: requesting key C0B21F32 from hkp server keyserver.ubuntu.com
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>" not changed
gpg: key C0B21F32: "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>" not changed
gpg: Total number processed: 2
gpg:              unchanged: 2

Since now, after much searching, I have found a solution, I thought it worthwhile to write an article about it here in the hopes of reducing the time wasted by anyone who hits this problem in future.

For full details, check out the answer on the Ask Ubuntu Stack Exchange, but basically, it seems like what happened is that GPG can only handle a limited number of key stores. By clearing out the trusted keys in /etc/apt/trusted.gpg.d , we reduce the number of key stores by one and things start working again. The downside is that Ubuntu no longer trusts the third party sources that I want it to, but at least it trusts the Ubuntu repositories now!

Posted in midlength | Tagged , , , | Comments Off on Ubuntu: GPG public key not available during apt-get update

Exchanging Work in Progress with Mercurial

The Problem

I work with other people on software projects. Sometimes it would be really handy to be able to exchange unstable work in progress with other developers, without having to commit the work as a permanent changeset in our version control repository.

My Solution

I’ve written a Mercurial extension that lets you do just that. Here’s the intended workflow:

  1. You do some work in your repository. You want to share it, but it’s not ready to commit.
  2. You type hg draft , which stores your work in a draft changeset.
  3. You push your draft changeset to your collaborators.
  4. You do some more work, and type  hg draft  again. This amends the previous draft changeset.
  5. You push the new draft to your collaborators.
  6. When you’re ready, you type  hg commit  as usual, and it replaces the draft changeset with a real one.

Get the Code

I’ve published my code at https://bitbucket.org/talljosh/tallhg but before you start using it, there is one caveat: for this extension to work as described above, you need to set up your repository so that changes to history can propagate between repositories. This means you must:

  • enable the (incredibly cool) evolve extension
  • set up your repository to be non-publishing by adding the following snippet to your repository’s  .hg/hgrc  file:
    [phases]
    publish = False

To use my extension, simply get the code:

hg clone ssh://hg@bitbucket.org/talljosh/tallhg

Then enable it in your  .hgrc  file.

[extensions]
draft = /path/to/tallhg/hgext/draft.py

My extension has been tested with mercurial 2.8.2.

How it Works

This extension works by storing metadata which marks your draft commits as work in progress. When further commits are added, this metadata is detected, and the new commit amends the old one.

A Caution

I’ve called the commits this extension creates “draft commits”, but this is very different from the commits being draft phase commits. I realise that this could cause confusion, but I couldn’t think of a better description of what this extension does. If you think of one, please let me know!

Posted in midlength | Tagged , , , , | Comments Off on Exchanging Work in Progress with Mercurial

I Grieve for Mozilla

I don’t know how many of my readers have been following this, but it’s been a big thing in the tech world this past fortnight: Mozilla appointed Brendan Eich as CEO; three board members stepped down; there was outrage on the internet over the appointment and many people claimed they would stop using Firefox; Brendan Eich stepped down; there was outrage on the internet over Eich being “forced out” and many other people claimed they would stop using Firefox.

As far as I can see, the end result is that Mozilla has lost a skilled and respected chief technical officer, and it has lost a lot of goodwill.

I am neither a Mozilla employee nor contributor, but as far as I can see, Mozilla was the only major internet company that clearly stood for something other than their own selfish ambitions. Mozilla cared about their users in a way that Google, Microsoft and Apple do not seem to. Mozilla stood for putting control of the web in the hands of users. It was Mozilla that really introduced competition and innovation into the web browser market. Now they are trying to do the same with the smart phone market. They do this because as a community Mozilla believes that giving people access to better, open technology will lead to better access to information and therefore a better standard of living for people all over the world.

Whatever you think of Mozilla’s choices and responses in the past few weeks, Mozilla seems to have suffered a huge blow. This grieves me. As long as Mozilla still stands for what it stands for, I want to support them as much as I can; as far as I can see no-one else is standing up for these values.

Posted in midlength | Tagged , , , , , | 1 Comment

Storytime with Josh

I’ve started a YouTube channel where I tell Bible stories. The first video was published last week.

I won’t be posting all the videos here, so if you’re interested, you should head on over to YouTube and add the feed to your reader, or subscribe, or whatever it is that people do these days.

Posted in short | Tagged , , | Comments Off on Storytime with Josh