Last year, mid-November, I discovered the annual Advent of Code challenges. This is a fun event happens every December, with a programming challenge posted nightly every day from the 1st to the 25th. The challenges are interesting and varied, and form a story (of sorts) about Christmas elves and their adventures.
People all over the world give these challenges a try; nearly 250 thousand people completed at least the first challenge. Though we're all facing the same tasks, the input file — and therefore the correct answer — is unique to each player. So you can't just find the answers on the internet; you have to write some code. (And in fact each day has two versions of the task: a simpler version, and a more complex follow-on.)
I decided this would be a great chance to exercise MiniScript, a new(ish) scripting language designed to be particularly simple and clear. And so I did. I did early challenges in command-line MiniScript, but after a few days, switched to Mini Micro so I would have access to graphics and some handy libraries.
The result was, in short, a delight. I was able to solve both versions of all 25 tasks, and MiniScript held up like a champ. And in many cases, I was able to produce fun (or even useful!) visualizations of the problem and solution.
So, for posterity, here is a link to my write-ups of all 25 challenges from the 2022 Advent of Code.
- Snack Calories
- Rock Paper Scissors
- Rucksack Reorganization
- Camp Cleanup
- Supply Stacks — the first day I used Mini Micro
- Tuning Trouble — first time I got into the top 1000
- No Space Left On Device — solved two ways
- Treetop Tree House
- Rope Bridge
- Cathode-Ray Tube
- Monkey in the Middle
- Hill Climbing Algorithm
- Distress Signal — first time in the top 300
- Regolith Reservoir
- Beacon Exclusion Zone
- Proboscidea Volcanium — first time I went to bed without a solution
- Pyroclastic Flow
- Boiling Boulders and a follow-up
- Not Enough Minerals — my least satisfying solution
- Grove Positioning System — a hard lesson about making assumptions
- Monkey Math
- Monkey Map
- Unstable Diffusion
- Blizzard Basin
- Full of Hot Air — a blissfully simple final challenge.
I already wrote some final thoughts at the end of my Day 25 write-up. So, I'll just conclude here by saying that the exercise was both fun and useful, and I'm looking forward to playing again next year!