{{Short description|Annual computer programming event}}

{{Use American English|date=February 2022}} {{Use mdy dates|date=May 2021}}

{{Infobox recurring event | name = Advent of Code | image = Advent of Code 2020 screenshot.png | caption = Screenshot of the 2020 event page | status = Active | begins = December 1 | ends = December 12 (previously December 25) | frequency = Annually | first = {{Start date|2015|12|1}} | founder_name = Eric Wastl | last = {{Start date|2025|12}} | website = {{URL|https://adventofcode.com/|adventofcode.com}} }}

'''Advent of Code''' is an annual set of Christmas-themed computer programming challenges that follow the story of the North Pole elves making necessary preparations for smooth festivity operations, unraveled day by day akin to how an Advent calendar is opened.<ref name="about">{{Cite web|last=Wastl|first=Eric|date=2022|title=About|url=https://adventofcode.com/about|access-date=2022-12-10|website=Advent of Code}}</ref><ref>{{Cite web|last=Joyce|first=Kara E.|date=2020-11-11|title=Brain teasers and other fun tips for learning Python|url=https://searchbusinessanalytics.techtarget.com/feature/Brain-teasers-and-other-fun-tips-for-learning-Python|url-status=live|archive-url=https://web.archive.org/web/20201112015932/https://searchbusinessanalytics.techtarget.com/feature/Brain-teasers-and-other-fun-tips-for-learning-Python|archive-date=2020-11-12|access-date=2021-05-12|website=SearchBusinessAnalytics|publisher=TechTarget}}</ref> It has been running since 2015.<ref>{{Cite web|last=Speed|first=Richard|date=2021-12-01|title=On the first day of Christmas, my true love gave to me... a coding puzzle and it's a doozy|url=https://www.theregister.com/2021/12/01/advent_of_code/|url-status=live|archive-url=https://web.archive.org/web/20211201121927/https://www.theregister.com/2021/12/01/advent_of_code/|archive-date=2021-12-01|access-date=2021-12-05|website=The Register}}</ref>

Advent of Code's programming puzzles cover a variety of skill sets and skill levels and can be solved using any programming language, requiring solution answer upload instead of solution source code upload. Up to and including 2024, participants were also able to compete based on speed of correct solution hand-in on public leaderboards. From 2025 and onwards, only private leaderboards are supported, with publicizing one's private leaderboard too broadly being discouraged.<ref name="about" />

== History == Advent of Code was founded by Eric Wastl, who is still the sole maintainer of the project.<ref name="about" /><ref name="download">{{Cite AV media|url=https://www.youtube.com/watch?v=Wh-jMahOaAQ|title=The Download: Clippy Sweaters, ChatGPT Mania, Advent of Code and more|date=2022-12-09|last=Warren|first=Christina|type=Videotape|publisher=GitHub|author-link=Christina Warren|access-date=2022-12-11|via=YouTube}}</ref>

The event was initially launched on December 1, 2015. By midnight EST (UTC−05:00), 81 people had signed up for the event, going slightly over Wastl's planned 70-participant capacity. Within 12 hours, about 4,000 people had joined, nearly causing a system crash. After 48 hours, there were about 15,000 people, and by the end of the 2015 event, the total had risen to 52,000.<ref name="mit">{{Cite web|last=Roberts|first=Siobhan|date=2021-12-17|title=This puzzle challenge brings joy to the world of code|url=https://www.technologyreview.com/2021/12/17/1042483/puzzle-challenge-coding-christmas/|access-date=2022-02-20|website=MIT Technology Review}}</ref>

In 2020, perhaps due to the COVID-19 pandemic, the event saw a 50% growth in traffic, with over 180,000 participants worldwide.<ref name="mit" />

On December 4, 2022, Wastl announced that the project had reached 1,000,000 registered users.<ref>{{Cite tweet|number=1599611568542449664|user=ericwastl|title=#AdventOfCode just hit 🌟1,000,000🌟 registered users!!!|last=Wastl|first=Eric|date=2022-12-04|access-date=2022-12-10}}</ref>

On October 22, 2025, Wastl announced that going forward the Advent of Code wouldn't have a global leaderboard and would consist of 12 puzzles.<ref>{{Cite web|last=Wastl|first=Eric|title=Post|website=Hachyderm|date=2025-10-22|url=https://hachyderm.io/@ericwastl/115415473413415697}}</ref>

== Puzzle design == Puzzles consist of two parts that must be solved in order,<ref>{{Cite web |last=Gee |first=Sue |date=2020-12-06 |title=Advent Of Code For Programmers |url=https://www.i-programmer.info/news/98-languages/14197-advent-of-code-for-programmers.html |url-status=live |archive-url=https://web.archive.org/web/20201206191818/https://www.i-programmer.info/news/98-languages/14197-advent-of-code-for-programmers.html |archive-date=2020-12-06 |access-date=2021-05-12 |website=I Programmer }}</ref><ref>{{Cite web |last=Fisher |first=Kenneth |date=2020-12-03 |title=SQL Homework – December 2020 – Participate in the Advent of Code. from Blog Posts – SQLServerCentral |url=https://hub.packtpub.com/sql-homework-december-2020-participate-in-the-advent-of-code-from-blog-posts-sqlservercentral/ |url-status=live |archive-url=https://web.archive.org/web/20210126214228/https://hub.packtpub.com/sql-homework-december-2020-participate-in-the-advent-of-code-from-blog-posts-sqlservercentral/ |archive-date=2021-01-26 |access-date=2021-05-12 |website=Packt Hub }}</ref> with the second part not revealed to the user until the first part is solved correctly.<ref name="realpython">{{Cite web |last=Hjelle |first=Geir Arne |date=2021-12-01 |title=Advent of Code: Solving Your Puzzles With Python |url=https://realpython.com/python-advent-of-code/ |access-date=2022-02-20 |website=Real Python }}</ref> Participants are awarded one gold star for completing each part of a daily puzzle. The exception is the final star, which is awarded without any problem statement to those that have collected all other stars. As a result, the statistics for how many people have collected a year's final star is the same number of people that have collected all of the year's stars.

Each puzzle contains a fictional backstory that is the same for all participants, but each person receives a different piece of input data and should generate a different correct result.<ref name="realpython" />

Previously, puzzles were released on a daily schedule from December 1 to December 25 at midnight EST, but since 2025, they will be released only up until December 12th. There is no time limit to complete the puzzles, and puzzles from past years' events remain available to solve.<ref name="download" />

== Preparations == {{Primary sources|section|date=December 2023}}

According to a comment in the HTML code on each page of the event's website, Advent of Code runs using custom Perl code. Wastl built almost the entire website himself, including the design, animations, prose, and puzzles. (He relies on other services for authentication, analytics, and social media integrations.)<ref name="about" />

Each year, Wastl creates and tests the puzzles in advance. This takes 4–5 months of work each year.<ref name="about" /> A handful of beta testers are employed, who are credited by name.

== Controversy == Some participants have used generative artificial intelligence to solve the puzzles.<ref name="download" /> In 2023, Wastl requested that users abstain from using these tools to solve the puzzles in an unattended fashion until after the leaderboard has been filled for the day, stating that "the leaderboards are for human competitors",<ref>{{Cite web |title=About - Advent of Code 2023 |url=https://adventofcode.com/about#ai_leaderboard |access-date=2023-10-22 |website=adventofcode.com}}</ref> and from 2025 onwards has decided to discontinue the global leaderboard entirely, with the reasoning that "what started as a fun feature in 2015 became an ever-growing problem".<ref>{{Cite web |title=About - Advent of Code 2025 |url=https://adventofcode.com/2025/about |access-date=2025-11-26 |website=adventofcode.com}}</ref>

==See also== *LeetCode *HackerRank *Competitive programming

== References == {{Reflist}}

Category:Programming contests Category:Recurring events established in 2015 Code