Pages tagged “coding”


04 Feb 2024

Super slow-mo Tetris

A new gadget entered my life a while ago: Father Christmas brought me a Badger 2040W. It’s a wifi-connected computer, that runs python and has an e-ink display. It has fairly low power consumption, and is easily programmed to sleep most of the time. Also e-ink retains an image even when power is removed, so it ought to be able to show something that updates fairly slowly, and run on battery power for many days.

Full post


12 Aug 2014

Patch updates in pinned Python packages

A post about Python programming with a tongue-twisting title… Most Python projects rely on libraries (packages) from elsewhere, in particular from PyPI. Although it means you have to manually check for new versions of this third-party code, it’s a good idea to explicitly “pin” the version of each dependency, and this is usually done in a file called requirements.txt. This way, you know that what you use in development is the same as what you deploy.

Full post


16 Jul 2014

Automatic testing FTW

When you’re building something made of software (!), it’s widely-accepted best practice to write tests for it. Nothing new there. Attending an excellent event in Cambridge last week, a superb presentation by Tim Perry from Softwire made me realise something else though. Writing tests makes your application more secure. This sounds trivial, but I mean tests like “does the widget do what it’s supposed to do” tests, not “does the app refuse log in if the password is wrong”.

Full post