Josiah Winslow solves Advent of Code

With massive inspiration from (and apologies to) David Brownman.

About

Advent of Code is a yearly advent calendar of programming puzzles created by Eric Wastl. Every day of December until Christmas features a two-part puzzle, with the second part unlocking after the first is completed. This website compiles my own solutions and explanations for each puzzle I’ve solved.

I’ve been solving Advent of Code with Python since 2023 and sharing my solution explanations since 2024. I try — hopefully sometimes successfully — to write clear code that’s easy to explain, as I find it helps make my code easier to understand and iterate upon.

I like Advent of Code. Not only does it give me a chance to practice coding and problem solving, but it also helps me learn new things about Python specifically and computer science in general.

Background Knowledge

My explanations assume that you know at least a little bit about programming. The more you know, however, the more you’ll likely get out of them.

You’re expected to know the very basics of Python at bare minimum, but I will also use and explain some intermediate and advanced features of Python. And while my explanations will be Python-specific, the ideas involved should be applicable to any programming language you may know.

Each solution’s explanation assumes that you are familiar with the previous solutions that year; I would recommend reading each year’s solutions in order, to not miss anything important.

Goals

When writing my solutions, I try to ensure that they:

The end result may not be the absolute best code in the world, but at least it’s mine, and it’s the best I can make it. That’s what counts.

Inspiration

During Advent of Code 2024, I made one blog post for each day’s puzzle, for a total of 25. For comparison, my blog only had 10 posts beforehand. So even though I still wanted a public place to put my solutions, I didn’t want them to clutter my blog.

The thing that pushed me to specifically create this website was David Brownman’s Advent of Code blog, where he’s been putting his own Python solutions since 2020. He presents his solutions very effectively, his solution template (which I use a modified form of) is easy to use, and the Expressive Code engine he uses in his writeups makes his code blocks look sweet!

I used a modified form of his blog’s code as a basis for this one — mainly because I wanted the same style of code blocks, and Expressive Code doesn’t work with Pelican yet. This site wouldn’t be possible without his blog, so I’d recommend checking it out!