Solutions to the Advent of Code 2024 edition by Jeroen Heijmans.
Prerequisite: Bun.
Also make sure there is a dayXX.txt
file next to each spec with your puzzle input.
bun test --watch
or one specific day:
bun test --watch day08
Here's what I learned (or noticed) each day.
- Intellisense is more important than I thought.
- Gotta take your time!
- Copilot for AoC can be no fun.
- There shall be no premature optimization!
- Saving intermediate but wrong steps helps!
- Sometimes the first part is easy.
- Sometimes the hard part comes first.
- Avoiding math can be useful.
- Be glad that smart folks write (de)fragmenters.
- If you understand the lesson, stop here; otherwise, see lesson 10.
- You've got to memoize important things!
- Take a bit of luck if you can catch it.
- Listen to your Math teacher, kids!
- Don't solve part 2 until you know what part 2 is.
- Always check input and output carefully.
- Persistence is a virtue and a curse, sometimes.
- TODO
- Reusable code can be useful even in Advent of Code.
- Past experience can be king.
- Shower thoughts can be useful!
- Gut feelings are not the same as getting lucky.
- Optimizing code is not for everyone.
- Slow can be just fine sometimes.
- TODO
- TODO
Bonus:
- aoc.infi.nl taught me that A-Frame trumps straight up ThreeJS for small experiments!
I've created a browser extension for Google Chrome and Mozilla Firefox. It is open source to spice up your private leaderboard page with graphs if you want to contribute!
Here's direct links to every year's solutions I have so far:
- Advent of Code 2015 solutions: not available yet!
- Advent of Code 2016 solutions: not available yet!
- Advent of Code 2017 solutions, in JavaScript
- Advent of Code 2018 solutions, in C#
- Advent of Code 2019 solutions, in Python
- Advent of Code 2020 solutions, in TypeScript
- Advent of Code 2021 solutions, in PHP
- Advent of Code 2022 solutions, in JavaScript
- Advent of Code 2023 solutions, in TypeScript
- Advent of Code 2024 solutions, in JavaScript