One of the most tried and tested techniques in programming is to build components that
map closely to the real-world problems you are trying to solve. In domain-driven design
(DDD), one of the key tenets is to have a domain model at the centre of your
application.
The domain model should be built in close collaboration with domain experts and,
crucially, should consist purely of high-level domain logic and be completely free of
low-level application logic like databases, GUIs, web frameworks etc.
Talos Linux is a minimal Linux distribution designed purely for running Kubernetes
nodes. It’s pretty neat, check out its website here: https://www.talos.dev/
I use XCP-ng in my homelab for running virtual machines and decided to set up a Talos
cluster there. I followed the excellent Getting Started guide but there are a few
additional things I wanted to do right from the start:
Have the Xen Guest Tools (aka Xen Guest Utilities,
xe-guest-utilities. xen-guest-agent etc.) installed on the nodes,
Have static IP addresses.
I also had to configure the installation disk as mentioned in the guide, to /dev/xvda.
In a previous article I wrote about adding maps to my blog, which is a static site. I
use these maps to write about walks I’ve done. These maps can be dragged, rotated and
zoomed, but there is no backend tileserver supporting it, it all comes from a single
static file. This is thanks to the PMTiles format and support by the frontend renderer
maplibre-gl.
In the original article I took a pre-made pmtile file of the world from the Protomaps
project and extracted a smaller part using the pmtiles CLI. Later I ended up making my
own pmtiles directly from OpenStreetMap data, which I’ll describe below. This provides a
lot of geographic data like coastlines, forests, roads etc., but what I really wanted
was hillshading, which I’ve now figured out.
The West Highland Way is a waymarked, long-distance path in Scotland. It starts just
north of Glasgow and ends at Fort William in the Highlands. It is probably the most
famous of Scotland’s Great Trails (similar to the National Trails in England and
Wales). In September 2024 I walked the West Highland Way over seven days with my partner
Vicki.
Planning
At 154 km the WHW will take most people between 5-10 days to complete. We didn’t fancy
any super long days, so we decided to do it in 7 days.
I’ve been using Kubernetes successfully for a while, but I felt like I still didn’t
fully understand the difference between an Ingress and a LoadBalancer. Whenever I tried
to find an explanation I’d find some vague thing like “they are sort of the same, but
not really”.
The problem is I was thinking about these things wrong. One is not a replacement for
the other; they exist in different planes of abstraction within k8s. For someone who
just wants to deploy a web service, there are three orthogonal concepts you need to
understand in k8s.
Habits are really important. Long-term goals are too but, ultimately, habits are what
you are doing to yourself day in, day out. Your habits determine what goes into your
body (your diet), your physical condition (diet and exercise) and your mental condition
(sleep and everything else).
I think you should make reading one of your habits.
The benefits of reading are many. First of all, it’s a great form of entertainment. You
can read anywhere; you won’t disturb anyone. I love films, but the books are almost
always better than the films. Really. A good book can conjure images in the mind that a
film could never capture and these images never age. You’ll never go back to a favourite
book and be disappointed at how bad the CGI looks now.
I ran into a weird problem where I couldn’t access the OPNsense web UI using an OPT1
interface. The fix is easy, but it can be very confusing and it’s all caused by an
unintuitive default.
I’ve been playing around with OPNsense inside a VM as I prepare to replace my current
pfSense router which is no longer fast enough. I have a quad network card which is
passed through at the hardware level and, in addition, I have the virtual network
interface provided by the hypervisor, xcp-ng.
The title of this post isn’t supposed to be provocative. After all, it’s simply the
textbook definition of what git is. So why bother stating it? Well, I’ve worked with a
fair few junior developers now and I’m starting to see a pattern. Many of these
developers have never programmed without git and they see git simply as “the way to
get new code into a repository”. A glorified copy, essentially—but an annoying one
that is prone to going wrong.
The Norfolk Coast Path (NCP) is a waymarked, long-distance footpath and National Trail
in England. It stretches from Hunstanton all the way along the Norfolk coastline to
Hopton. I walked it with my partner Vicki over the course of seven days in
September 2022.
Planning
The NCP is around 135 km (83 miles) long and quite flat. The way is mostly on good, well
trodden paths with some slower sections on sandy and shingle beaches (but you can often
choose to walk inland on firmer ground instead). Fortunately there are no pebbles and
the shingles didn’t become too tiring.
At first glance, undo seems like a simple thing expected of most software these days and
hardly worth writing about. Indeed, when I say Emacs has a very powerful undo
system—probably more so than any other text editor—you may wonder what could make an
undo system powerful. So let’s start by considering two big problems most undo systems
have:
If you undo something, make some changes, then change your mind, what you undid is
now lost and unrecoverable,
If you make changes in two parts of the same file you cannot undo changes in the
first part without undoing changes in the second part too.
Emacs comes with solutions to each of these out of the box. Read on to understand how it
works and how we can improve upon the defaults even more.