This is the supporting code for an exercise described in http:https://matteo.vaccari.name/blog/archives/293