Build a snake game on the BBC micro:bit

A detailed tutorial (simulator included)

Tutorials

By the end of this tutorial, you'll have built your very own game and learned not only about game development, but Python and the BBC micro:bit too. What's more, you don't even need to own a micro:bit to follow along!

Continue reading »

Easy Python speed wins with functools.lru_cache

Tutorials

Recently, I was reading an interesting article on some under-used Python features. In the article, the author mentioned that from Python version 3.2, the standard library came with a built in decorator functools.lru_cache which I found exciting as it has the potential to speed up a lot of …

Continue reading »

Better parameter validation in Flask with marshmallow

Tutorials

Recently I've had two Flask projects with endpoints that take lots of parameters. While working on the first project, I noticed that I was writing a lot of code for validation in each method, and it ended up looking ugly and probably full of bugs. When I started the second …

Continue reading »

How to configure DNS for custom domains on GitHub Pages

Tutorials

Recently-ish GitHub announced that HTTPS would now work on custom domains with GitHub Pages. This was a great bit of news, because the web is slowly moving towards a HTTPS-only state of being and it's nice not to be left behind.

Unfortunately for me, for this new feature to work …

Continue reading »

How to read WAVE files in Python

Tutorials

Any project that uses audio will usually start out using WAVE files for its on-disk presence, and as with many things in Python, there's a standard library module for that. Now don't get me wrong in the rest of this article - wave does the job. The thing is that it …

Continue reading »