Headshot of Rupert

Rupert McKay

Death

24 Mar 2024

The story of my mother's death

The Skull

23 Sep 2023

An artefact of a human life. What remains, and who will keep it?

How Phi and Fibonacci are connected

09 Jul 2023

The Fibonacci sequence has an intrinsic relationship with Phi. Lets demonstrate it from first principles.

Counting the Hard Way

25 Jun 2023

A dive into esoteric base number systems

Loose Equality violates Transitivity

09 Mar 2023

Why does JavaScript get equality wrong and how could it be different?

Langton's Ant and Unanswerable Questions

21 Nov 2022

How even the simplest systems present impossible questions

Default Options Pattern in TypeScript

24 Oct 2022

Implement flexible function APIs with default options using TypeScript's Partial type and destructuring patterns.

Accessing Unknown Objects in TypeScript

11 Sep 2022

How to solve `Object is of type 'unknown'` errors.

Simulating Dice

13 Aug 2022

Mapping from one die size to another.

Asynchronous Programming in TypeScript

16 May 2022

async/await vs promises.

What is memoization?

28 Feb 2022

Learn when and how to use memoization to optimize performance by caching expensive computation results for reuse.

Sorting in JavaScript

17 Jan 2022

Typical use-cases and rare edge-cases.

What is a number?

03 Jan 2022

Explore why JavaScript's 0.1 * 0.2 doesn't equal 0.02, understanding floating-point arithmetic and the fundamental limits of numeric representation.

React Testing Library Recipes

04 Dec 2021

Common testing patterns for creating confidence in your UI tests.

ESLint vs Prettier

09 Oct 2021

Understanding the distinction between ESLint's semantic error detection and Prettier's syntactic formatting. Why automated tools can't fix everything.

TypeScript 4.4 - useUnknownInCatchVariables

30 Aug 2021

any vs unknown in catch blocks.

Publishing TypeScript React components to NPM

17 Jul 2021

Publishing to NPM can be daunting at first. In this guide we'll make it quick and easy.

Handling Optional Values in TypeScript

10 Jul 2021

What are all these question marks in my code?

Mocking in Jest with TypeScript and React

03 Jul 2021

Practical guide to mocking in Jest with TypeScript. Learn type-safe mock functions and how to mock React components effectively.

Seeing through JSX to understand React Component types

27 Jun 2021

Why you shouldn't use React.FC.

Understanding React Dependency Arrays

20 Jun 2021

Common pitfalls of Dependency Arrays, and how best to use them.

How to Create Custom Hooks

09 Jun 2021

Master React custom hooks to encapsulate reusable functionality, keep components clean, and separate rendering from state management.

Generics aren't as scary as you think

23 May 2021

Learn TypeScript generics through familiar examples like Arrays and Promises. Discover how you're already using generics without realizing it.