NixOS on the Lenovo Carbon X1 (Gen 12)

My new Lenovo X1 Carbon Gen 12 arrived today. I plan to use this computer as my personal workstation for the coming years. I’ve been watching the evolution of the X1 Carbon series for a while; I was convinced that this is the right model for me. I don …

Raspberry Pi camera on NixOS

In this article, I describe how I configured my Raspberry Pi v1 camera module on my Raspberry Pi 3 running NixOS. The Raspberry Pi OS has excellent support for many camera modules. If you run the officially supported operating system, most cameras work without any further configuration. In my Homelab …

Software Quality

I was always part of software teams that wanted to write high quality software. Most team members felt what was good or bad quality software. Some goodness criteria were accepted by everybody in the team, perhaps some remained controversial. I’m sure every team had heated discussions about software quality …

The Stupidity Paradox

This is a review of the book The Stupidity Paradox by Mats Alvesson and André Spicer which explores the role of functional stupidity in contemporary organizations. The authors’ thesis is that functional stupidity is omnipresent, especially in large firms, and it has a mix of positive and negative outcomes. The …

Year 2023 in review

This post is a short summary of the articles I wrote in 2023. At the beginning of the year reviewed Winston Royce’s 1970 paper on Managing the development of large software systems. This paper is list of suggestions about what makes a software project succeed. Perhaps at places the …

Advent of Code 2023

Solving the Advent of Code 2023 puzzles in Clojure.

Homelab deployment

I configured continuous deployment in my homelab. This article describes how I use Nix with GitHub Actions and Cachix Deploy to automatically deploy NixOS machines on my home network. Overview My home network comprises a wireless router, a few computers, temperature and humidity sensors and remote controllable switches. I configure …

Building Nix packages for the Raspberry Pi with GitHub Actions

Building Nix packages for the Raspberry Pi 3 or newer requires building for an ARM 64 architecture, which Nix refers to as aarch64-linux. To build aarch64-linux binaries we can: Build natively on an aarch64-linux machine. Cross compile for aarch64-linux. Compile with an emulator. The first option is the simplest. For …

Managing the development of large software systems

This is a review of the paper Managing the development of large systems by Winston W. Royce, originally published in August 1970. Figure 2 of this paper often cited as the “waterfall” method, a model that considers the project’s activities as a linear sequence of steps. In fact, this …

Year 2022 in review

This year I wrote only three articles (including this one), so this will be a short review of the articles in 2022. The puzzle of Day 8 in 2021 Advent of Code inspired me to explore logic programming, a lesser known, perhaps forgotten, yet powerful programming paradigm. In this article …

Advent of Code 2022

Solving the Advent of Code 2022 puzzles in Clojure.

Exploring Logic Programming

I revisit the problem Seven Segment Search of Day 8 in the Advent of Code 2021 puzzle series. I implement a declarative solution in Clojure using the logic programming library core.logic.

Year 2021 in review

This year I wrote six posts on this blog (including this one), which is fewer than the ten written in 2020. In the first half of the year I was looking for a new job which sucked up most of my creative energy, but eventually last Summer I changed my …

Advent of Code 2021

Solving the Advent of Code 2021 puzzles in Clojure.

Leaving Pix4D

After four years at Pix4D it’s time to move on.

Practicing writing

In the past years I have been learning about technical writing. In this article I review two books that helped me to improve my writing skills. Then, I present how I practice writing at home and at work.

Markov-chain word generation

Recently I reread some chapters of the book The Practice of Programming by Brian Kernighan and Rob Pike. In Chapter 3 on Design and Implementation the authors present several implementations of a random text generator to compare how various languages’ idioms express the same idea. I wrote my version in …

Building container images with Nix

Dockerfiles are de facto standard for creating container images. In this article I highlight some issues with this approach and I propose building container images with Nix.

Year 2020 in review

This blog has no specific theme, I write about topics that are on my mind at the moment. In this post I reconstruct a story arc of the year and link to articles I wrote in 2020. During the holiday break in 2019 I wrote about functions in disguise. I …

Advent of Code 2020

Solving the Advent of Code 2020 puzzles in Rust.

Deploying with GitHub Actions and more Nix

In July I described how I use Travis CI to deploy this static site to GitHub Pages using a Nix pipeline. Before continuing I suggest reading that article because rest of this post builds on top of that. This article is about the changes I made in this blog’s …

Kevlar

Previously, I distilled the essence of a software delivery pipeline and argued that a transformation step that builds or tests a piece of code can be viewed as a function. Functions compose according to well-defined mathematical rules and they are a suitable model for defining arbitrary pipelines. Instead of talking …

Concurrency in Go, Clojure, Haskell and Rust

In the past I wrote two articles where I explored concurrency in Haskell using some examples from the talk Go Concurrency Patterns by Rob Pike. The examples are different implementations of a simulated search engine which receives a search query and returns web, image and video results. The first version …

Deploying thewagner.net

For a long time I’ve been manually deploying this blog to GitHub Pages. This worked OK because I publish less than once a month. But I always wished for a better, automatic solution. Recently I used Nix to rebuild my home network and I was curious if I can …

Homelab

I own a few computers which I use to experiment with new languages, tools and technologies. I was dissatisfied with configuration management of these machines. I used to install and configure packages manually and I never remembered what I’ve changed. I tried Ansible but I found it tedious to …

Exploring Nix

For the last few weeks I’ve been exploring NixOS and its related tools. This article is an experience report and a collection of learning material I find useful. NixOS is a unique Linux distribution with origins in research conducted at Utrecht University. NixOS handles software delivery and configuration in …

Parallel mindset

Perhaps everything in our mainstream programming languages is at least 50 years old. Loops, iterators, pointers and references to mutable memory locations appeared in Fortran or ALGOL and now they are part of all mainstream programming languages. These constructs were designed for developing sequential programs. But today computers have many …

The essence of a CI/CD pipeline

Practitioners of continuous integration often describe the process of automated software delivery as a pipeline: the source code enters the pipe, it is compiled, tested, packaged and released product comes out on the other end. This methaphor evokes the notions of delivering, modularity and continuity. Teams of different backgrounds relate …

Functions in disguise

I argue that we should use functions to simplify configuration files.

O’Reilly Velocity Conference 2019

I spent three days on the O’Reilly Veocity conference in Berlin. This post documents the sessions I liked the most.

Polymorphism and testing

We can make a function more testable by making it a more generic. Polymorphism allows us to inject test points into our function. This is often achieved by mocks and fakes in traditional programming languages.

Consistent vocabulary in control flow

Mainstream programming languages provide various constructs for control flow: conditionals, loops, exceptions, etc. Many of these can be modeled using the general functor concept. In this post I’m going to show you how. In most programming languages defining a function (or a method, subroutine, procedure, etc.) is simple. Using …

Concurrency without magic

I argue that using a library is the best design pattern. The Haskell ecosystem offers powerful tools for writing concurrent programs.

Build systems à la carte

The work “Build systems à la carte” from Andrey Mokhov and his co-workers taught me a lot about how build systems work. It demonstrates the power of Haskell as a modeling language.

Exploring parser combinators

This is an experience report of playing with Megaparsec, a parser combinator library in Haskell.

Load balancer

In this post we are going to write a simple load balancer in Haskell. The design is based on that presented in Rob Pike’s Concurrency Is Not Parallelism talk (starting around 22 minutes). If you are not familiar with this presentation I highly recommend watching it before reading on …

Think paper

Thinking using a computer is hard. First, a computer is full of distractions, but let’s say we can eliminate those. Second, using the conventional input such as mouse and a keyboard, anything more complex than a character or a mouse click is difficult to communicate to the computer. Where …

Minimum Coin Exchange

I solve the Minimum Coin Exchange problem programmatically using Haskell. I will compare the performance of the naive implementation to that using dynamic programming.

Knowing Algorithms

The other day I got a question from a colleague: Do you know an algorithm for this problem of … details…details? The exact the problem description is not important. It was a well defined problem which totally made sense. I felt that there must be an algorithm for it, but …

Concurrency Patterns

In this post I’m replicating in Haskell some of the examples from the talk Go Concurrency Patterns by Rob Pike. In the talk Pike explains how Go’s built-in concurrency primitives can help writing concurrent code. I was curious to see how the presented examples would look in Haskell …

Working habits

Inarguably David Allen’s Getting Things Done had the great influence on me in developing an efficient working routine. I have implemented my own system based on the book which works well for me most of the times. Interestingly, GTD also taught me what I should not do, and when …

Going mobile

This is an experimental post, sort of proof of principle, to see how comfortable it is to write blog posts from my mobile phone.

Code archeology

Found some code I wrote back in 2004. The goal was to control the movement of a telescope, but I ended up fighting with fork and select.

The ultimate eclipsometer™

Building an obscura camera out of cardboard in the office.

My blogging workflow with git

Create a topical branch and make commits in that. When ready, rebase the topical branch on master and merge. Publish.

Total control

I ordered some electronic components to control my unipolar stepper motor and read data from a 10k potentiometer.

Prototypes for stepper motor control

I have a unipolar stepper motor that I want to control with my Raspberry Pi.

Led and button

I finally got around to tinkering with the Raspberry Pi hardware. A while ago I’d ordered a basic electronic kit from ebay with a breadboard and a bunch of electronic components (resistors, cables, etc) in it. I started with a rather elementary project: control of an LED and a …

Fresh theme

I changed the blog’s theme from the default to fresh. I wanted to have something that uses Twitter Bootstrap so that if you resize the browser window, or read the posts on a small screen, the layout changes dynamically. Also, now there’s a Github ribbon in the top …

Backup

Building a systematic backup solution for my personal laptop at home.

Cardboard Raspberry Pi case

I bought a Raspberry Pi. No need to explain this since nowadays everybody buys a Raspberry Pi. Even if I don’t use it, large part of its (not too high) price goes for charity, I figured. I was reluctant to buy a casing for it in the shop, because …

Brain transplant

In the lab we have a camera system composed of four cameras. The system is controlled by two identical PCs, two cameras connected to each. After a long break of operation, when we wanted to use the system again, the hard drive in one PC decided to quit science and …

Pelican up and running

I decided to start blogging again. I wanted to move away from Blogspot and write posts using some markup in vi and publish them as static HTML. I looked into many static blog generators and I ended up choosing Pelican. The steps in the documentation worked fine, I had my …

Hello world

This is the first post.