Why You Should Try Advent Of Code

Quentin Perthuis
Norauto International
6 min readDec 1, 2023
Advent of Code 2015 ASCII drawing showing your progress
Advent of Code 2015 ASCII drawing showing your progress

Advent of Code is an annual event that presents a series of coding challenges in the form of an advent calendar.

From December 1st to the 25th, Advent of Code weaves a tale where you are the hero, on a quest to assist Santa Claus and his elves.

Each day, a new two-part problem awaits, requiring you to utilize your programming skills to solve it. By doing so, you earn two stars per day, progressively coloring and bringing the annual ASCII drawing to life.

It’s also a large community that comes together every year to share solutions, give each other advice, or show off their visual or wacky solutions.

Here are the reasons why I love Advent of Code, and why you should try it this year if you’ve never taken part before.

The community

On the stats page, you’ll find impressive figures, with over 200,000 individuals embarking on at least the first day’s challenge. Astonishingly, more than 10,000 participants triumphed over the ultimate challenge, the last day of Advent of Code 2022.

Advent of Code 2022 stats
Advent of Code 2022 stats

The heart of the community beats on platforms like Reddit, where discussions, solutions, and shared experiences flourish. However, the beauty of Advent of Code is that you can forge your own community. Engaging in daily discussions about the challenges with friends or colleagues adds an extra layer of motivation and camaraderie.

Each new year is a chance to reunite with familiar faces and welcome new companions into the fold. I’ve had the pleasure of motivating friends, members of the Leekwars community, and OpenClassrooms students to join this coding adventure. This year, it could be you, my fellow reader, discovering the joy of tackling challenges together.

The time period

The annual nature of Advent of Code, unfolding at a specific time each year, plays a crucial role in fueling my motivation. Knowing that there are precisely 25 challenges, a set start date, and a clear endpoint adds a structured and anticipatory element to the experience.

As the years have gone by, Advent of Code has evolved into a cherished tradition for many, myself included. The countdown to its commencement becomes an annual ritual, sparking excitement and anticipation. This sense of tradition and the predetermined time frame contribute to the unique appeal of Advent of Code, creating an eagerly awaited event in the coding community.

The “or can I” meme, a guy who plans to sacrifice his sleep to fit advent of code into his schedule
Sleep is overrated

One of the prominent challenges within Advent of Code is the significant time investment it demands. Unless you possess exceptional proficiency in algorithms, completing all 25 days can be a time-consuming endeavor, often stretching into hours. Personally, I’ve never managed to complete the entire set, at a certain point, the complexities become too challenging to navigate while juggling work and holiday obligations.

To provide a reference point, I usually spend less than an hour on the initial ~10 days, around ~3 hours on the challenges around the ~15th, and even more time thereafter. The hours tend to slip away, especially when a bug manages to elude us. Despite my experience in events like Advent of Code, I refrain from labeling myself an expert in the field.

It’s crucial to emphasize that there’s no obligation to complete all the challenges. The primary goal is to enjoy the process and enhance your coding skills through practice. Strike a balance that suits your pace and priorities, ensuring that the experience remains enjoyable and beneficial.

No code editors or language restrictions

Advent of Code doesn’t necessitate a code editor that may be complex to learn. You have the freedom to employ any tool you’re comfortable with, and this includes not only any programming language but virtually anything you prefer.

Each day presents a unique set of data, an “input,” where you apply an algorithm to deduce the final solution. The data sets are intentionally large, making manual solutions impractical and prompting the need for automated problem-solving.

Interestingly, some participants derive enjoyment from solving specific exercises using unconventional methods like spreadsheets, electronic circuits, simulations within existing games, or custom simulations.

A simulation of Advent of Code 2020 Day 3
A simulation of Advent of Code 2020 Day 3

While the majority opts for traditional programming languages, participants are free to use the language of their choice, devoid of any platform restrictions.

It doesn’t feel like an exercise

When I engage with platforms like Codingame or Codewars, the experience often feels like a series of exercises. These platforms serve my purpose of training and skill-building. It’s clear that the intention is to tackle one exercise after another, which is precisely what these platforms are designed for, and there’s nothing inherently wrong with that.

Advent of Code, however, offers a distinct and captivating experience that sets it apart. The unfolding narrative, spanning 25 days, provides a cohesive framework, giving the sense of an ongoing adventure. When confronted with a challenge, it’s not because the platform throws a random exercise at you, but rather because the hero within the story faces a problem that demands a solution.

Take, for instance, last year’s theme centered around an expedition in a jungle to collect star fruits — a recurring motif with the Elves. This context brings about challenges like ensuring the expedition has sufficient supplies, orchestrating the movement of a crane to manage these supplies, conducting a forest analysis to find the best tree for a treehouse, dealing with mischievous monkeys that pilfer your belongings, or simulating the dynamics of a rope bridge.

“I’m Going On An Adventure” from The Hobbit

This narrative approach proves highly effective. Day after day, I find myself visiting the platform with curiosity about the next chapter in the adventure and the obstacle to overcome, rather than approaching it with the mindset of “Okay, what’s the next exercise?” It’s this unique blend of storytelling and problem-solving that makes Advent of Code an engaging and refreshing experience.

The two-part challenges

A key brilliance of Advent of Code lies in its unique structure, where each day’s challenge is divided into two parts. The initial segment sets the stage, presenting context and a primary problem to solve. Upon successfully cracking the first part, the veil is lifted, revealing the second part that either introduces new elements or alters existing rules.

This dual-phase approach adds a dynamic layer to the experience. Sometimes, your code proves flexible enough, requiring minimal adjustments, and you revel in the satisfaction of a job well done. Other times, the introduction of new rules prompts a reorganization of your code to navigate the altered landscape. And occasionally, optimization becomes a necessity as the evolving challenges strain the efficiency of your code.

What makes this aspect truly valuable for developers is its simulation of an evolving business need — the kind encountered in the real world. In contrast to educational settings that often provide fixed project specifications, Advent of Code mirrors the dynamic nature of a developer’s responsibilities. It not only encourages thinking about how to code a solution but also emphasizes the essential skill of adapting existing code to meet new requirements.

Advent of Code ingeniously captures this real-world scenario by shrouding the second part’s requirements in secrecy until the completion of the first. This recreates the authentic developer experience, offering both enjoyment and valuable practice to enhance your developer skills. It’s not just coding; it’s a journey of continuous improvement, mirroring the ever-evolving nature of the developer’s craft.

Meme about code refactoring
https://www.reddit.com/r/ProgrammerHumor/comments/247wut/refactoring/

Conclusion

In the end, Advent of Code is an invitation to revel in the joy of coding, to embrace challenges with a sense of curiosity, and to participate in a global coding community. As you embark on this coding journey, remember that the primary goal is not to complete every challenge but to find enjoyment, enhance your skills, and savor the unique experience that Advent of Code offers year after year.

For those intrigued by the inner workings of Advent of Code, a peek behind the scenes awaits you here.

And if you’re ready to join me on this year’s adventure, here’s the code for my private leadboard : 431382-ba98d09c

Happy coding!

--

--

Quentin Perthuis
Norauto International

Full Stack Developper | Dev Lead at Norauto International