Advent of Code 2022 and Exercism

3.29.2023


Lately I have been doing some code challenges and participating at exercism.com after hearing good things about the platform. They have exercises available in many languages and an active community. I focused on typescript and javascript and uploaded some of my solutions to github, or you can find my exercism profile here. I was also able to contribute as a mentor to a couple people looking for explanations or assistance with problems. Exercism has an easy way to copy or export the code and tests to a local machine. This lets you preserve the challenges in case anything happens to the website and a good way to share the solutions.


Latest exercism stats:
Typescript challenges completed: 60
Javascript challenges completed: 40
Including implementing some cool functions such as:


Around the holidays I learned about the Advent of Code, great timing! The advent of code is a holiday coding event broken down into 25 different 2-part challenges. It's known for:

  • being more challenging as it goes on
  • having some large numbers and inputs to deal with
  • testing problem solving skills with programming


It's very flexible in what kind of environment and tools you use. Any language or method is allowed as long as you find the correct answer. I chose to use only javascript. Some of the days were very difficult and time consuming. On some I had to look at the AOC reddit for hints, but most days I was able to finish alone using just the MDN javascript docs and it is mostly original code. Some of the advanced topics involved maze solving, Breadth First Search, Depth First Search, Linked Lists, Circular Linked Lists, recursive structures, modular arithmetic, 3d arrays and matrices, and lots of object oriented programming in my solutions.


My solutions to Advent of Code 2022 and Exercism on github



Most of my solutions run reasonably fast. I was happy to finish days 20-25 without help. Overall it was mostly fun solving these puzzles and definitely educational. My solutions by the end of the challenge were a lot tighter and felt more comfortable. A few things that I found helpful while working on these was to send the output and logs of a node script to an output file like:
node aoc2022day1.js > output.log &

Sometimes it was easier using paper to write out observations or math or draw something to get started before moving to the programming part. A lot of the effort was planning and thinking about how to approach each problem. It was very difficult at times, but that also means you feel more accomplished when completing a hard one. I was impressed with the creative story, well designed puzzles, and the calendar itself. Getting 50 stars was not easy and it felt great to finish. Another valuable aspect is looking back at other's approaches and solutions after finishing a problem. It's a good introduction to other languages and styles. In addition to looking at javascript I have been reviewing the days and looking at typescript and other language solutions as well.


I missed the starting date this year and wasn't competing for speed or to even finish the calendar on time. I think that ended up being better to be able to put as much time into each question as needed. Many times that meant spending more than one day on a question. It would be fun in another way though to start on the 1st day and try to keep up with the daily calendar. There are many past years AOCs that I have never seen and that could be fun to work through.


Some people in the community also make visualizations of different questions. Those can be helpful when trying to learn a concept. It would also be valuable to go back and make some optimizations. There is certainly a lot of room for improvement in mine and looking at other people's solutions is a great resource.