ArticleslgStudy

science

Advent of Code

Advent of Code is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Advent of Code rather than just read about it. In short: 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. It has been running since 2015.

Advent of Code — main illustration
Advent of Code — illustration

Key takeaways

  • Advent of Code belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Advent of Code to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Advent of Code from memory before moving on to harder problems.

Reference excerpt

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. It has been running since 2015. 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.

History Advent of Code was founded by Eric Wastl, who is still the sole maintainer of the project. 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. In 2020, perhaps due to the COVID-19 pandemic, the event saw a 50% growth in traffic, with over 180,000 participants worldwide. On December 4, 2022, Wastl announced that the project had reached 1,000,000 registered users. 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.

Puzzle design Puzzles consist of two parts that must be solved in order, with the second part not revealed to the user until the first part is solved correctly. 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. 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.

Preparations

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.) Each year, Wastl creates and tests the puzzles in advance. This takes 4–5 months of work each year. A handful of beta testers are employed, who are credited by name.

Controversy Some participants have used generative artificial intelligence to solve the puzzles. 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", 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".

See also LeetCode HackerRank Competitive programming

References

Worked examples

Example 1 — a first encounter with Advent of Code

Start with the simplest possible case. Write down what Advent of Code claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Advent of Code before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Advent of Code ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Advent of Code

In research
Advent of Code appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Advent of Code in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Advent of Code is common in secondary-school and first-year university syllabi. It links to neighbouring topics Advent, Programming contests, Recurring events established in 2015, so understanding it makes those chapters shorter.
In everyday life
Look for Advent of Code outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Advent of Code” →

How to study Advent of Code in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Advent of Code means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Advent of Code out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Advent of Code in simple terms?

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. It has been running since 2015.

Why does Advent of Code matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Advent of Code?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Advent of Code.

Tags

  • Advent
  • Programming contests
  • Recurring events established in 2015

Keep exploring