-
Open source as a strategic choice
13-08-2020
If everyone jumps off a bridge, would you jump after them? Well, in that case there certainly must be some advantages to jumping off the bridge. Read more about our strategic choice for adopting existing open source solutions rather than maintaining our own.
7 min.
-
How to load an SQLite extension in PDO?
28-05-2020
Recently we ran into the need to load an extension for SQLite using PHP’s PDO database abstraction, which is not supported out of the box. Eventually we found a solution involving FFI and Z-Engine. In this blog post I will take you on a tour of our solution and the black magic behind it.
10 min.
-
Ignoring bulk change commits with git blame
17-10-2019
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!
6 min.
-
Mutation testing in PHP
18-07-2019
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.
8 min.
-
Best practices for PHP exception handling
10-01-2019
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.
13 min.
-
Start testing with PHPT tests in PHPUnit
21-06-2018
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.
7 min.
-
Moving individual MySQL tables on disk
13-02-2018
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.
10 min.
-
PHP Central Europe conference 2017
05-12-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.
4 min.
-
On type safety without generics, and the role of package design
02-06-2017
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.
10 min.
-
Review Roulette: Everyone is a winner!
31-03-2017
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.
4 min.
-
Detecting hidden bugs in PHP code using PHP_CodeSniffer
01-12-2016
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.
6 min.
-
Introducing Review Roulette
20-09-2016
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.
6 min.
-
Serving compressed SVG files
26-08-2016
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.
9 min.