Advent of Code
Advent of Code 2025: Day 05
Day 5 serves up two courses: a quick taste test to check whether each ingredient is fresh according to ranges of fresh items. Then a hearty main where we reduce overlapping ranges of the fresh items and identify how many unique ingredients are included. We manipulate the input into integers for …
Advent of Code 2025: Day 04
Day 4 boils down to counting and then repeatedly removing rolls of paper that have fewer than four neighbouring rolls.
A small Grid2D helper plus a couple of concise functions are all you need.
We will go over the rule for a roll being accessed, show how to parse the grid and inspect eight-way …
Advent of Code 2025: Day 03
Day 3 builds a number from digits by picking a subsequence with the largest possible value, and the same greedy approach powers both parts. We will unpack the problem requirements at a high level, then walk through a compact Python solution that selects the maximum value subsequence per digit …
Advent of Code 2025: Day 02
Day 2 of Advent of Code 2025 is a satisfying dive into pattern detection over numeric ranges, starting with pairs of repeated digit sequences and then generalising to any number of repeats. The Python solution below uses straightforward string slicing and chunking to get the job done with clear, …
Advent of Code 2025: Day 01
Day 1 of Advent of Code 2025 is a neat exercise in modular arithmetic, where you track a circular dial and count how often it hits zero. Part 1 counts only the zeros landed on at the end of rotations, and Part 2 upgrades that to count every click that passes through zero mid-rotation too. In this …
Advent of Code 2025: Preparations
Advent of Code 2025 is almost here, and this year I am aiming squarely at speed and optimisation across all 12 puzzles using Python and UV. I will publish a short post every day covering the approach and performance choices, and you are very welcome to join in using whichever language you want to …
Advent of Code 2024 Ruby Solutions: Day 7
Day 7 of Advent of Code 2024 boils down to testing all left-to-right operator choices between fixed numbers and summing the targets that are achievable, and a compact base-k iterator in Ruby keeps both parts small, clear, and fast.
You can browse the rest of this series under Advent of Code.
The …
Advent of Code 2024 Ruby Solutions: Day 6
First I’d like to apologise that this is the second week in a row that I’ve covering Advent of Code. I’ve not had as much time to write this week as I’d like to. I will try to get something more substantial out in the following weeks.
Day 6 of Advent of Code 2024 turned out …
Advent of Code 2024 Ruby Solutions: Day 5
Day 5 of Advent of Code 2024 is all about enforcing page ordering rules and pulling the “middle” value out at the right time, and my Ruby solution keeps it tidy with a small helper, a simple validator, and a lightweight reordering trick for the second half. If you want to browse …
Advent of Code 2024 Ruby Solutions: Day 4
Day 4 of Advent of Code 2024 turns a simple word search into a neat grid‑traversal exercise, and my Ruby solution keeps it readable, fast, and precise. This post explains the requirements for both parts, then walks through how the code solves them, including how diagonals and boundaries are handled. …
Advent of Code 2024 Ruby Solutions: Day 3
Advent of Code is an annual event that invites programmers to solve a series of themed puzzles each December, and this post is the third in my ongoing series for 2024. Day 3, “Mull It Over”, seemed simple at first glance: find and evaluate multiplications in a corrupted memory dump. But …
Advent of Code 2024 Ruby Solutions: Day 2
A couple of weeks ago, I published the first post in my Ruby solutions to Advent of Code 2024. In this second post of the series, we’ll tackle Day 2’s challenge: “Red-Nosed Reports.” Join me as we explore the problem, understand the requirements, and walk through my Ruby …











