Grant's Avatar

Grant is a software engineer from Birmingham, UK. On this blog, he writes about all things coding. Find out more about him.

Reducers: Keeping State Transitions Under Control

state-management frontend react design-patterns

State management is one of those problems that starts out simple and gradually becomes complicated so it’s no wonder there are plenty of libraries designed to help with this, with Redux being one of the most popular in the Javascript ecosystem.

One concept that is core to many state management libraries is a simple idea: the reducer pattern.

Concurrency: Comparing Golang's Channels to C#'s Async/Await

golang dotnet concurrency

Comparing concurrency in Go (golang) with C#’s Async/Await.

Creating a simple metronome using Javascript and the Web Audio API

javascript web-audio

How to accurately schedule audio events when writing a time sensitive Javascript application.

Recreating the old iCloud background using Javascript and a HTML Canvas

javascript html-canvas

In this post, I go through the steps I took to recreate the background that used to be on the iCloud web site - blurry bubbles!

Light and Dark theme toggle on a Laravel website

laravel dark-mode

I find using a dark theme for my IDE and operating system is much easier on my eyes, so I use it wherever possible. In this post I explain how to create a toggle button to switch a Laravel website between light and dark themes.

Replacing a Danfoss TP9000 with a 3rd Generation Nest

nest

Step by step instructions on how to wire up a 3rd generation Nest in place of a Danfoss TP9000.

Installing Lubuntu on an Acer Aspire One Cloudbook 11

Lubuntu linux

I wanted a cheap laptop with a decent battery life to run a Linux distribution on and decided on the Acer Aspire One Cloudbook 11. This post details what I did after installing Lubuntu.