Any useful programming language provides a means to implement composite data types, ie. data types built as a composition of primitive and other composite data types. Python provides many ways to implement these structures, but I want to write about how to do this using named tuples and dataclasses.
I just read a fantastic article about the "Make Invalid States
Unrepresentable" principle. I have never heard of this principle by name, but I
have seen code several times which violates this principle and it makes reading
and understanding it incredibly more difficult.
I read an article today about why Firefox had to get rid of XPCOM addons.
The article makes all the right technical arguments as to why Firefox had to
get rid of XPCOM extensions. And Mozilla were correct in the decision to do so
- the presence of XPCOM extensions was …
I recently came across an excellent blog post which has some suggestions
on interesting short-term coding projects. I think these projects are a fun way
to learn a new language (lately, I've been interested in learning Nim and
Ocaml, for reasons that I'll try to explain some other time).
Sending files around a network always seems to be difficult for some reason.
But Python has a built-in utility that makes this much easier. Simply run this
at the command line:
python3 -m http.server 8080
Python will start an HTTP server on port 8080 and it will serve all …
I had never before had to set up an alternate input method for myself. However,
today, my wife asked me to help her do so.
An input method helps users type characters in other languages. Two
popular input method frameworks are IBus and fcitx. In this example,
I'll show how …
Python is my favourite language. Some find it surprising that my preferred
editor for coding is not an IDE, but vim. Not even vim with plugins, but vim
with very few customisations. This won't be an in-depth post on how I use
vim - that would take me too long to …
I want to write a short post on why I feel that document typesetters are
advantageous to using document processors for generating publications. This is
not meant to be a persuasive essay. Rather, I just wanted to take a moment here
to comprehensively describe some technical reasons why I prefer …
I decided this past weekend to set up email my on own domain. My previous
post detailed why I decided to do this. Now I'll explain how I implented it
and why I made some of the choices that I did.
My DNS is registered using Gandi, and they provide …
It has long been a priority of mine to migrate my email addresses to my own
domain name. My reasons for doing this are quite numerous:
Email is probably our most intimate form of communication, and I am
growing increasingly uncomfortable about using external services like
Gmail to host it …
I created this website using Pelican. I think it's absolutely fantastic.
Pelican belongs to a class of software called static site generators. Static
site generators are pieces of software which allow users to write articles
using very simple markup languages such as Markdown, or Restructured
Text and generate them into …