Matthew Gregg’s Post

Why do programmers do *Advent of Code*? An online series of daily coding puzzles throughout December. For some there's a reaction of 'Urgh, leetcode nonsense', but here are some reasons to at least take a look: 1. It's got a nice difficulty curve. The early puzzles are generally simple, maybe something like parse a string and count a particular character. Difficulty increases through the month. 2. It's self paced. Do the puzzles as soon as you can - or in the evening - or at the weekend - or next year - or never. Do them scrappy or elegant, or efficient, or verbose, or however. Do it on your own, do it with colleagues, or shout about it on Bluesky. It's all up to you. 3. It's good practice for starting from scratch. You have a plain text puzzle - and that's it. Solve it however you want. 4. It's good practice for keeping things simple. You have a puzzle to solve - and that's it. It's refreshing to be able to clearly see what was useful, and what wasn't, in your solution. 5. 'But it relies on esoteric knowledge xyz' - is rarely, if ever, true. There's often interesting context, but it's unlikely a secret formula that's blocking you. Sometimes it's a good opportunity to learn (I learnt shunting yard parsing, and have since used it practically). Occassionally there can be an *advantage* in knowing something (chinese remainder theorem one year? I muddled through without) - but the community is your friend here for tips. Or skip a puzzle as uninteresting - no one is judging! 6. The community... is amazing. There's reddit, there are forums, slacks, discords, there are blogs and youtubes, all full of people having fun and helping each other. People doing the puzzles in weird languages, people doing puzzles at speed, your favourite rockstar programmers doing puzzles live like a concert. Funny illustrations, cool visualizations and animations - it's all out there. 7. Learn by doing. It's a great way to refresh yourself on a technology you know, or to go further into a technology you're learning. It's exciting to learn something completely new, which I've done a few times - you need to do X, but it's not covered until Chapter 8? Tough! Jump around, learn what you need out of order - it may not be perfect but it will be fun and you'll cover a lot. 8. Learn from others. It's rare to have so many people working on similar things at the same time. At any time you can find out what other people are doing, and how. See people use language features in cool ways that you'll steal. See people use language features in scary ways that you'll avoid. See how people think about problems. 9. How esoteric are the puzzles *really*? Sure, you might not be optimizing ingredient lists for festive pie production in an elvish kitchen professionally - but maybe you'll be optimizing data storage for a processing pipeline. Just because the scenarios are fictional, don't write off the techniques. So head over to adventofcode.com (I'm not affiliated in any way.)

Advent of Code

Advent of Code

adventofcode.com

To view or add a comment, sign in

Explore topics