Home

Awesome

Advent of Code 2021 Solutions

Solutions to the 2021 edition of Advent of Code.

Running

Requirements:

Install Composer's dependencies and then run a day with php ./src/day01.php or similar.

PS. For day 24 there's a compendium C# file requiring a recent dotnet runtime to run.

Lessons Learned

Some learned lesson for each day:

  1. Rushing first requires cleanup later.
  2. Many modern languages are very similar.
  3. Bitwise operators require refresher courses.
  4. Mutability can blindside you.
  5. Learning a language as you go makes you slow.
  6. Functional(ish) syntax would be very nice!
  7. Math can be intuitive.
  8. Wisdom lies with the crowd. I am not wise.
  9. You should use the best tool for a job.
  10. Knowing what to prepare is black magic.
  11. Being off is bad. Being off by one is worse.
  12. Oh, right. Memory is limited on a computer.
  13. ASCII art is our time's "cave paintings".
  14. Use 20/20 hindsight to improve relics of the past!
  15. You should map hard problems to solved problems.
  16. Reading comprehension is tough.
  17. Devils live in details.
  18. "I have no time to go fast!"
  19. Persistence is key.
  20. Ugly code can be pragmatic code.
  21. Memorize the need for memoization.
  22. Game Development == Math.
  23. No code is often better than code.
  24. Reading low(er) level code is a skill apart.
  25. There's (an) order to things in life.

And bonus lesson for the Infi puzzle by my colleagues: it's never too late to have some fun puzzling and coding!

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: