Blog Posts
I try to post new content every week. The search bar above can help you find what you’re looking for.
You may also find the following links useful:
2026 • 2025 • Tags
Structured Output in LangGraph
Large language models are incredibly versatile, but when your code depends on predictable data structures, free‑form text can be a headache. The same information can be expressed in countless ways, making downstream processing error-prone. Structured output bridges this gap: by defining a schema, …
New Year: New Money Plans!
Investing in the stock market has helped me aim for better long-term growth than I could get from a typical savings account, while keeping risk in check with some simple rules and tax-efficient wrappers. I will share the specific choices that worked for me, the mistakes I will not repeat, and the …
Advent of Code 2024 Ruby Solutions: Day 8
Day 8 is about mapping antennas on a 2D grid and marking antinodes where signals resonate in straight lines, first at a single step beyond a pair and then across entire lines. We will walk through a vector-stepping approach in Ruby that keeps the implementation small, readable, and fast. If you want …
New Year Plans for 2026
First and foremost, let me wish you a Happy New Year for 2026. I hope everyone was able to take some well deserved time off and have recharged the batteries to make the most of 2026.
In this post, I am outlining my plans for 2026 — both at a personal level and in terms of what to expect in the near …
Advent of Code 2025: A Retrospective
In software engineering, it’s typically very good to have a retrospective after a sprint of work. The goal isn’t just to celebrate successes or catalogue frustrations, but to step back and deliberately reflect: what worked well, what didn’t, and what lessons are worth carrying forward? Advent …
Advent of Code 2025: Day 12
Day 12 is the last day of Advent of Code 2025, and the last day is historically quite easy. The puzzle today looks like a polyomino packing puzzle at first glance, but for this input it reduces neatly to a capacity check on occupied cells per region. This was an assumption on my part because of the …
Advent of Code 2025: Day 11
Day 11 is about counting all possible paths through a graph between two specific nodes. This sort of problem is best solved with a depth-first search using memoisation. A tiny bit of state is added in to enforce constraints in Part 2.
The whole thing runs in well under a millisecond per part on my …
Advent of Code 2025: Day 10
Day 10 is by far the hardest puzzle so far in 2025. First a classic bit-flipping puzzle that reduces to XOR over bitmasks, then a minimal-presses counter puzzle modelled as an integer optimisation. If you want to follow the whole series, check out the tag page at Advent of Code, and you can browse …
Advent of Code 2025: Day 09
Day 9 asks for the largest axis-aligned rectangle defined by any two corner coordinates in the input. It then graduates to validating that a candidate rectangle must lie wholly inside the rectilinear loop traced by those corners. Part 1 is a straightforward exhaustive search over corner pairs with …
Advent of Code 2025: Day 08
Day 8 is all about finding edges between 1,000 nodes in a graph, each with a 3D set of integer coordinates. Graphs can be computationally expensive if the wrong types are used, but my solutions run in under a second for each part of the puzzle. Let’s take a look at the puzzle specifics and how …
Advent of Code 2025: Day 07
Day 7 models a downward beam traversing a grid of splitters, and a single dynamic programming pass prepares everything we need for both parts. Part 1 counts where a straight descent is blocked by a splitter and turns into a left–right split, while Part 2 totals the many‑worlds outcomes that land on …
Advent of Code 2025: Day 06
Day 6 presents a neat parsing twist where the same worksheet must be interpreted in two different ways, and a small amount of transposition and reduction logic solves both parts cleanly. We will outline what each part asks for, then walk through a compact Python implementation that builds …











