Writing on software design, PHP, and web development

All of my long-form thoughts on programming, product design, and more, collected in chronological order.

Migrating from Gatsby to Astro

Switching from Gatsby to Astro for my portfolio site - a comparison of the developer experience and performance benefits.

class="group inline-flex items-center" aria-label=Read full article about Migrating from Gatsby to Astro> Read article

How to Reclaim Space from Docker Desktop WSL2

Docker Desktop with WSL2 can consume significant disk space over time. Here's how to safely reclaim space and prevent future bloat without losing important data.

class="group inline-flex items-center" aria-label=Read full article about How to Reclaim Space from Docker Desktop WSL2> Read article

The benefits of keeping functions short

There are undeniable benefits to limiting the scope and size of our functions. I don't like to focus so much on 'keeping them short', as I believe this can often lead to decision making based on cosmetics alone, but it's a quick way to get the message across nonetheless.

class="group inline-flex items-center" aria-label=Read full article about The benefits of keeping functions short> Read article

The importance of abstracting third party services

In 2018 it's commonplace to integrate our apps with 3rd party services. The SAAS (software as a service) marketplace is booming and there is seemingly a service for anything and everything.

class="group inline-flex items-center" aria-label=Read full article about The importance of abstracting third party services> Read article

Laravel news – the artisan optimize command is being removed in Laravel 5.6

If you've been monitoring the recent changes to the Laravel repository, you'll know that as of Laravel 5.5 the artisan optimize command has been deprecated. In version 5.6 however, it is being removed altogether. Read on for essential information and for potential consequences.

class="group inline-flex items-center" aria-label=Read full article about Laravel news – the artisan optimize command is being removed in Laravel 5.6> Read article

TLDR: league/oauth2-server project is in need of a new maintainer

The author of 'league/oauth2-server', Alex Bilbie, no longer has time to maintain the package and as such is seeking a new maintainer.

class="group inline-flex items-center" aria-label=Read full article about TLDR: league/oauth2-server project is in need of a new maintainer> Read article

Install xdebug and enable profiling

Installing xDebug and enabling profiling is a two step process, which is described in detail in this post. Both Nginx and Apache are covered.

class="group inline-flex items-center" aria-label=Read full article about Install xdebug and enable profiling> Read article

TLDR: MySql Query cache is being deprecated in 8.0

As of version 8.0, MySQL will be retiring the query cache. Here is the TLDR overview:

class="group inline-flex items-center" aria-label=Read full article about TLDR: MySql Query cache is being deprecated in 8.0> Read article

PHP interfaces, what are they and when should you use them?

As a junior PHP developer, you could probably be forgiven if you have not yet stumbled across or made use of interfaces. As someone more senior, you've obviously not been keeping up. Interfaces have been around since PHP 5.0 and are now widely adopted in most well written libraries and applications. With that in mind, I'm sure you'd agree that it's worth spending a couple of minutes to figure out what an interface is and when you might consider using one.

class="group inline-flex items-center" aria-label=Read full article about PHP interfaces, what are they and when should you use them?> Read article

Laravel – Selecting columns when eager loading relations

Eloquent, the ORM native to Laravel can be powerful when used in the right hands. However, if you're unaware of how things work beneath the hood you may, at times, find yourself struggling. I'm often asked questions related to how eager loading works, and selecting columns when using eager loading seems to raise a common issue.

class="group inline-flex items-center" aria-label=Read full article about Laravel – Selecting columns when eager loading relations> Read article

Boost your search engine CTR with structured content

Structured content is said to be playing an ever increasing role in SEO. It's underestimated, underutilised and it's importance is growing. If you're not using it, then you're missing out on a chance to Boost to your SEO and CTR(click through rate). Oh, and the cherry on the cake is that it's reasonably straightforward to implement.

class="group inline-flex items-center" aria-label=Read full article about Boost your search engine CTR with structured content> Read article

How I used the strategy pattern to tidy up some legacy code

I was recently hired to add some new functionality to an existing PHP application, built using ZF1. The application was developed quite some time ago, and parts of the code-base are slightly dated. After discussion with the client, it was decided early on that as well as adding the new functionality, I would make an effort to improve the existing code. Read on for an overview of how I achieved this.

class="group inline-flex items-center" aria-label=Read full article about How I used the strategy pattern to tidy up some legacy code> Read article

© John Richardson Development. All rights reserved.