Here we are in January 2024. While that means a lot of things, for me it means one big thing — the Advent of Code is done.
What, you’ve never heard of the Advent of Code? Well, you could read all about it, but let me tell you a little about it from my perspective as a teacher…
The Advent of Code is a once yearly coding challenge that takes place from December 1 through December 25. Every day during that time, two new puzzles are released. The puzzles are related, and normally the second builds on the first. All the puzzles are connected to a larger story-line themed around the secular holiday season.
The puzzles start off relatively easy in the first few days, then ramp up to become more and more challenging as time goes by. Each puzzle is designed to be solved with code, but you can solve them any way you choose — you don’t have to provide your code, just an answer based on input that only you are given. Provide the correct answer to each puzzle, and you get a star. Solve all of them for a full 50 stars!
OK, so how do I solve these puzzles? Each puzzle comes with an input unique to you — it may be a number, a file, or some other input for the problem at hand. You will be asked to provide some answer — again, it may be a number, a word, or some other data which can only be generated from the input you have. Simply provide the right answer for the star.
What language do I need to code my answers in? Any language you want! Seriously — Java, Python, C, Rust, assembly, whatever makes you comfortable! The puzzles are setup to validate your answer, not your code, so however you get that answer works! In previous years, I’ve used Java and Python, and two puzzles I solved using an Excel spreadsheet.
What’s the cost to join? No cost at all! Just go to Advent of Code, sign in with whatever method you want! Even now, you can sign-up and participate in previous years’ contests — they go back to 2015.
What do I win? Just bragging rights, and maybe some learning as well. Many of the puzzles will force you to learn new things, like modulo math, advanced data structures, writing compilers and interpreters, machine emulation, and much more! I’ve used some of the earlier puzzles as challenges for my students.
But I’m just a beginner — I can’t compete with all those better programmers! OK, I get it. But ask yourself — how did all those other programmers get to that level? Plus, you’re not competing with anyone if you don’t want to — no one will judge you or compare you to others. Your results are yours, and you don’t have to share them if you don’t want to.
But what if I want to be competitive? Then you can look at the leaderboard and see where you stack up. You can even setup your own leaderboard for you and your friends, or join one that maybe someone setup at work or school.
What if I need help? There is a healthy Reddit community dedicated to providing hints and help. Head there now, and you’ll find discussions on templates people use to setup for each day’s puzzles, answers for previous year’s puzzles, and pointers to other helpful topics. You can search for info on a specific problem by using the search format "YYYY Day DD", where YYYY is the year of the contestm and DD is the day of the problem.
OK, I’m in. How do I start? Simple — go to Advent of Code, register for an account, and check out some of the previous years’ puzzles. Try one or two to get into the swing of it.
And stay tuned here, as I’ll be posting my analysis, approaches, and learnings about the Advent of Code 2023 contest throughout the year. Next week, I’ll cover how I solved Day 1: Trebuchet.
1 thought on “The Advent of Code”
Comments are closed.