Blog posts

An overview of blog posts I have written, mostly published on external blogs.

Ignoring bulk change commits with git blame External

A long-standing objection to making bulk changes to code using automated tools is that it clutters the output of git blame. With git 2.23, this does not have to be the case anymore!

Published 17 Oct 2019 at

Mutation testing in PHP External

Recently I spent an afternoon experimenting with mutation testing in PHP. In this post I would like to share the background, the main idea of mutation testing, and the lessons I've learned from it.

Published 18 Jul 2019 at

Best practices for PHP exception handling External

Handling errors or other non-'happy path' situations is essential when creating robust PHP applications. Proper exception handling takes quite some effort, but will eventually result in a much more stable application. In this post, I would like to introduce you to the set of best practices we have adopted at Moxio over the years.

Published 10 Jan 2019 at

Start testing with PHPT tests in PHPUnit External

Learning to test and learning a full-featured testing framework at the same time can be hard. Let's make the learning curve for testing more gentle using a simple test format that does not require extra infrastructure.

Published 21 Jun 2018 at

Moving individual MySQL tables on disk External

Moving one single MySQL database to another location on disk (e.g. to free up disk space) turns out to be far from straightforward. In this post I will describe what we can learn of our failed approaches, and what solution we eventually came up with.

Published 13 Feb 2018 at

PHP Central Europe conference 2017 External

Early November I attended the first edition of phpCE, a new PHP community conference in Central Europe, originating from a merger between PHPCon Poland and Brno PHP conference. In this blog post I would like to share some of my experiences and things I have learned during that event.

Published 05 Dec 2017 at

On type safety without generics, and the role of package design External

At Moxio we strongly value writing type-safe code. This can be a challenge in PHP however, especially as it lacks a feature known as ‘generics’. In this blog post I will show how (lack of) generics influences type-safe design, how parameter types and return types may change when extending a class or interface, and how we can keep our package design sound while doing so.

Published 02 Jun 2017 at

Review Roulette: Everyone is a winner! External

In an earlier blog post I introduced our idea of Review Roulette, a process of randomized code reviews with the aim to foster learning and increase collective code ownership. I explained that we would try this idea out as an experiment for two months and evaluate afterwards. I also promised to share the results of that evaluation. In this post I will do so, and describe the steps we took to make Review Roulette work even better for us.

Published 31 Mar 2017 at

Detecting hidden bugs in PHP code using PHP_CodeSniffer External

Although PHP serves us well as a programming language, we cannot deny that some of its behavior can be very surprising, which can easily lead to hidden bugs. In this post we will look into two potential pitfalls in PHP, and how these can be detected and avoided using our open-sourced collection of sniffs for PHP_CodeSniffer.

Published 01 Dec 2016 at

Introducing Review Roulette External

At Moxio we recently started an experiment we called 'Review Roulette': a process of randomized code reviews. We believe this emphasizes code reviews as a means of bidirectional learning and helps onboarding junior developers, and thus improves upon our previous review 'policy'. In this post I would like to sketch the background behind this experiment, explain the idea of Review Roulette and present some preliminary results.

Published 20 Sep 2016 at

Serving compressed SVG files External

Over the years, Scalable Vector Graphics (SVG) has become the de facto standard for vector images on the web. One of its disadvantages however is its verbose XML-based format, with relatively large file sizes as a result. Luckily, the plaintext nature of XML lends itself well to compression. Serving compressed SVG files correctly from a web server takes some care however.

Published 26 Aug 2016 at