Advent of Code as Soulcraft

26 Dec 2021

As we close out another Advent of Code season, this year the Meta Discourse is less around any of the puzzles, and more around whether you should feel pressured to participate. Especially if you see your GitHub activity feed filling up with others starting advent-of-code repos every December, it can feel like you're missing out if you don't want to, or aren't able to participate.

In general I'm sympathetic to these arguments. I'm not into the "rise and grind" and hustle side of software development. And while I've resonated with the idea that passion for programing was an essential part of having a career in software, I'm less beholden to that over time. It's totally fine to treat coding as any other job, and not have it encompass your off-hours time too!

I'd like to offer a limited defense of Advent of Code and other programming puzzles (Project Euler, Code Retreat, and the like). These particular challenges recharge me and get me excited for my day job, and I think that's a more sustainable way to approach the puzzles than "you should always be learning new things, or you'll fall behind".

For me, Advent of Code really scratches an itch to do test-driven-development in as ideal an environment as one could cook up:

  • The problems are well-defined and don't contain business-logic ambiguity
  • Sample inputs and outputs make for simple test definitions
  • The two-part nature of each puzzles encourages clean code and the red/green/refactor programming cycles

When I get into a TDD loop, it feels fun, almost therapeutic. It's rare that I get these opportunities during the work week, so getting the chance for fresh puzzles is a really great feeling.

If this isn't the case for you, that's fine! And Advent of Code doesn’t have to be performative, you can make your repo private (or just delete the code when you're done!). And the puzzles are around all year, you can use them as a pallets cleanser throughout the year, they’re still around!

All posts

I'm Matt Steele, a programmer living in Omaha, Nebraska. You can find me on GitHub and Twitter.