Articles
Running up the worlds (formerly) steepest street
Sep 15, 2020
π2 min read
πRun
On the 15th of July 2019, Ffordd Pen Llech became the Guinness world record holder for the steepest street in the world at 37.5%. The road is fairly infamous amongst cyclists as a hill climb (although it's actually a 1 way road - downhill). It starts behin...
React - Memo
Jul 24, 2020
π6 min read
Memoization is used to speed up applications by remembering the results of "expensive" function calls and calculations, so that they don't need to be recalculated again when the inputs have not changed.
For example, if I ask you to calculate the results o...
Hooking into Gatsby's navigation changes
Jul 19, 2020
π1 min read
On my site there is a toggling navigation menu. But when I toggle it open and then click a link it stays open. This is not right - it should close when you change location. Let's fix it using some really simple hooks in a few minutes. First lets see what w...
Running WordPress on Docker
Jul 14, 2020
π2 min read
WordPress runs on a variety of platforms, but last time I was developing I was using a MAMP stack - Mac Apache MySQL & PHP. It's been a while since I was working on WordPress sites and I no longer have MAMP installed on my machine, however I do have Docker...
Create Playwright tests in jest
Jul 2, 2020
π2 min read
This is a brief guide into setting up Playwright so that it integrates with your existing Jest testing suite. The aim is to get you using Playwright quickly and easily so that you can test the frontend of your web applications. Playwright is an incredibly ...
What are JavaScript closures?
May 28, 2020
π3 min read
Closures are a way to retain a local variable's privacy, but allow it to be accessible in a global scope.
JavaScript has global variables and local variables. Global variables are accessible to everything in your application. Local variables are only acce...
Understanding JavaScript scope
May 18, 2020
π3 min read
Scope refers to which functions, variables and objects other functions, variables and objects are able to access when an application is run. It can seem confusing at first, but with a slightly strange example I will try and explain the basics unsing castle...
Working remotely (from home) - COVID enforced
May 1, 2020
π5 min read
COVID-19 has changed things completely. In a matter of days I have switched from being in an office every day to being at home 24/7. It's not typical WFH, but it does contain a large proportion of the WFH experience. I want to breakdown and understand the ...
Designing a running training plan
Nov 7, 2019
π5 min read
I like to run. I run a lot, and I've found myself running every day of the week with little focus on what I want to achieve. Every day is the same 4-8km with a longer run on a Sunday. It's quite hard to progress myself, and measure my progress when I've be...
Theming Slack using a message
Feb 15, 2019
π1 min read
The Slack (desktop) client allows you to create your own themes. But did you know that you can also set the theme via a message. Simply send a message with the contents being 8 comma separated hex codes. You don't have to send the message to anybody either...
Getting to grips with CSS Grids
Oct 6, 2018
π7 min read
Grids are the latest layout model to join the CSS spec after flex. Like flex, grids open up a whole new world of layout possibilities that will make every web developer's life a whole lot easier. Unlike flex, grids allow you to use more than one dimension ...