← blog

Twelve Days

Advent of Code 2026 as an excuse to take languages apart: one post per puzzle, solved step by step, from first try to idiom, in as many languages as I can.

The puzzles themselves are rarely the point. Most of them are small enough that the first working answer takes minutes, which leaves room for the questions I actually want to answer:

  • Idioms. Each day starts from the version a beginner would write and moves one step at a time to what an experienced programmer in that language would write, saying what each step changes and why.
  • Internals. What the standard library is doing underneath: which data structure, which algorithm, what it costs in Big-O and in practice, and how it changed between versions. The longer explanations become articles in the library, linked from the posts and kept up to date there.
  • Languages. Python first. Then the same puzzles in C, C++, Java, Ruby, JavaScript and Go, and after those the less obvious ones: Haskell, OCaml, Rust and whatever else turns out to be fun. Each language gets its own tab in the day’s post.
  • Measurements. Benchmarks of the different solutions and languages on inputs of growing size, with charts.

The solutions link to the puzzles and describe them in my own words; the puzzle texts belong to Advent of Code.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12

The days so far