Blog

My problems with utility-first CSS

If you’ve not already read it yet, you should read Adam Wathan’s article on how he reached the conclusion that using utility classes was the best way to build consistent components in CSS. As I read the article I followed his conclusions and agreed with his justifications. It sounded like a very reasonable solution. However,…

Modifying Variables in PHP Closures

This one caught me out yesterday. If you use a variable in a PHP closure and try and modify it inside the closure, you will find that the variable outside the closure is not modified. You must pass the variable by reference for it to work. Turns out that when ‘importing’ variables to a closure’s…

2016 Year In Review

As has been my tradition for the last six years now, I like to spend a bit of time on the last day of the year to reflect, consider the year that has been and the year that is to come, and note down some of these reflections for posterity. What a year 2016 has…

Running PHPUnit Tests in Docker

Recently I came across the situation where I needed to run the PHPUnit tests for the project I was working on in PHP 5.6 as they were failing in Travis. The project was a Laravel project and so was running in a Homestead box using PHP 7. For development of other sites I use Laravel…

Backing Up Laravel Homestead Databases

Laravel Homestead is an awesome tool for building Laravel sites. However, sometimes it would be nice if when you did a vagrant destory you wouldn’t lose all of the information in your databases. Or in my case, if you database crashes and you can’t get it back up, it would be great if you had…

How and why I built Web Uptime

Back in May this year I launched a new side project called Web Uptime. Web Uptime provides multi-location website uptime monitoring for your sites. I’m not going to talk so much about what Web Uptime does here, you can see the marketing site to find out more, rather I’m going to talk about how and…