Culture / Software Development / Technology

Advent of Code’s Programming Puzzles Set New Global Record

12 Dec 2021 6:00am, by
Christmas-tree-made-of-code-advent-of-code.jpg
Corrections: This article has been corrected from a previous version that stated Eric Wastl, creator of Advent of Code, accepts donations for his efforts; Advent of Code is not registered as a nonprofit charity, so support is not tax deductible. A previous version of the article also stated that software developer Jeroen Heijmans has created an “official” survey of Advent of Code participants; the survey is not official.

It’s been happening every December since 2015. “I like helping people become better programmers and I like making puzzles,” Eric Wastl told the educational site Real Python last month. “So I was trying to come up with something I could send to a few of my friends.”

On a whim, Wastl built “Advent of Code” — a daily series of 25 programming puzzles that tell an elf-themed story as they count down to Christmas Day. Since then, become a cherished annual tradition throughout large swaths of the technical community, and unlocked a massive outpouring of creativity.

This year the first day’s puzzle was solved by 183,620 unique users.

And while each day’s puzzle has two parts, that first day saw 164,920 participants solving both the first and second parts. Thirty-three thousand fans have even subscribed to the big event’s dedicated forum on Reddit (up from 18,700 just one year ago), and there were hundreds of comments and upvotes on Hacker News.

It all offers a fun opportunity to experience the true breadth of the programming community, like a spontaneous gathering in virtual town squares. There’s laughter, new pride and glimpses of developers at play.

And all around the world, people join in the fun — and share a little goodwill right around holiday time.

2021’s Story: Santa’s Submarine

The first thing you notice is that Advent of Code has become a very big event. There’s now even an official Advent of Code shop selling coffee mugs, stickers, T-shirts and hoodies — and the phrase “Advent of Code” is now a registered trademark in the U.S.

The event has attracted high-powered sponsors, including Capital One, American Express, Spotify — and even education publisher McGraw Hill. JetBrains (also a sponsor) even had created a special primer video featuring their developer advocate Sebastian Aigner.

But through it all, Advent of Code has maintained its playful sense of fun.

For example, in a blog post Sebastian Aigner, a developer advocate at JetBrains, promises that his company is also sending out “Kotlin care packages” to randomly-selected participants who signed up for JetBrains’ sweepstakes by adding a special code to their GitHub repository’s topic, to “sweeten the holiday season for our community.” (Even while JetBrains has also created a repository template for solutions that allows automated testing using JUnit).

This year’s story problems comprise a 25-part adventure that involves Santa’s submarine. “It’s covered in Christmas lights (because of course it is) …”

“Apparently, one of the Elves tripped and accidentally sent the sleigh keys flying into the ocean!” explained the puzzle on Day One. Aspiring coders were told that for every problem they solved, they’d receive a star that will boost the strength of the submarine’s experimental key-tracking antenna. So far, there have been lava tubes, a giant squid and, at one point, an army of crabs.

A Starting Point for Developers’ Creativity

Over the years the wild stories have become just the starting point for more creativity from event participants.

Self-described “computer nerd” Gary J. Grady has been creating cartoons about each puzzle, and then sharing them on Twitter. And all around the world, many others are also giving the data their own creative visualizations.

For instance, there’s Jari Komppa, a self-taught engineer in Finland, and Alberta-based interactive media designer Jordan Ranson.

Some of the visualizations were lovely — almost works of art

And of course, countless people are live streaming their puzzle-solving on Twitch.

Homegrown Hardware

Participants can log in (with existing credentials from GitHub, your Google account login, or even from Twitter or Reddit), which allows the site to track their score. And the site’s also awarding points to the first 100 people who solve each day’s puzzle, with 100 points awarded for whoever submits their answer first. (This year’s first puzzle was apparently solved in just 67 seconds.)

“If you can’t participate at midnight, that’s not a problem; many people use private leaderboards to compete with people in their area,” Wastl explained on the Advent of Code site. (Jeroen Heijmans,  a software developer based in the Netherlands, has created a participants survey, with results to be published on Reddit “around Christmas” from his GitHub repository.)

Screenshot from Jeroen Heijmans unofficial Advent of Code survey

But other programmers have found other sources of pride, building their extravagant and unlikely home-built solutions:

One math student even subjected their solution to a scholarly analytic algebra math paper. And others are using the puzzles to test their skills in a specific language. One blogger is blogging their efforts to solve the puzzles in the statistical programming language R. Several even used MIT’s visual language for young learners, Scratch.

Cheering on Advent of Code Participants

Watching over the accidental community he’s created is Eric Wastl, who can be spotted on Twitter sharing his positive attitude.

Screenshot from Eric Wastl's GitHub profile (2021Look closely at the site, and you’ll catch glimpses of his day-to-day life. “Building and running Advent of Code takes a significant amount of my time and energy,” Wastl wrote on one page, saying that he accepts support to cover his infrastructure and time, as well as future projects and “my sushi addiction.”

Aided by a team of five beta testers (along with two community managers), he’s assembled a new set of puzzles each year. But in real life, Wastl also holds down a job as a senior architect for TCGPlayer, an e-commerce site dedicated to collectible trading card games, he told the Real Python site last month.

“The work I do ranges from tricky algorithms, Kubernetes, vendor selection, and infrastructure scaling to training, architecture planning, technical candidate assessment, and running big internal hackathons.”

It’s interesting to wonder if that’s where he’s honed the skills that he’s ultimately bringing to Advent of Code. “My days are a mix of things,” Wastl told the Real Python site, “like talking to teams and individuals to help them work through their hardest technical challenges, algorithm design, high-level technical planning, and building things for tooling, automation, and visibility”

Even the official instructions at Advent of Code supportively remind new users that “you don’t need a computer science background to participate — just a little programming knowledge and some problem-solving skills will get you pretty far. Nor do you need a fancy computer; every problem has a solution that completes in at most 15 seconds on 10-year-old hardware.”

This year finds Wastl encouraging his growing community as the event achieves even more milestones.

In fact, this week Wastl announced another new milestone. He’d kept a running count of how many users had participated in the event over its lifetime (and solved at least one puzzle).

On Thursday, Wastl announced that the competition had finally reached its 500,000th puzzle-solver.

Wastl told the Real Python site that the best way to the support the competition now is to just spread the word — and to be willing to help someone else who’s struggling with their solutions, especially new and early-career programmers. And with a little goodwill, he added, everything else will take care of itself.

“[S]o long as the community continues its already impressive history of being super supportive to each other, I don’t need to be everywhere.”

The New Stack is a wholly owned subsidiary of Insight Partners, an investor in the following companies mentioned in this article: Real.