This was the first year I participated in Advent of Code.
In case you're not familiar with it, AoC is a Christmas themed programming competition consisting of 25 challenges published daily (from December 1st to December 25th). The web site produces personalized puzzle inputs for each user and expects only the results to be submitted for validation, not full algorithms. Participants may use any programming language they like.
I did not compete for global or community leaderboards - that would be too high of a pressure to remain fun. Instead I took a self paced approach and solved puzzles whenever I felt like it - though I've never skipped ahead to start the next challenge until I was done with the current one. I completed the first 18 puzzles in December 2022 and finished the remaining ones in 2023.
It was very fun!
For me Advent of Code turned out to be the best computer game I played in years (though I'm not much of a gamer). Like many games it requires the player to develop and hone some arbitrary skills but in this case the skills are not useless outside of the game. In addition to programming (obviously) AoC tickled parts of my brain responsible for spatial thinking, math and creativity. I was reminded of how much I enjoyed similarly spirited math and physics puzzles when I was at school - it's a shame these experiences are so rare in adult life.
Roughly since Day 10 I've started taking notes about each puzzle and my thought process during solving it. I've intended to include them into this blog post, but I decided against it. There are enough AoC walkthroughs out there already. Here is a condensed list of bullet points from my notes:
- Advent of Code is fun! Grid puzzles and mazes are very fun, especially 3D ones! Tetris... Yummy! Maze on the surface of a cube... Brilliant!
- At some point I've grown tired. It was beginning to feel more like work and less like fun. Taking a (long) break here and there has helped to bring the joy back
- Sometimes I got stuck. There is a large online community around Advent of Code, so there are a lot of ways to unblock oneself. I did not actively engage with any user group in particular, but on one occasion reading Reddit comments has helped to push me in the right direction, and on another one I've benefited from GitHub's social networking side.
- AoC is a computer game you can continue playing while away from keyboard. A lot of good solution ideas have come to me while I was in shower or in a traffic jam.
- A couple of times I felt very clever when I solved Part 2 of the puzzle before seeing the prompt.
- Off-by-one errors are truly the bane of programmer's existence :-)
I solved all 2022's puzzles using Go language. I've picked it up less than a month before the start of Advent of Code, so I went in expecting to learn a lot and I was not disappointed. I've grown to appreciate the breadth of Golang standard library and to love type redefining. All of my solutions use only the standard library - this happened organically, I did not impose any restrictions in this regard.
All in all, Go turned out to be exactly what it has promised: a nice language with a fast compiler and strict type system. From now on I will choose it over Python for personal projects.
Working on these 25 puzzles I've gotten used to always having an extra thread of thought in background, completely unrelated to personal or work life. Even though I miss it now, I'm not yet sure if I should dive into AoC puzzles from previous years. Do they introduce enough variety to tickle my mind in some new ways or are they just more of the same thing? If I ever decide to try, I've heard that AoC 2019 IntCode puzzles are good - I'll probably start with those.