Every programmer remembers the first time it happened. You've been stuck on something for an hour, or a day. Nothing works. Then, out of nowhere, it clicks. Suddenly the whole thing is obvious and you can't believe you didn't see it sooner.

That aha moment is what got most of us into programming, and it's what kept us here. It's a small dopamine hit, and we've been chasing it ever since.

This is a post about where we still find it.

The whiteboard days

Every now and then a problem turns up at work that doesn't fit in anyone's head. Someone wipes the whiteboard clean, grabs a marker and says "okay, so how would we actually do this?" Three hours later the board is a mess, three people are arguing, and nobody has looked at Slack in a while.

We love those days. I have a feeling there used to be more of them. Not because the work got less interesting. The hard questions on a client project are just different ones: what the business actually needs, how the system should be shaped, which trade-off we'd regret in two years. Those are good problems and we like them. But their answers arrive slowly, over weeks. They rarely click.

And lately, a lot of the code that used to produce those clicks isn't written by us at all. We use AI every day. We were sceptical at first, but that didn't last long, and today it's a crucial part of how we work. How exactly we use it is a story for another post. The short version is that the agents do most of the typing, and we decide what should be built and check that what came back is what the project actually needs.

We wouldn't go back. But the less code we write by hand, the fewer chances we get at that click. So every December we go and get twelve of them.

What Advent of Code is

Advent of Code is an advent calendar, except instead of chocolate you get a programming puzzle. Every day in early December a new one unlocks, wrapped in a silly story about elves who have once again broken something important. Each puzzle has two parts, and each part earns you a star. It used to run for 25 days. Since last year it's 12, which our families appreciate.

We've been doing it as a company since 2020. All six years of our solutions are public. Fair warning: the rule is that the code has to work, not that it has to be pretty.

We have two house rules. The first: it's a competition, so you solve on your own. The talking starts once you have your stars, and that's when it gets good.

The second: no AI. Nobody plays police. It's an honour system, and the rule on our internal page starts with "please, please, please". Letting a model solve the puzzle would defeat the purpose. We're not going to pretend twelve puzzles are what keeps us competent. That comes from the projects. But it's a very cool way to keep the blades sharp. And the way things are going, it may soon be the only code we write entirely by hand all year.

Inventing things that already exist

The puzzles are almost purely algorithmic. Over a single December you'll run into graph traversal, shortest paths, dynamic programming, recursion and backtracking, parsing strange input formats, grid simulations, a bit of geometry and number theory, and the classic "works on the example, would take four years on the real input". In other words, the kind of problems that got most of us hooked in the first place.

None of them arrive with a label, though. Nobody tells you "this one is a shortest path". You get elves and a mess, and you have to work your way to the technique yourself. That leads to our favourite side effect: working out a concept before you know it has a name. Plenty of people write a breadth-first search long before they hear the term BFS. One year I needed a function that could stop halfway, hand back a value, and carry on later from where it left off. So I built one. I explained it to the team, quite proud of myself, and they said: "That's exactly what generators are." JavaScript has had them for years.

It's a little embarrassing. It's also the best way to learn anything. Once you've needed a thing badly enough to invent it, you never forget what it's for.

Pen and paper

Some puzzles don't give way to a technique at all, named or not. For those we go back to something we rarely reach for anymore: pen and paper. In December they're all over the desks.

Last year's final puzzle is a good example. The elves had a pile of oddly shaped presents and a list of regions under the Christmas trees, and you had to say which regions could hold all the presents assigned to them. It's a packing problem, the kind that has no efficient general solution. You can spend a whole day trying to write one anyway.

Or you can put the keyboard down and sketch a few of the cases out on paper. Every present fits inside a 3×3 square. So forget fitting them together neatly. Give each present a square of its own and count whether the region has room for that many squares. On the real input that was enough: every region either had room for all of its squares, or was too small for its presents no matter how you arranged them. Nothing in between. The whole answer is a few lines of arithmetic. No amount of clever code would have told you that. Looking at the problem did.

A new language every December

The puzzles don't care what language you use, and that's a gift. Once you've figured out how to solve one, typing it up in a language you already know is the easy part. So some of us make it the hard part on purpose.

One colleague did three years in Rust, then a year in C#, and the last two in Go. Others have turned up with Python, Ruby and JavaScript, next to the C# most of us write all day.

It's a cheap way to try whatever everyone is currently talking about. You already know what the program has to do. All that's left is learning how this particular language wants you to say it. Two weeks later you have an actual opinion about it, which is more than you get from reading the docs.

Yes, we're competitive

We'd love to say it's all about learning. It isn't. Most developers we know are competitive, and we're no exception. It probably comes with the job.

It starts with Juraj, who has finished first on our leaderboard every single year. So there's a bounty on his head. If anyone beats him, he has agreed to spend a full year with a Slack avatar of himself holding a sign that says "I lost Advent of Code to" followed by the winner's name. The same sign goes on the wall behind his desk, in full view on every video call. So far the wall is empty.

Last year was the closest it has ever been, and that packing puzzle was right in the middle of it. Juraj was losing his mind over it, because a proper solution simply wasn't doable. I cracked it first, with a pen. We solve on our own, so nobody knew how I'd done it. But once I had my star, Juraj knew it could be done, and that was all he needed. He stopped fighting the general solution and went looking for another way in. Eventually Mario figured it out too, and the two of them finished level on all 24 stars.

We had a plan for that. Ties are boring, so we wrote a runner that executes everyone's solutions, whatever language they're written in, and times them. Same stars, faster code wins. In the end we didn't even need it. Juraj's performance was so much better that there was nothing left to settle. The wall stayed empty.

Then there are the side bets. Last year Amar and I bet on who would collect more stars, and the loser had to wear a shirt of the winner's choosing to our team building. Amar never did figure the packing puzzle out, and that one star was the whole difference between us. We won't describe the shirt. It did its job.

This year we're betting again. We've yet to flesh out the details, but it will be something along these lines: the winner picks a book or a film, the loser has to read or watch it, and then give a presentation about it to the rest of the team at our next team building.

The small wins are the best ones, though. Cracking a puzzle before your senior does, and getting to be smug about it for a whole day. Or comparing solutions once you're both done, and finding out that your eighty lines were his six.

Beer, rakija and a good cause

The official prize, for the record, is a case of craft beer and a bottle of rakija. Nobody holds it against the winner if he shares.

The stars are worth more than bragging rights, too. For every star any of us collects, Intellegens makes a donation, and when the leaderboard closes the winner picks the charity it all goes to. It's advent, after all. It also means that whoever gives up on day four isn't only letting himself down. No pressure.

See you on December 1st

The first puzzle unlocks on December 1st. The leaderboard has been reset, the bounty still stands, a new bet is on the table, and somebody is already reading up on a language they've never used.

AI isn't going anywhere, and we wouldn't want it to. It lets us spend less time typing and more time on the decisions that make or break a project. Advent of Code is the other side of that: twelve days a year where we do it all the slow way, on purpose, just to feel that click again.

If that sounds like the kind of team you'd want building your product, get in touch. And if it sounds like the kind of team you'd want to be on, we should talk too. Bring your own marker.