Advent Of Code 2024

Advent of Code is a great opportunity for practice. What are you practicing this year?

Advent Of Code 2024

The Advent of Code (AOC) is upon us again. If you are unfamiliar, it is a coding contest/challenge designed to mimic an advent calendar. Instead of opening candy each day, you get a coding challenge.

Some people compete at this. I find that somewhat unhealthy. I prefer to view it as a chance to practice some things. Here are some things I like to practice. I suggest you pick one or two.

  1. Test Driven Development (TDD) - AOC is a great way to practice TDD. All the problem descriptions give you a set of corresponding inputs and outputs. There are lot's of aspects of TDD that you could focus on. This year I've been focusing on deciding the right level to write tests. Is it just input/output, or is it useful to write tests at a lower level and when?
  2. Domain Driven Design (DDD) - DDD it way too detailed to dive into all of it here. The easy aspect of DDD you can easily practice here is using domain terms. Avoid naming things based on datatypes (like int, string) and avoid naming them based on design patterns but rather name them based on the words used in the problem description.
  3. Refactoring - Refactoring is something I definitely practice with AOC. Often when you get to the second part, you'll realize that a simple refactoring of the first part can make the second part much easier. To quote Kent Beck "Make the change easy (this may be the hard part) then make the easy change"
  4. Algorithms - AOC often forces you to learn new algorithms like DJikstra's algorithm.
  5. Efficiency - There is a little time pressure around AOC. Even if you aren't competing, you still want to finish in a reasonable time so that you can be ready for the next day's puzzle. It is worth it to pay attention to how you move around the IDE and try to practice using all the shortcuts. Maybe each day pick out 1 or 2 to practice.
  6. Optimization - AOC provides the opportunity to practice optimization. Often times part 2 of a problem will take a lot longer to solve. Once you have gotten the answer (or gotten tired of waiting for LabVIEW to spit out an answer) it can be useful to practice your optimization skills.
  7. Learning a new language. - AOC is also great to learn a new language. In the past I have used it to learn Python. It worked quite well. I learned a lot.

What are you practicing this year? Share in the comments and don't forget to join the LabVIEW AOC Discord and Leaderboard.