My Awesome time with Advent of Code 2020

Purpose

Details the work done for my Advent of Code 2020 repository, including algorithms, tech used, and lessons learned.

Links

Concept

Advent of Code is an advent calendar where you count down the days till Christmas (my most favorite holiday) by solving programming puzzles. It's a great way to sharpen your coding skills, and have a lot of fun at the same time! This was my first year attempting the problems, and I decided to solve the problems in a new language (Go) and ensure I have reasonable test coverage for each of the problems.

Tech used

  • Go(lang): I think I've fallen in love with a language. Great language for backend APIs/microservices, super fast, and love the language simplicity!
  • Gitpod: Awesome web IDE/development platform. It was really simple to use and I'll probably set up other personal projects on it...if only they had good enterprise support! :(

Lessons learned

Chinese remainder theorem

I took number theory in college...but honestly I forgot this existed, and it was only thanks too Google and kind redditors that I was able to solve the problem in a waaay easier way using this theorem. It was also pretty fun to get back into number theory and remember that math and CS do go together pretty dang well.

Recursion

Recursion is some fun stuff. Recursion is some fun stuff. Seriously though, I solved a fair number of the problems using recursion (it's pretty rare that I have a need to use a recursive solution at work), and I forgot how elegant and powerful recursion can be!

Linked lists

Linked lists are a thing, and were perfect for solving a particular calendar problem! It was pretty fun to create one, and they are interesting...not super useful in a lot of my day to day programming, but should definitely remember that they exist!

Getting help

Honestly I learned a lot from Advent of Code, not just from implementing solutions, but also by getting stumped on problems and finding amazing programmers on reddit who solved it in 5 lines. Or by creating a terrible solution and seeing someone else implement the same solution with a minor tweak that makes it 100X more performant. You can just learn so much from other people, and many of those problems were a good reminder that often asking/looking for help is the best route to learn and solve the problem.