Improving static data performance with metaprogramming

In my previous post Generating static data with Elixir comprehensions I showed how you can use comprehensions to generate static data in your Elixir application. That static data was stored as a Map in a module attribute and accessible with a function that returns the Map itself. When building your application, you probably know how the static data will be accessed. Elixir has various ways of accessing data in a List, Keyword, or Map, and there are big differences in performance based on the size of tha data set.

Generating static data with Elixir comprehensions

A common requirement in software is to have a static data resource in your application or library. These are typically resources that changes so infrequently that releasing a new version for a data change is fine. Of course you can build these data by hand, but this is error-prone and makes rebuilding the static data more labour intensive. These problems are exacerbated by larger data sets. As good lazy (i.e. efficient) developers we can use code to solve these problems.

Elixir development with Docker

When I start a new project or get setup to contribute to an existing one, the first thing on my mind is: show me the Dockerfile. Why? One of the main purposes of Docker is packaging an application with its dependencies into a portable image that can be run on most any host, thus simplifying deployments. Yet when it comes to development of these applications, Docker is often not part of the picture.

Using Pi-hole on multiple VLANs

Pi-hole has been working like a charm on my network for years blocking ads. I also have it configured with DNS-over-HTTPS using cloudflared for extra security and privacy. Pi-hole has a great guide to setting-up DoH. I recently reconfigured my home network with VLANs to separate the different kinds of devices on my network. There’s my primary/private LAN with the network gear, servers, and my personal systems. Then there’s a VLAN for scary IoT stuff and one for medium-trust devices like Xbox, PlayStation, Apple TV; devices that can access Plex for example but nothing more.

Spec'ing out a Blackbird POWER9

Raptor Blackbird Board

Recently I’ve been intrigued by non-x86 developments in tech. Over the past few years as Moore’s Law has been breaking down, each new generation of x86 processors has been delivering smaller performance gains. Apple is rumoured to be building ARM-based MacBooks, Amazon is deploying ARM servers, Qualcomm is soon delivering the Snapdragon 8cx ARM processor for laptops. The performance is fantastic and power consumption will allow for laptops with all-day battery life. I’m excited.

Developer idioms

Whenever I approach a new spoken language, I’m drawn to their idioms. Expressions that when translated literally, make no sense, but often convey a large concept in a fun way. German and Swedish are famous for their hilariously odd idioms, and Brazilian Portuguese has some truly colourful great ones.

Some of my personal favourites come from the world of software development.

Upgrades and dot-zero versions

In my early days with software, I couldn’t wait to upgrade to the latest versions of everything. Service Packs, patches, major new versions. I wanted to be running the latest and greatest versions of every piece of software I could on day zero.

At my first job, our tech lead who had been at this a lot longer than me took a more conservative approach. We wouldn’t upgrade major software like our database or operating systems without at least one service release being available. We wouldn’t adopt new major versions of language platforms until there had been a service release either. I was sometimes disappointed to have to wait for the latest and greatest, but I went along with it.

More than a decade later and I’m now completely on board with this. And there’s no zealot like a convert, so here I am writing about it.