In praise of Advent Of Code

Advent of Code is a great way to brush up/crosstrain your coding skills

I’ve written previously about how I learn, and this year I’d like to add Advent of Code to that regime.

If you’ve not done it before, AoC (which we’ll agree is confusingly overloaded with the America Congresswoman), presents you with 24 problems, each with a simple part, and a (usually) more complex extension.

In prior years I’ve used Python, this year I decided to write them in Swift. While not the most obvious language for these challenged (Python feels more appropriate), but this year I wrote a SwiftUI iOS app. Alas the client didn’t go for it in the end, but while doing that I was doing a lot of “change it and try” style edits – which I realise now was because I didn’t know a bunch of the more basic swift features/idioms… You know, those kind of things that are really easy to skip over when jumping from one language to another, because a “beginners” tutorial is too easy.

Anyway, over the course of the exercises I’ve learned a few things about swift, I’ve remembered a few things about software engineering, and my code is becoming better… which is the point.

Finally I am remembering that I’m doing this for “fun”. I’m learning, learning is fun for me – but also I don’t have to get things to work. If I can’t get to the second problem phase, that’s good. Hell a few of the problems I just didn’t get that day, and didn’t even get the first part.

And that’s ok, because while if was being paid, I would continue to hit my head until I got the code to work… this is not a thing I have to do, it’s a thing I’m choosing to do.

So if you’re looking to stretch those particular muscles again, I would recommend.