I cookies sono quelle brutte cose che tanto hanno portato dolore a noi sviluppatori; servono principalmente per capire chi sei, cosa fai, e come vendere i tuoi dati, in ogni caso niente di grave. Chiudendo questo banner o continuando la navigazione sul sito acconsenti all'utilizzo dei cookies e la tua privacy sarà per sempre compromessa, ma tanto lo è già, quindi tanto vale. Leggi tuttoChiudi

Recreational Code

How to get your shit done and live happily

The last year, so called 2021, was a tough one. Lots of good things happened, but I had to face frustration, powerlessness and dumb people on a daily basis. On the very last day of that year, once I planned my New Year's Eve with my friends, the 2021 delivered the ultimate "fuck you" before departing, forcing me home with COVID.

Fate willed I was in my parents' home during the holidays, in a relatively chill mood for the new job and the new opportunities. My plan was going back to my home a couple of days into 2022, but my vacation was prolonged until mid-January.

During this period I watched ten movies, started and completed Mr. Robot (more on that later), read six graphic novels and two full-fledged books. Forced consumption to keep me entertained enough to not sleep through the day and stare at the ceiling on the night.

So here I am, stuck in my old house without my PC and with an Internet connection from 2008 (a dozen minutes to download 100MB, but somehow capable of streaming Netflix on a 4K television). I had with me only my stalwart MacBook Air back from 2013, with a new fresh install of MacOS. I affectionately call it Macinino (coffee grinder).

With an abysmal resolution of 1366x768, that was the only digital support to accomplish something during these two weeks and not waste the time watching movies. I took my chances against C++ once more, my old foe, and I was quite successful. A lot of code is dogmatic ("I have faith that it works this way, I'm not really sure why"), but still I feel pretty much accomplished on the task of hand typing code from the Web.

The feeling about C++ is not changed tho: the language, as powerful as it is, feels heavily bloated, not only on the language itself, but also on the ecosystem around it: I was forced to understand how the build systems works, reading a lot about Makefile, CMake, Ninja and their derivatives, forks and so on. There are at least four ways to compile and link a C++ executable correctly, and none of them works on my Mac. There is so much knowledge on the Web that a lot of it is outdated or just wrong, maybe for different prerequisites or because they are from an obscure forum post from almost twenty years ago.

A complete emotional rollercoaster, from cheering from a SDL window shown, to deleting the code folder in a spark of rage. After a week of highly fluctuating mood I felt I was ready to start writing something on my own, but what?

A word of Damocles

In the duplicity I live in as a developer and a 3D artist I had the luck to speak with several people working in some spectrum between these areas. When we talk about personal jobs to do at home we don't use "drawing", "artwork", "script" or "website", we use another very specific word, full of expectation: a project.

We do personal projects, with attention to the smallest detail, a full-fledged deal taking nights and weekends of restless work. Because the next project could be the one, the one going viral, the one selling a bunch, the one that confirms my skills.

With don't try new techniques aimlessly, because it's a waste of time. What's the point of writing code if you let it get dust in a forgotten folder on your hard drive? Each one of our ideas has the right of landing on GitHub, Artstation, or one of several sharing platforms, and we have the duty to fulfill this right.

But guess what? About 90% of a project are things unrelated about the original idea. Want to publish a game with this singular mechanic? You have to think about the art, the UI and the publishing itself. Want to sculpt a new character? At one point the lighting has to be done, the rendering and the compositing too. Want to try this new graphics library? The scaffolding to make it run can be tricky to set up, and to render what, if I may ask?

The point is, we (and for we I mean me) are wasting a lot of time on things unrelated to what we really want to do, because we feel forced to give a purpose to our ideas. Some years ago, a wise man (and a good friend of mine) told me a maxim that made me think a lot: I give value to my laziness.

The pointless race

So years since I started to work on personal projects are past, more than a decade I think, without counting the ones I did during high school. I think the projects I felt are completed are very few, about half a dozen. Less than one per year. And if I look at my "Projects" folder right now it seems like a graveyard of half-baked ideas, not quite formed to be a minimum viable product, not embryonal enough to be discarded with no guilt feelings. So they stay there, slowly rotting due technological and knowledge advancements, waiting for a resurrection.

I guess they will stay there until I will have the guts to euthanize them, probably next time I will free up some space on my drives. The thing is, they already served their purpose: I've tried whatever I wanted to try, I got bored because transforming them to projects it's a lot of busywork and I move on with a bunch of new valuable knowledge. And this is the way they should work, it just took me years to figure that out.

I don't want to waste time anymore, what's the point of writing another emulator for another old Nintendo console? These projects have little community value, and no commercial value at all. I do these things for my own amusement and curiosity, but I think I have to get something in return other than fun. So I'm moving to a new way to write code (or do things in general): kill your children and document.

From now on my "projects" will have a shorter life: they will be only the implementation or the original idea, with no supplementary heavyweight making my spare time miserable, and once I'm satisfied with that part, the project will be considered done. The next step is to document it: postmortems will be the format, a document on some platform (I really enjoy Notion lately) telling what I did, how I did that and what problems and solutions I found. Done and closed.

At this point I don't feel I have to thrive every day, I don't have to prove myself to an hypothetical someone. I got caught into a cycle of anxiety and anger toward myself because I slacked all day and not doing anything, because the project I worked on was boring and far past its due date. I want to enjoy my spare time, I want to start to have fun again.

Zip and publish

There's an Italian saying that goes "Work ennobles man", meaning that the job and the act of working give the man dignity and honor. My family and my whole northern Italy culture is very rooted in this idea, but it's anachronistic now. We don't work anymore for food, we work to support our hobbies and spare time. The idea that I have to work all day, from morning until I go to bed is exhausting and not very healthy at all.

I choose to slack off, to cut some chains that are dragging me in a circle of dissatisfaction about myself and how I use my time. I choose not to thrive today.

IADRTorna alla Home