| . ___ __ __ ___ . __ __ __ __ __ __ | | |__ |__) |__) |__ ' /__` /__` / \ /\ |__) |__) / \ \_/ |___ | |___ | \ | \ |___ .__/ .__/ \__/ /~~\ | |__) \__/ / \ ⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∽⋅∼⋅∽⋅∽⋅∽⋅∽⋅
A colleague I learned a lot from told me about the advent of code challenge years ago. It's an advent calendar where you can find a coding challenge instead of a piece of chocolate everyday while waiting for Christmas.
When he first mentioned the fun he had with it, I thought to myself: now is an opportunity to solve something while aiming for my highest possible coding standard. And also a chance to practice some C++ that is not bound to the old standard versions we had to use at work. And also a chance to create several small C++ projects to boot, because at work, I was only a user not a builder of the tool chain used orchestrate the code we wrote. Not mastering the build tool made me unconfident in my abilities, and I wanted to fix that through some private practice.
So to recap, I wanted to solve puzzle challenges in a format I never faced before with:
Naturally, it was a recipe for disaster and a miserable experience. I did a couple challenges, but gave up afterwards. C++ environments can be very frustrating and I was not happy with what I had. In retrospect, I should just have used gcc, make, my editor of choice and I would have been set. I should probably have renounced a dedicated test library probably and just handcrafted my tests. For the scope of the challenge, I think that would have been good enough.
The problem, once more, were my own expectations of myself. Had I had more humility at the time, I would have went with something comfortable first, then only increased the difficulty once the task mastered. Instead, I put too much pressure at the beginning which made something meant to be fun painful. Because of that, I gave up. Which meant no practice, and therefore very little was learnt. Which feeds my lack of confidence, which tends to bring me to raise my expectations to hopefully catch up.
This year, I gave it another go. Instead of C++, I used python and a different philosophy, as I am working on my lack of humility. The philosophy is: anything goes, it's a puzzle. It's meant to be fun. Creating a dedicated virtual environment, a git init and a pip install numpy were the only setup I needed so far. I just went at the problems, thinking about maintainability only within the scope of solving the problem efficiently.
Instead of aiming to create clean code under the guise of solving puzzles, I aimed to solve puzzle with code I could live with. And it has been so much fun so far! From something I would dread, it is now a fun thing to do with my morning coffee and then forget about. Which I guess is what it is meant to be. The challenges tend to ramp up in difficulty, so let's see how far I can go this year. But at the very least, I feel I learned something already this time around.
⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∽⋅∼⋅∽⋅∽⋅