Advent Calendar
You'll work through one year of Advent of Code, both parts a day, with a private leaderboard of friends and at least thirty-five of the fifty stars.
About
Advent of Code is a free set of 25 programming puzzles released one a day each December, and every past year stays open, so you can run this in any month you like. Each day has two parts, and part two is where you learn something, because it quietly makes the input bigger or the rules stranger until your part one approach falls over. Every puzzle comes with your own input file, so this is also a month of parsing text, which is most of real programming anyway. The live December run has a buzz to it, and a private leaderboard is what keeps friends going past day 12, which is where most people stop.
At a glance
- Per requirement
- 35 XP
- Completion bonus
- 300 XP
- Requirements
- 6
- Takes
- A month, any month
- Skill level
- Advanced (years of practice)
- Cost
- Free
- Supplies
- Nothing special
- Where
- At home
- Other people
- With other people
Requirements
-
1
Set up one folder per day with a runner that reads your input file from disk, and finish day one, both parts. Keep a template with a function per part and a tiny test for the example in the puzzle text, because that example is the only test data you'll get. Reading the input from a file rather than pasting it into a string is the habit that saves you on the days where the input is 10,000 lines long. Take a screenshot of the folder structure and both stars on day one. Photo
-
2
Hit a day where part two breaks your part one approach, and rewrite it rather than patch it. It happens every year, usually somewhere between days 6 and 12: a list that should have been a count, or a loop that now needs to run a trillion times. Stop, write down why the first approach can't scale, and write the second one from scratch. Take a screenshot of the part one code next to the part two rewrite, with a line on what changed. Photo
-
3
Solve one day where the naive version would run past Christmas, and show the trick that finished it. Time the naive version first and estimate how long it would take to finish, because a minute per thousand steps with a billion to go is a number worth writing down. Then find the trick, which is usually memoization, cycle detection, or doing the maths instead of the simulation. Take a screenshot of the estimate and the fast version's timing. Photo
-
4
Solve one grid day with a breadth-first or similar search, and draw the path it found. Every year has a maze, a cave or a map. Store the grid as a dictionary keyed by coordinates or as a list of lists, and print the result as text art with the path marked. Seeing your search drawn on the grid is how the algorithm stops being abstract. Take a screenshot of the printed grid with the path on it, or film the search filling the grid step by step. Photo or video
-
5
Join or start a private leaderboard with at least three people, and solve five days in the same week as them. Any three coders you know count, and a work or club group is ideal. The leaderboard is free and takes a code to join. The point is being stuck on the same day as someone else and comparing approaches afterwards, not racing to midnight. Take a screenshot of the leaderboard with the five shared days. Photo
-
6
Finish with at least 35 of the 50 stars, and write up the day you couldn't crack and what you'd try next. Days 20 to 25 are where the difficulty climbs, and almost nobody gets all fifty on a first run. Reading someone else's solution after you've given a day two honest hours is fine, and the write-up should say which days that was. Take a screenshot of your star count and a photo or screenshot of the write-up. Photo