Owkersplow!

an internet junk drawer

Sign the guestbook

12-27-2024: Advent of Code 2024

This is my third year doing Advent of Code, but it was my first year more-or-less getting to the end.

The previous two years, I’d fallen off around day 15, and my memory of “why” was because that’s the point at which…

  1. The challenges aren’t solvable using “only” brute-force strategies.
  2. (relatedly) The challenges start requiring dynamic programming and memoization.

Surprisingly this year, I found that the dynamic programming hurdle showed up much earlier than expected (day 11), and, even more surprisingly, I didn’t really struggle to solve it. I can’t say for certain what was different. I don’t think career experience has made me any better at solving this type of programming challenge (quite the opposite, I’d guess). I didn’t do any preparation to review dynamic programming techniques/tips. It just felt like I knew how to do it this time around.

Further, I made it to the end of the challenge this year! Which to me means,

  1. I (at least) attempted pt 1 of every challenge
  2. I returned to solve each new challenge as it released each evening.

I did not complete all parts of all challenges: I couldn’t solve either part of days 20 or 21 and couldn’t solve the second part of several other days. But I managed to collect 39/50 stars (i.e. completed 39 of 50 challenge parts) and stuck with it to the end.

For me, this is a huge success!

What made the biggest difference this year was making “an event.” Usually, I get excited about it, but I do it by myself and justify it as a “good opportunity” to get more familiar with a new programming language or technique. This year, I campaigned several of my friends and work colleagues to participate with me, set up my own private “leaderboard”, and used a language I was already decently familiar with (Rust). I reframed the event around the “fun” aspects rather than the “learning” or “personal growth” aspects, and it reinforced the inertia to keep going every night. I can’t over-emphasize how important inviting people to participate with me and chatting with them about it was. It was much easier to stay personally invested when I was enjoying it with other people. And truth be told, only one other person really participated with me. Of the 10+ people I asked, I got 5 to sign up, 4 to somewhat participate, and only convinced 1 person to consistently participate with me. And that’s all I needed I guess! Quality over quantity, having just one other person there with me working through problems and chatting about solutions kept me going.

I think I’ll continue to make Advent of Code a “group event” in future years.

I’ll close this post out with some brief thoughts on this year’s challenges:

  1. One of Advent of Code’s strengths is the simplicity of its input in all challenges. The input parsing of these “leetcode” style problems is usually one of the biggest points of friction and after a few nights, I had built up enough input parsing templates from previous problems that I never felt like I was spending a discouraging amount of time banging my head against input parsing, regex, or file reading.

  2. A ton of the problems in the second half were maze-solving problems. I’m not sure if this was unique to this year or not. After a few of them, it felt like the fastest way to solve any new maze problem was just to slap Dijkstra’s Algorithm on it which was usually enough to solve part 1 and get close enough to a part 2 solution with minor tweaking. I preferred the non-maze problems more.

  3. Rust’s algebraic data types (also called “sum types”) came in handy sooooo much. Algebraic data types may be my favorite feature of modern programming languages.

That’s all I’ve got for now. Here’s to future years of Advent of Code 🍻