Category: Tech

Some on computers



I have been planning to write something on this topic for a while, and initially planned to spend some time during the holidays to collect my ideas for this post, but who can find time during holidays? Am I the only one that seems to be busier during holidays than the rest of the year?

Anyway, considering my very low opinion of Elon Musk, and my even lower opinion of the Saudi government, once the takeover of Twitter took place I decided it was time to move away from that platform, and looked again at Mastodon, many years since the last time I checked it out.

Now, I never had a great relationship with Twitter to begin with. I created my account in 2007, used it fairly often for the first few years, and then less and less. I would login every few years, have a look around, get immensely bored, or fed-up with all the negativity there, and leave for few more years. The only reason I did not delete my account a long time ago was to avoid someone else to register and use it, and this is the same reason why I still have my @isazi Twitter account. I may decide to delete it at some point, the same way I deleted my Facebook account some years ago, but this is not happening today.

Fast forward to November 2022, with Mastodon instances sprouting all over the place, I had a look around and decided to join an instance created for the Dutch academics, and this is where you can find me now, with the usual @isazi handle. My first idea was to join the Italian pacifist instance of, but I then opted for something more closely related to my current job. What I was not expecting joining Mastodon is how much better than Twitter this place felt, almost immediately. And I realized that the reason for this is how my feed is built and populated.

There is no algorithm shoveling content at me with the final goal to keep me “engaged”. I see only the content produced by the people I follow, and their re-broadcast of things they find interesting. If I find you interesting enough, I follow you. If you start producing content that I do not want to read anymore, I unfollow you, and the platform will not keep showing me your content just because we have some contacts in common. This may sound like a bubble, and it partially is, but it is such a better experience for me personally. My Twitter timeline was nothing more than ads and content that the Twitter’s recommendation engine decided it was “interesting” for me. And this algorithm’s definition of interesting was very controversial material that would make me feel bad.

I used, and still use to say, that in such systems you are a click away to become indoctrinated. Well, I actually say that you are a click away to become a Nazi, but it’s the same. One “like” to a shady tweet that does not look that shady on the surface, and your feed starts populating with conspiracy theories, bitcoins, Nazis, climate change deniers, and so on. And if you are fed this content without knowing, and do not have enough information antibodies, the risk of being trapped in such discourse is very high.

The point I am making is not that such kind of content cannot exist on Mastodon, or that the people on Mastodon are better. The point is simply that no algorithm will start showing you such content just because you liked something or followed someone, to keep you engaged. I believe this approach is much better for our society and our public discourse.

WetCrag (beta)

WetCrag (beta)

During the fall of 2016 there was something on my mind. First, I was thinking about my trips to Fontainebleau and to the TNF Mountain Festival, and what I did remember about these two events was the rain. In 2016, every time I went on a climbing trip, it did rain. Even in Basilicata we got rain and were forced to shorten our trip by one day!
Second, I was about to change job, and thought about getting more familiar with Python. And what better to get more familiar with a programming language than a pet project?

This is how WetCrag was born. I wanted a website to give me the status of the rocks in the crags where I climb, or where I plan to go (sooner or later). And I also wanted a short term forecast, to see if rain (or snow) was coming or not.
And this is exactly what WetCrag does. It is really as simple as that. It contains a map with crags (or bouldering areas), and it tells you (and me!) temperature and wind speed at the crag, plus the status of the rocks (if they are dry or wet), and the outlook for the next five days (if rain and snow are forecasted or not).



Does it work? Yes. We tested it in the past few months, and it predicted conditions at our local crags pretty decently.
Is it 100% accurate? Of course not! We use weather data from the Internet, and cannot be 100% accurate. But it’s better than nothing. Check it for yourself 🙂

At the moment, we have just a bunch of crags and bouldering areas in the map. If you want your local crag to be added just sent me a message with the name of the Crag, and the GPS coordinates. Or even better, send me a link on Google Maps and I’ll get the coordinates from there. My email is me(at) 😉

Getting married

Getting married

Just today I found on Reddit a link to a post called “Optimizing your wife“. That reminded me that marriage is an example that sometimes arises in scientific papers (I always loved “College admissions and the stability of marriage” for some weird reasons that I never fully understood) and that on January I read another paper, that got also quite famous on the Internet. It was titled “Why I don’t have a girlfriend: an application of the Drake Equation to love in the UK“. You cannot believe it, but Backus’ paper reminded me another thing, completely unscientific, that is an episode of the famous TV-show “How I met your mother” called “Matchmaker“.

Why ?
Because in his paper, Backus talks about some properties of his ideal girlfriend, like attractiveness and education. If you watch the HIMYM episode that I just cited (other than listening to a dialog stating again how low are the probabilities to find a soul mate in New York) you will see the main character, Ted, listing some of the properties of his ideal girlfriend too. It is really funny that a scientific paper made me think about a show, isn’t it ?

As every good computer scientist, or enthusiast, out there I started thinking about an algorithm like the one described, and I thought that we could just see the whole problem as a big optimization one. I mean, if we could have a database plenty of data about different people, then we could just compute some score and pick up the girl with the best one. All our problems solved!
I should say now that I’m not really into things like that, that is, I don’t believe that an algorithm will ever pick up girlfriends for us, but anyway I really like to think about stupid problems and this one just haunted my brain. Anyway I decided to not think about the algorithm itself, or its possible complexity.

My interest, indeed, was just focused on how to list all those complex properties related to the description of humankind. I suppose that the typical human approach would be to list, like in the show, some desired properties of the partner, and our properties too (it should be bidirectional anyway). However I always feel weird when I have to fulfill some description of myself, it’s always difficult to say “I like this and that” or “I do that and that”, there are always omissions, mostly unwanted, and I’m never able to be complete. So at the end I never like any of the description of myself I wrote. But if I’m not able to list at least mine properties (as we can assume, simplifying, that if I would be able just to describe myself and you can do the same, then we can still try to achieve some conclusions about how good is our matching just using those data), how can I even think that a dating service could work in practice! So I should suppose that all the current dating website and whatsoever are just connecting people that match some trivial properties, and the rest is just luck (or love?). The point is that, before thinking about rankings and how to describe human properties so ethereal like “attractiveness“, we should gather all those information together, and just that step is not trivial at all.

Or is it ?
Then I thought something like that: if I’m not able to accurately describe myself, why someone else don’t do that for me? What I mean is that having to directly provide information of this kind is extremely difficult and inaccurate, and it should just be a plus, something more, something to add at an automatically produced base. I need an auto-generated description of myself, that I may or may not want to improve or modify, to use as an input for the soul mate matching algorithm.

But who can I ask for providing an almost complete description of me ?
Not being really smart I will just think about two big guys: Google and Facebook. And the reason is simple: they can store and analyze information about how we behave (of course just on the Internet, but hey, this is just a reflection of mine, not a scientific paper) and they can easily find properties about us that we don’t even know about. What we search, the websites that we often visit, the pictures that we like to watch, our friends, what we read, the music that we listen to and the one that we hate, etc.. I mean, if you could really access all that information about yourself, don’t you think it could be a good description of who you are, to give in input to our super-duper algorithm and find your ideal girlfriend ?

That’s it. I don’t want to go anywhere else farther than that. My goal was just to share a short reflection with the rest of the Internet and that I just did.
And who knows, maybe I will get married tomorrow just because of this post 😉

The art of commenting code

The art of commenting code

It’s simple, I’m reading some old C code right now (but it’s a general thought really) and it lacks comments so I’m trying to understand what it does for using it proficiently, I know that I’m not a “comment guy” cause I only now and then put comments in my source code, but managing a medium C++ project in the last few months (my bachelor thesis) I’ve finally understood what to comment and what not.

First of all I don’t like commenting every line of code, it’s stupid and it’s wrong, good code must be readable also without comments, comments are for helping readers to understand the “whole thing”, so they must refer to widen pieces of code, pieces that you can understand also without the comments but that with them become more easily to be understood by you.

So I’ve started to comment the critical point of my code, the decisions taken and the rationale beside them and I’ve found, finally, what I absolutely need to comment: data structures.

The rationale it’s simple, if algorithms have a behavior that you can follow to understand them, data structures haven’t, you can’t understand them if they want, or better, you can but you have to spent lot of time trying to find every use of them and it’s not cool, absolutely isn’t 😉

So, I started to comment my data structures, their fields, how they must be used and the meaning of them, why don’t you ?

(This is all because the code I’m reading right now has no comments and some strange graph data structures with fields not understandable if you are not the author, and I’m not)