Home Flight manual By tags Ramblings Colophon RSS

The Advent of Code

Deck the [Git] tree with lines of logic, fa-la-la-la-la, la-la-la-la.

There's my rendition of Deck the Halls, for 'tis the season to be jolly!

In some sort of reverse-Cinderella blessing, just as her enchantment vanishes as the clock strikes the twelfth hour, some uncharacteristically merry and serene mood washes over me as we ease into the twelfth month.

It's that time of the year again, that comfortable December that we've been building towards all the while. And what better celebration than the whimsy-spirited Advent of Code?

The AoC is a yearly event running from December 1st through 25th1, just like contemporary Christian Advent calendars.

So, what is it? In a few words, it's a collection of programming exercises, lovingly crafted each year over the course of quite a few months, by a single creator, Eric Wastl. But over this fairly standard premise come three! charming twists:

  1. the challenges get progressively harder as the month goes, ranging from frankly trivial, all the way to requiring truly savvy engineering.

  2. each day proposes a first task, then a second one that merely changes a parameter and, innocently, cranks the challenge up a (possibly quite serious) notch. Your naive algorithm may well work originally, then end up requiring more time than what our best estimates suggest is left of Earth subsisting.

  3. each and every daily challenge is tied up in a lovely, quirky, pure and wholesome scenario involving various fantastical shenanigans in the wonderful and whimsical world of the little Christmas helpers. Not only that, but they all build from one to the next to arrive at a culminating goal of addressing yet another logistical nightmare in organising that celebration.

But the Advent of Code wouldn't be complete without its rallying quality: the spirit of Christmas, for me and many others, is sublimed by this now well-established tradition of working together towards a common goal of having fun honing and sharing our skills, helping one another out, competing (for those who want to), claiming virtual achievement stars...

You can set up private "leader boards", where you don't necessarily have to track how fast people got to implement their solution (they do come out at 6am where I live2), but it's a nice way to encourage yourself to earn more stars by completing the challenges, and maybe a good occasion to have some lengthy coffee break with your friends or colleagues to work through some particular task.

You can join some of the wonderful communities of online streamers tackling the exercises live. You can dive into the r/adventofcode subreddit to share your solution and explore that of others. Some people make it as few lines of code as possible, compute as fast as possible, use the most esoteric languages ever incepted...

A favourite of mine are the masterful visualisations that some folks never fail to deliver on. Web sites, videos, ASCII art animations, PICO-8 implementations, you name it!

And, even if you mean to fly solo, this shall serve as one of the very best excuses to build yet another home-made AoC-solving framework for oneself (only to promptly abandon it half-baked before the next December peeks around the corner), try your hands at another language, simply dip your toes in software programming or whet and satiate your appetite for some fun, technical challenge.

Will you join us in figuring out how to best help quantum elephants find their way through some 8-dimensional Discworld, where turtles are currently re-stacking themselves in some classical Tower of Hanoi scenario?

With its inauguration dating all the way back from 2015, this charming celebration turns 10 years old today, and I can wholeheartedly say that it has been playing a large part in making December my favourite time of the year.

Thank you, Eric Wastl, and the greater community, for this delightful treat that unites programming enthusiasts, resonating even more than the Hacktoberfest in our hearts.

  1. Well, starting this year, it'll "only" run from the 1st through the 12th, for several reasons, chief among them being how demanding it is to put together each year.

  2. For logistical reasons, the Advent of Code's new puzzles always systematically come out at a single instant across the world: midnight EST, or GMT-5.