Short Variable Names in Go

When I first started learning Go, I heard a lot of people talk about the idiomatic way of doing things. “Sure, that way works, but this is the way we do it in Go.” I’m OK with that - a strict convention can give every piece of code a strong sense of familiarity - and Go has quite a few of these. One such convention is to use short variable names. Variable names in Go should be short rather than long. This is especially true for local variables with limited scope. Prefer c to lineCount. Prefer i to sliceIndex. ...

24 May, 2020

Cache Busting with Jekyll

If you’re running Jekyll and updating styles fairly regularly, you may want to add a cache busting line to your styles and scripts to ensure you (and your visitors) are always accessing the latest version of your assets. ...

9 February, 2020

Murfitt.net is now on Jekyll

This website has been run on various CMSs and frameworks over the years. Joomla, Drupal, Laravel, Symfony…and now Jekyll. ...

7 February, 2020

Creating immutable objects in PHP

You may have seen the \DateTimeImmutable class being used, and wondered why is this different from the \DateTime class? I guess it’s the same…but immutable, right? Why would I want to use an immutable object? Here’s a brief overview. ...

27 January, 2019

Move from Laravel 5.4 to Symfony 4

Hello from Symfony 4! Today I finished the move from Laravel to Symfony 4. The content and design hasn’t moved, but the entire backend has been rewritten using Symfony 4. I’ve managed to keep the content online for well over 10 years, and it’s been running on various versions of Drupal (5, 6, and 7) after being completely rewritten and migrated to Laravel a couple of years ago. A few months ago, I decided to rewrite it again, this time in Symfony. I saw a demo of Flex at Symfony Live last year, and I thought it looked like a lot of fun to work with. And it is :)

20 February, 2018