Ruby

Advent of Code 2024 Ruby Solutions: Day 7
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
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
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
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 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
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 …

Advent of Code 2024 Ruby Solutions: Day 1
Advent of Code 2024 Ruby Solutions: Day 1

Advent of Code is an annual programming event that offers daily puzzles throughout December, delighting enthusiasts with clever challenges and a festive spirit. If you’d like to know more about what Advent of Code entails, take a look at my previous blog post: Advent of Code Introduction.

I’m …

I play Advent of Code, and you should too!
I play Advent of Code, and you should too!

One of the hardest parts of learning a language’s fundamentals is having enough meaningful problems to solve. “Hello World!” is all well and good, but when do you ever have to use that code in an application you’re building? That’s where Advent of Code comes in for me. …