Advent of Code 2021 summary!
Coding event Advent of code 2021, a new year, a new challenge… let’s go
Advent of code (AoC) is a coding event taking place every year on december. From the 1st of December to the 25th, a new coding puzzle is released daily.
I am joining the event for the third time, and will share my adventure through the coding puzzles. Github repo
The event
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other.
Each puzzle comes with a description, inputs, and is made of 2 parts. Resolving a part unlock a star -> there are 50 stars to collect.
The complexity goes crescendo: puzzles get harder every day. Since the input/output are handled as plain text, challengers are free to use the language of their choice.
Goals for this year
This is the third time in a row that I join the event, and this year I want to go as far I as can! Few goals based from my last AoC experiences:
- Thoughts before code: I lost quite some time last year rushing into code, often without the proper preparation. This time I plan on thinking each daily puzzle through before getting into code.
- Clean environment: I worked on a functional coding environment for the event, my IDE (IntelliJ) is set up and I prepared a template with inputs handling, tests and functions.
- List comprehension on 2 dimensions: Last year I discovered the awesome “list comprehension” python feature, which helped me a lot while handling list during the event. However, I struggled with this feature when dealing with 2 dimensions arrays. In order to get further I need to work on processing matrix quickly.
- Unit test: I relied on unit tests enough before. As puzzles get harder and harder I need to rely on solid code.
- Always further: What with the previous improvement, I hope to go past the day 14th, which was my previous score!
Teammates
We created a chat channel and a private leaderboard with my previous coworkers. Although the resolution is done solo, it helps to share our daily feedbacks on puzzles resolution. Few of them have also chosen to use python, which is a great opportunity to compare codes and lear few new tricks!
Day 1-10
Fist days are relatively easy and puzzles went smoothly
At was working at the time, and managed most daily puzzles either during lunch break or late at night.
The code result is not clean enough (really few unit tests and refactoring for completed puzzles), yet with by preparing most puzzle on paper each puzzle took me less than 1 hour.
Day 11
Vacation at least , I will have some time to focus on the event and even write about it on this blog!