Combining traditional Christmas advent calendars with online programming exercises: Advent of Code is a nicely made collection of programming problems.
One of the things I like about these problems is there are always two parts, and you don’t see the second part of the problem until you have solved the first part. This usually leads to refactorings or repurposing of your code, which is a valuable exercise in and of itself.
For many of the problems, there are interesting follow-on questions. One common one would be, “Write the code that generates the sample inputs to be sure there’s a single answer.” For some of the problems, any random input would do, but for some, there’s a constraint that has to be met.
I have a collection of approachable problems at Kindling projects. If Advent of Code will stay up after Christmas, I’ll definitely add it to that page.
Today’s is the first where a simple brute force approach isn’t going to work, and I’ll need a cleverer algorithm... Hmmm...