An Ode to Advent of CodeEvan Travers
Every December I join a few local programmers in a
#puzzles slack channel, sharing ideas and working collaboratively on Advent of Code. Advent of Code is a free programming competition/celebration run from Dec 1 - 25. There is a scoreboard, and there is a real competition to get the earliest solutions… but I get so much benefit out of it without ever hitting the scoreboard.
It's a wonderful tool for learning the craft and skills of programming, no matter what your level.
Things I love about it:
Advent of Code starts out relatively easy… which makes it excellent for trying out a new language, technique or practice. One year I wanted to solidify my knowledge of the Ruby standard library. The next I wanted to learn Elixir. The next year doing TDD in Elixir. Last year I aspired to solve some puzzles using OTP.
Whatever your goal, you can approach Advent of Code with that objective in mind and get a lot out of it.
Test Driven Puzzling
One of my favorite features of the Advent of Code puzzles is that they tend to give you good test cases in the "requirements." I've been enjoying Elixir's doctests… they are perfect for this.
If writing tests hasn't seemed valuable to you before… you may catch the bug in Advent of Code.
Perhaps the best aspect of the design of Advent of Code problems is that each puzzle has two halves. They are cleverly created to reward good programming practices as you move from the first to the second, but more often than not you are going to have to take part of your first solution and rework it to be faster, more expressive, or solving more tests. It's a lovely feature… and means that if you aren't competing for times, you can choose a thoughtful approach and it will reward you.
Positive and Open Community
Even if every puzzle this year stumps me, I can still complete the board and learn a ton by engaging with the subreddit and re-implementing clever solutions from the comments. I can remember some of my computer science training, but especially after day 12 some of the faster solutions leverage tricks and algorithms I've never used… so I am not above "cheating" and learning from others.
Whether you are new to programming or an expert competitor, there's something in Advent of Code to challenge and teach you. You can learn the basic IO standard lib of your language, TDD, optimization and data structures, networking… or you can try to make it hard and do a toy challenge.
I recommend it to anyone who is dusting off a new language, relearning an old technique, or if you just want something a bit more engaging than a crossword puzzle. No need to wait till December, there's previous years still available for your perusal and puzzling.
2022-08-30 08:16:00 -0500Rename files
2022-07-26 10:58:39 -0500Post: Ode to Advent of Code