Advent of Code is an annual event where a series of programming puzzles are released every day from the first of December to the 25th. Thanks to Eric Wastl, the creator of Advent of Code, it has taken place every year since 2015. Each year the popularity has grown with thousands of participants from around the world. In 2022 the first puzzle was completed by 246657 participants. 34 of them were from inovex. 🙂
What makes it so special?
Each year Eric Wastl creates a new lovely story around the programming puzzles which is always fun to read and follow. Furthermore, the puzzles are designed to be solvable using a variety of programming languages and range in difficulty from relatively easy to quite challenging. It is possible to take it very seriously and in a competitive way or just use the Advent of Code to learn a new programming language, practice your coding skills, or grow as a team.
Nowadays it is not only a collection of coding puzzles, but it is also a real community event and you can find lots of solutions and discussions.
If you want to participate you just need to go to the Advent of Code website and register for free. It is also possible to solve all the puzzles from the last years if you have not done it. 😉
A simple example of such a puzzle could look like this:
“You are given a list of integers and your task is to find the two numbers that add up to 2020. Once you find these numbers, you need to return the product of the two numbers.”
This problem can be solved by a simple brute force algorithm, in which we check all possible pairs of numbers and see if the sum of the pair is 2020 or not. Often the first puzzle of the day looks like this. But the second one increases the complexity that such a simple brute force algorithm does not work anymore. For example, increase the number of integers and the searched number drastically.
As you might remember from the beginning 34 of our colleagues participated in this year’s advent of code competition. All participants are widely spread over our three main departments Application Development (AD), IT Engineering & Operations (ITO), and Data Management & Analytics (DMA). Having a group of people with this diverse technical background resulted in a motley mix of programming languages used to solve the puzzles. The below two figures give an overview of the used languages in general and in more detail.
We organized our contributions in a company-wide Slack channel and a public GitHub repository where 13 inovex employees shared their contributions publicly. Within this repository contributions in 22 programming languages are contained which means on average two different languages per employee. The figure below shows the distribution of used programming languages. There is no surprise that the incumbents are Rust and Python but you will probably also discover an exotic language that you might not have heard of already.
Overall, 155 puzzle solutions can be found in our repository, in most cases for both puzzles of a day. That means the average inovex contributor had enough stamina to complete the half journey of Advent of Code 2022. The figure (created with the Advent of Code plugin) below displays the number of stars collected per employee over time. You earn one star for every correct answer to a puzzle.
All in all, the Advent of Code was a lot of fun and a great opportunity to challenge yourself with some tricky puzzles in your favorite programming language or languages you want to learn. If you have not participated before, consider it for next year’s event or take a look at historical puzzles. It is definitely worth a try! However, there is still plenty of time before the next round of puzzles starts. In the meantime, feel free to get inspired by our public solution collection on GitHub.