The Zen of Algorithms

— Stories of Programming and Old PCs

For some time now, I have discovered a hobby that fascinates and relaxes me at the same time: I retrieved an algorithms book, study its theoretical inner workings, and implement them in C language. It is my personal version of crossword puzzles. I turn on a laptop that is over 15 years old, on which I installed a minimal version of Linux (Arch with Openbox, for those interested in technical details). I open the terminal and write the code right there using micro (no, I do not use vim, I have to admit). If I need help, I open an LLM, because there is nothing wrong with asking for a hand with some specific doubt: the important thing, in this context, is not to let it write everything for you and not to abuse the tool.

Training the Mind and getting satisfaction

The ultimate goal is to keep the “programming muscle” working, even in an era of AI agents and automated programming. Because while it is true that LLMs program by themselves, it is also true that if you do not know how to guide them, you lose control and cannot know whether you can trust what they do. Therefore, personal knowledge is indispensable, and it must be nurtured. Furthermore, the dopamine release triggered by hand-written code is not comparable to that triggered by code written by an LLM.

Crafting the Ideal Leisure Setup

We are talking about a “leisure-programming” situation; we are not talking about real projects with clients, deadlines, release dates, and so on and so forth. What I do is carve out a window of time for myself, without distractions, and allow myself the possibility of using my mind in a way that gives me great satisfaction. Everything is aimed at this: the old PC I use has a beautiful keyboard, extremely satisfying to use, and writing on it is a pleasure. The choice to use micro comes from years of shortcuts that are now deeply ingrained, which I cannot replace without a certain personal effort: changing the editor would simply ruin my experience. The decision to use a graphical environment, albeit lightweight like openbox, stems from the usefulness of being able to use an LLM for any doubts I might want to clarify. In fact, I am thinking of an even lighter setup, without a graphical environment, using tmux and a super-minimal harness I have started developing. This should allow me to use a wonderful Thinkpad T41 that I have in a drawer and do not know how to use because it only has 512MB of RAM and a modern browser could not run on it; the idea of using a machine that is almost 25 years old to run an LLM, albeit via API mode, intrigues me. Not to mention the matte 4:3 screen and the screen quality keyboard of superlative standard.

A Healthy and Rewarding Hobby

In short, an activity of this type brings together many different aspects of computing, and becomes a kind of game for adults (no, not “those” adult games). A pastime that I consider healthy, useful, and that I feel like recommending to anyone: even to those who do not know low-level languages. Indeed, especially to them, because it is a wonderful way to learn them.