Blog posts
An overview of blog posts I have written, mostly published on external blogs.
Open source as a strategic choice
There is a saying that probably every Dutch parent has once said to their child: "Als iedereen in de sloot springt, spring je er dan achteraan?"
Published 13 Aug 2020 at moxio.com
How to load an SQLite extension in PDO?
Recently we ran into the need to load an extension for SQLite using PHP’s PDO database abstraction. Unfortunately, this is not supported out of the box.
Published 28 May 2020 at moxio.com
Ignoring bulk change commits with git blame
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 moxio.com
Mutation testing in PHP
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 moxio.com
Best practices for PHP exception handling
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 moxio.com
Start testing with PHPT tests in PHPUnit
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 moxio.com
Moving individual MySQL tables on disk
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 moxio.com
PHP Central Europe conference 2017
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 moxio.com
On type safety without generics, and the role of package design
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 moxio.com
Review Roulette: Everyone is a winner!
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 moxio.com
Detecting hidden bugs in PHP code using PHP_CodeSniffer
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 moxio.com
Introducing Review Roulette
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 moxio.com
Serving compressed SVG files
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 moxio.com