Daniel Keast

SQLite in Python

Python contains a SQLite client in it’s standard library. This is really useful for prototyping, and great for when a script grows into needing a little more data integrity. It’s really quite unexpected to be able to use something like this without any dependencies.

Magic Jony

Isaac got a little retro TV game box from his cousins for Christmas. It’s great fun, one game in particular stands out.

Jinja template as json

I found myself creating a mock web service for use in tests today. The idea was that during test setup I could post some json data that would then be returned during the test itself. Only a few parts of the response would change between tests, so I wanted to specify as little as possible to keep the tests descriptive.

Managing Android disk usage

I find the MTP implementation on Android to be very flaky. On multiple operating systems with multiple Android devices I’ve had it just hang at some point when transferring files.

Meldon Reservoir

We took a very quick trip out to Meldon Reservoir today. Unfortunately both our kids are feeling under the weather, and only Joe felt up to the task of crossing the dam.

Axiom Verge

I don’t know what’s going on in Axiom Verge yet, but there’s some fantastic horror sci-fi pixel art.

Sum types and Rust

I’ve been listening to the Lambdacast podcast recently. During one episode they had a discussion about algebraic data types and the differences between product and sum types. I’d heard the term algebraic data types before, but had no idea what product or sum types are.

Jekyll

I have no need for dynamic content, and so much prefer the simplicity of having a static website. With a static site generator you can get some of the benefits of dynamic apps (automatically updated menus, avoiding duplication in markup) with much higher security and lower maintenance.

Python DocTest

Python has a module called doctest in it’s standard library that will search for usage examples in your documentation and check that they work as shown. This means you can copy and paste snippets from the interactive shell, and ensure that they’re kept up to date.

Git Commit Messages

I stumbled across this blog post by Chris Beams, it has a very clear explanation of the way git expects commit messages to be formatted. Being able to place explanatory paragraphs, links, pasted error output etc really improves the history of my repos. It was always a struggle with CVS and SVN choosing between an extremely long commit message or losing context. The tools are able to distinguish the title from the description too and so can choose how and where to display them as appropriate.

Let's Encrypt

Let’s Encrypt is a free certificate authority run as a non-profit organisation. I decided to try setting it up on my server, and was finished within five minutes. The certbot tool has been packaged for Debian and has been backported for Jessie. A single command configured Apache to redirect to https always, create the SSL cert, install it and create a systemd timer file to automatically renew it:

Debian

Debian is my Linux distro of choice. I first started using it sometime around 2003, but switched to Ubuntu for several years because I became frustrated with the age of the packages in it’s repository. Going back to Debian has made me appreciate it much more than I did before, several years of fixed versions with security updates means that I can write software and mostly forget about it until the next release.

Python Decimal

The Decimal class in the standard library is the way to avoid double precision errors in Python.