In December 2022 I participated in the advent of code for the first time. I had time to only do seven days of it (my solutions are here - I used Python). Today I would like to share some thoughts about this kind of competition.

The “Advent of Code” is an advent calendar of small programming puzzles. You can participate in it using any programming language or other tools like Excel.

Coding exercises

Usually, I don’t spend time on coding exercises unless those exercises belong to a project I am trying to build. I have kept away from coding contests. My reasoning was: “If I’m going to put hours towards a project, I want it to be something I will use in the future”. I now think differently about it, and I want to share why.

In the few days I participated, I did not just solve the problems and moved on. Because of how the contest worked, I got curious about how other people approached the challenges. I checked solutions from friends and online. And I learned, and I had fun. After a few days, I wished I had more time to participate in the event in real time.

I mention below a few aspects that I think make this type of event special:

24 hours between puzzles

Coding can be very lonely in the sense that when solving something, we often only look for help when getting stuck - stack overflow is maybe a good example of a place where we all go to get unstuck. And after solving the problem we move on and don’t look back. We are always in a hurry looking at the big picture and trying to “get stuff done”.

After finishing an advent of code puzzle (if done in real-time) there is no next problem to look at for 24 hours. And you also know that what you just solved was done by maybe another 20000 people on the same day. There is where the magic happens I think: it’s easy to get curious about what others did. Just plain childish curiosity that leads to learning. We get to review other’s approaches to a problem we already know the solution to (or maybe don’t know - even better), and we are surprised by the things we learn on the way.

Community feeling

I don’t know you, but I have spent a lot of time in the last few years watching self-paced tutorials in front of a computer. I have learned a lot from them, and I will watch many more for sure. But again, they have a lonely tone to them, no matter how cheery the YouTuber and colourful the video is.

Whilst the advent of code is not a course, it gave me the feeling of a cohort of thousands of people. I watched preview videos about it from someone I follow, messaged about it during the week with an ex-housemate, and at work, we shared our solutions through a chat group. It was shared learning, on an activity that often consisted of myself in front of a computer with chill music and coffee. I think it’s a great way of learning: sharing the process with people.

You can make it into a project

From my angle, sharing a repository with your puzzle solutions is a valid piece of portfolio. Even if you only solved one.

An advent of code solutions repository showcases problem-solving and scripting ability. The skills required for solving the puzzles (even day one) are valid skills that many managers in companies are looking for - that’s why we see advertisements in the advent of code pages.

Conclusion

My first experience participating in a coding contest, the advent of code, has been very positive. After experiencing it, I would recommend anyone to give it a go to coding competitions (this one, or any other similar). It’s not about competing but about joining a community and learning cooperatively. You can have fun, learn, and get to meet interesting people.