Awesome
Advent of Code 2018
Solutions to the Advent of Code 2018 edition by Jeroen Heijmans.
Running
Pick your poison:
- Command line:
dotnet test
- IDE, just run all the tests with your favorite test runner
Lessons
Here's what I learned (or noticed) each day.
- You should prepare if you want to compete in challenges.
- C#'s LINQ features are not "like riding a bike".
- Don't use all input you get for problems.
- I have a healthy fear of DateTime types, and avoid them unless needed.
- Using mostly "for each" in app development, I almost forgot "Off By One" errors existed.
- Sets are fast for 'Contains(...)` operations.
- God I wish I knew Python and its graph libraries...
- Static typing can slow you down a lot in AoC.
- Doubly linked lists are the bomb!
- Not everything is (nor should be) easily unit-testable
- Having a partner that understands (and puts up with) your hobbies is golden!
- Advent of Code is the Game of Life for one month a year.
- Object Oriented programming sometimes still shines.
- Choose the right data structure for the right job.
- I have determination! (And also spent 17+ hours over two days on this puzzle.)
- Bulky, precise work requires concentration.
- Physics are fun!
- Excel to the rescue (for a quick & dirty answer). Again.
- I despise low level programming and debugging.
- Real regex engines must be mindbending to build.
- I abhor low level programming and debugging.
- Pathfinding in puzzles is tricky. Pathfinding in real games must be grueling.
- I didn't know what "SMT" was, and am apparently quite bad at handcrafting one.
- Flavor and context to problems mean a lot to me!
- Being precise is hard. Being precise at 05:00 in the morning is harder.
Compendium Repositories
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