Scrum considered harmful


Posted in Agile, Code, Opinion on Oct 25, 2018

Over the years, as a software developer, freelancer and now lead developer software architect, I have come to the conlusion that, on balance, the methodology called scrum is a bad idea in the long term. In this post, I will try to explain why.

Restore a single Mariadb / MySQL database from idb and frm files


Posted in Code, MySQL on Oct 03, 2018

I had a server running Mariadb or MySQL within Docker on top of Btrfs. It ran happily for a while, then got so monumentally corrupted that it was not possible to restore it. I could not dump the data from the docker container because it was impossible to start docker itself, but I was able to make a copy of the mysql directory, so once I had restored the server itself (nixops <3) I had to figure out how to restore the database. In the end, it turned out to be quite simple.

Vindaloo Javascript


Posted in Code, Javascript on Sep 25, 2018

Functions are fun. In most languages, you can pass them as a variable. You can declare them anonymously (lambdas), you can close them over variables (closures). In some languages, you can even execute them on a subset of parameters, and get back another function that takes the missing parameters. This is called currying. In this post, I explore how to implement a form of position-independent currying in Javascript.

git rebase -i --autosquash


Posted in Code, Git on Feb 26, 2016

Automatically place your git commit before another one in the rebase menu via a special commit message.

npm extraneous package


Posted in Code, Javascript on Feb 11, 2016

How to fix the npm "extraneous" package problem

PHP stream_filter_prepend cannot find iconv filters


Posted in Code, PHP on Feb 01, 2016

How to fix the "PHP stream_filter_prepend cannot find iconv filters" message in PHP

Laravel and the compiled.php file


Posted in Code, Laravel, PHP on Dec 18, 2014

To be more efficient, Laravel can optimize its files, by putting certain classes in `bootstrap/compiled.php` to allow the framework to load all of them in one go. The standard composer.json includes a call to `php artisan clear-compiled` as a post-update and post-install command, which has the effect of removing this file. Unfortunately if the updated files are incompatible with the old ones that were just replaced, this can lead to the following error:

Get a mysql replication running again ASAP


Posted in Code, MySQL on Dec 17, 2014

Sometimes, mysql replication fails, because of network problems, a reboot or what have you. The fastest way to get it running again is often to reinitialise the data completely. Here is how to do that.