Advent of Code participation

Last year, for the first time, I have participated in the Advent of Code—an advent calendar with two programming puzzles per day—and I have now completed all the fifty puzzles. It was a mostly fun activity, practicing some problem solving that is not always exercised at work, and refreshing on Computer Science fundamentals that time faded away. However, it felt sometimes a bit exhausting solving these puzzles for twenty five consecutive days.

Debugging shell scripts with strace

Imagine that we had to create a wrapper shell script that performed some tasks and then called the main script or command. The same command line arguments given to the wrapper script would also be forwarded to the main script. For demonstration purposes, let’s assume that the main script is called printargs and its only purpose is to print the first three positional parameters that were set: 1 2 3 4 5 #!

The strange case of the MySQL server has gone away

A while ago, I had to track down the root cause for a strange issue observed in a Django-based service that I was involved with: our database operations were systematically failing when our service had been inactive for a long period. Whenever this happened, the following message appeared in the logs: OperationalError: (2006, 'MySQL server has gone away') Afterwards, the service would no longer function properly until it was manually restarted.

Creating a blog website with GitLab, Hugo and staticman

This is my first blog post—hooray! That being so, it fits like a glove that I start my new hobby by describing all the steps that I carried out in order to create this website. Most blog websites sites are created and hosted using WordPress. Even though I confess I never used it, wouldn’t it be better if instead of storing our web content in some relational database that we may not have directly access to, and which we need to remember to create regular backups, we stored it in a git repository instead?