It’s Advent of Code again!

Yup, for the 7th year in a row: it’s Advent of Code time!

Advent of Code is an advent calendar of programming puzzles. Every day of December until Christmas, you get a new puzzle and a piece of the yearly story in which you need to help the elves save Christmas because Santa is in trouble! In the previous years, we’ve repaired the snow machine, the clock that guides the sleigh, the printer that prints the nice and naughty list, time itself, we brought Santa back from the edge of the Solar System, and we tried to take some vacation last year but it was complicated. It seems this year we need to fetch the keys to the sleigh that got dropped in the ocean by a clumsy elf…

The format of the puzzle is a problem and an input (there’s a number of different inputs, assigned randomly (as far as I can tell) to all the users); the solution (typically a number or a short character string) is what matters to prove that you solved the problem. This means that you can solve it with any language you see fit… or even no language at all. There’s a guarantee that all problems can be solved within 15 seconds on 10-year-old hardware, but it may require some more significant work to get there.

I love Advent of Code. The puzzles are interesting and the difficulty ramp up is usually great, the story is whimsy, and it’s good fun. There’s a competitive aspect to it: there’s a leaderboard for the first 100 people to solve the puzzle, and there’s a “private leaderboard” feature on the website that allows to compete with friends or colleagues. I found it a great way to stretch my coding muscles and practice another language.

This year I decided to solve it in PHP: I’m still learning the language (which I’m now using in my daily professional life), and if previous years are to be believed, I’ll probably learn more than a few tricks – looking forward to that! I’m publishing my (ugly) solutions on GitHub as I go: Balise42/AoC2021.

The first day is easy… who’s in? 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s