Code for the Advent of Code challenges from https://adventofcode.com . (AOC)
Every day in the advent, a somewhat computer related riddle is published on AOC, with variable input for every user and a validation and scoring system. The riddles are getting increasingly more difficult in later days.
For me the challenges started as programming exercises and a way to get more fluent in python. Over the years I became better and faster at understanding what to do and how to do it.
My main goal now is to use no additional libraries, but some problems are rather tedious without proper vector or matrix multiplications. I use numpy and or scipy for everything matrix related if I cant think of another way to get the solution. To still have a few basic vector calculations without packages, I added a few helper functions to streamline my code. This increases readability and reduces the amount of code I have to write. Additionally, I created two file loaders that are generic enough to be useful many times.
My side goals are to create clean (humanly readable) code and use modular Unittests, iff applicable. Every function should have a docstring, but to the overhead on simple tasks I no longer add docstrings for every variable. Still naming variables should explain them... In 2020, I even started using the typing module to increase code readability and my IDE workflow.
I stumbled upon the AOC in the late days of advent in 2019, but the intcode computer gave me trouble and I couldn't finish all the days on time. But I'm planning to do so someday... Intcode I'm coming to conquer you!
This was the first year, I participated live. For the first ~20 days this worked great. But due to a small sentence in Day 17 that I misread my whole schedule was off for the last days, what a shame.
All in all I think that the puzzles in 2020 were "easier for me" than the intcode computer from 2019. But still multiple solutions had to have some optimization in them, to run for bigger numbers. For Me it seemed like most of the earlier tasks are simple regex tasks, but I still managed to write Unittests for all of them.
Challenge went well so far. Most of the challenges were "pretty easy", but I was getting stuck on multiple of the later ones, because I just diddn't get the right ideas. I hope this gets better in 2022.
It's this time of year again. I started with a few cleanups of the old codes during the first easier challenges. My goal is to be able to run unittest over all tests of previous years within a few seconds.
Due to me starting in 2019, all prior challenges were done in my spare time, not during the holiday season.