PHP Turns 25

This is fantastic, Jet Brains have compiled a timeline of PHP's first 25 years marking out all the key developments of the language. Looking back over this, it has occurred to me that I have been programming in PHP for about 20 years now.

With PHP 8 expected towards the end of the year, the language is still going strong and is constantly improving. Personally, I am enjoying the direction PHP is going and continue to love coding with it.

How to Fix 'ImagickException: not authorized'

Earlier this week we hit an issue with some code that we use to convert the first page of a PDF document into a thumbnail image (in our case a PNG). We use ImageMagick for the conversion. The code had been working well until we deployed it to a new server and it started to throw ImagickException errors.

Lockdown Reboot

Here in the UK, we are now two months into the lockdown triggered by the COVID-19 pandemic. To tackle the frustration of not being able to go out, I’ve been using the time to finish building the next version of this website.

Password Protecting Staging Sites on Laravel Forge Using htpasswd

If you’re using Laravel Forge to host your sites, then you’re probably also using it to host staging sites that are being testing before they go live. It’s usually a good idea to put such sites behind a basic authentication to prevent the likes of Google prying on your pre-production work.

Resolving post-install Issue with MariaDB Install via Homebrew

I have been attempting to install MariaDB on a new MacBook with Catalina installed using Homebrew. However, I hit an issue with the post-install step failing which meant the installation didn’t work. I’m sharing how I managed to successfully install MariaDB here for anyone else that hits a similar problem.

Joining Related Salesforce Objects in SOQL

Objects in Salesforce can be related to one another via a parent-child relationship. For example, the Account object is the parent to the child Contact object; an Account record can have one or many Contact records. Much like in SQL, the child has a field that acts as a foreign key to the parent record. One way of thinking of this is with the analogy that a child has the DNA of the parent that we can use to relate the child back to them.

Happy New Year

Ten years ago I started working full-time as a web developer, leaving behind my career in Physics. It is a decision I have never regretted. For the last decade I have been able to spend my days working on what, for a long time, was mostly a hobby. My passion for developing websites continues today.

Sort Git Tags by Ascending and Descending Semver

Semver is a popular way of versioning applications and software libraries. However, if you use git tag to list out all your tagged versions of a Git repository you’ll probably find the tags returned are not listed in the expected order. That’s because by default Git uses lexicographic order, also known as dictionary or alphabetical order. Therefore, 1.10.0 will come before 1.2.0 when listing the tags in ascending order.

Auto-Correct Git Commands

Did you know that if you mistype a Git command you can automatically run the suggested fix? I’ve been using Git for many years now and only just come across this feature today. To enable it you need to assign a value to the config setting help.autocorrect.