Part two is the whole point
Advent of Code opens today. Its best design decision is the one that makes people angriest: you do not get to see the second half of the requirements.
Advent of Code opens today, as it has every December since 2015. I have written before about what the puzzles are and are not worth. This year I want to argue for one specific piece of its design, because it is the closest thing to a simulation of real engineering that I know of.
You do not get to see part two until you have solved part one.
why that is the interesting constraint#
You read a problem, you model it, you write a solution, it works. Then a second requirement appears — written before you started, by someone who knew exactly what you would build — and it asks a question your model may or may not be able to answer.
Sometimes it generalises for free. More often, part two changes a parameter from 100 to 10,000,000,000, or asks about a property your representation threw away, and the honest answer is that you have to start again.
That is not an artificial difficulty. That is Tuesday.
the three outcomes, and what each teaches#
Your solution generalises. Usually because you modelled the domain rather than the example. You kept the parsed structure instead of collapsing it to an answer; you wrote a function of the input rather than a script.
Your solution is close. One assumption was too tight — you hardcoded a dimension, assumed uniqueness, assumed order. The fix is small and the lesson is specific: that particular assumption was load-bearing and you did not know it. Write the assumption down next time.
Your solution is worthless. You computed the answer without ever representing the problem. The classic version is simulating a process step by step when part two runs it a trillion times, at which point you need to find the cycle, or the closed form, or a completely different formulation.
This third case is the valuable one, and it is the one people rage about. It is also exactly what happens when a feature ships and then meets a customer with a thousand times more data than your test fixture.
the actual transferable lesson#
The instinct after being burned by part two a few times is to over-engineer part one: build the general solution, parameterise everything, prepare for anything.
That instinct is wrong, and December is a cheap place to learn why. The general solution takes three times as long and guesses wrong about which axis will generalise. You cannot prepare for an unknown requirement by building for all possible requirements.
What actually works is narrower:
- Keep the parsed representation. The most common reason part two forces a rewrite is that part one destroyed information on the way to an answer. Parsing and solving should be separate functions, always.
- Separate the process from the question. A simulation that yields states is reusable; a loop that prints a total is not.
- Name the assumptions you are making, in a comment, as you make them. Not for the reader — for yourself in fifteen minutes.
- Write it so it can be thrown away. Small, direct, no framework. Cheap to discard is a better property than easy to extend, because you will guess the extension axis wrong.
That is a real design position and it applies well outside puzzles: structure for legibility and disposal, not for anticipated change.
how to do it without it becoming a second job#
- Decide your rule now. "Thirty minutes a day, and if I am stuck I read a hint" survives to Christmas. "All fifty stars" becomes an obligation around day thirteen, which is traditionally where the difficulty steps up.
- Stopping is allowed. Most participants stop somewhere in the second week, every year. Twelve days of deliberate practice is twelve more than zero.
- Do not tie it to work. A team leaderboard is fun right up until it is visible data about who has free evenings, which is not the same as who is good at their job. Opt-in, and never mentioned in a review.
the recommendation#
Pick a language you cannot yet write. Solve part one in the ugliest way that works. Then, before you open part two, spend sixty seconds writing down what you assumed.
Grade yourself on that note rather than on the star.
— Dom, December 1, 2026