MySQL's not equal operator doesn't match null values
Today I learnt that MySQL's 'not equal' operator (!=
or <>
) does not match null values unless you are specifically doing a comparison on a null value.
How to Close the Mobile Keyboard on Return in JavaScript
A nice feature that appears on some sites is the ability to have realtime search results. You have a search input that as you type the results update dynamically below without the need tho hit return/enter. However, if to achieve this the form's default behaviour to submit is disabled, on mobile and tablet the onscreen keyboard won't close on return. This can be confusing to the end-user.
To get round this we can listen for the return key being pressed and removing the focus on the input field using the blur
event.
Calculating the Difference Between Two Dates in MySQL
To calculate the difference between two dates, MySQL offers us two different methods: TIMESTAMPDIFF
or TIMEDIFF
. Which you use depends how you want the resulting difference formatted.
Debunking the Web Development ‘5 Minute Fix’ Myth
I recently wrote this piece for the Evoluted blog to debunk the false perception that quick fixes can be done in 5 minutes. As developers, we often underestimate our own processes and devalue the work we do. I wanted to highlight the many stages of the development process for bug fixes. Sometimes, we need to step back and look at the bigger picture.
The Difference Between target=_blank and target=blank
What is the difference between target=_blank
and target=blank
? It’s a question that seems to crop up every now and then. At first, they both appear to do the same thing, open a link in a new tab (or window). However, omitting that little underscore makes an important difference.
Preventing Requests for Hidden Images on Mobile Using Just HTML and CSS
A look at how to improve performance and prevent requests for hidden images on mobile. The approach discussed uses just HTML and CSS, so no JavaScript. This is a blog post I wrote for Evoluted New Media (where I work in Sheffield).
A Developer's Guide to Setting Up Squarespace Redirects

Earlier this week, I was tasked with transferring some Apache page redirects to a new website on Squarespace. This was my first encounter with the website builder. While setting up page redirects was fairly simple, I did encounter a few issues and the errors Squarespace supplied were not the most helpful; so I am going to share what I learnt for anyone else who hits a similar stumbling block.
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.