ia: Benvenite! In mi blog io scribe in interlingua, italiano e anglese.

it: Benvenuti! Nel mio blog scrivo in interlingua, italiano e inglese.

en: Welcome! In my blog I write in Interlingua, Italian and English.

A peace plan for Ukraine

Among the peace plans proposed by various European and U.S. politicians, to be frank, I haven't read a single one which I would consider even remotely feasible. My impression is that such plans have been redacted more for a need to fool one's voters and present onself as a peace operator (whereas one factually supports sending of weapons and tightening of sanctions) than for a genuine peace effort, since every politician that had spent even just a few minutes to document oneself on the situation around Ukraine would perfectly know that these peace plans are not just unacceptable by the Russians, but plainly unpresentable.

A believable peace plan must first and foremost take into account the reasons that pushed Russia to invade Ukraine and, above all, those who push the Russian people to support the war. It's certainly legitimate, and even reasonable, to doubt the official reasons: on the contrary, it's very likely that the reasons who push Russia to continue this “special operation” are, at least in part, others, economical in nature and to the benefit of a few especially powerful individuals (arm producers above all). We can put our heart at rest, and accept the fact that we'll never get to know the real reasons; but, on the other hand, it's not even so important to know them, after all.

What we really need to know is the mood of the Russian population, and especially the reasons why president Putin's popularity has risen after the invasion of Ukraine. The mainstream information we get in the West is not helpful at all in this, because it's since 2014 that it omits reporting important facts about the war in Donbass. Well, nowadays the Russian people are constantly fed images of civilians dying in Donetsk and in other cities of the Donbass, right in the center of the cities, where there are no military targets. We can call it propaganda, sure, but the facts are real and are just an aggravated continuation of what has been happening for the past 8 years, all well documented by the OSCE mission and by the Office of the High Commissioner of the Human Rights of the United Nations1.

Besides, the massive transfer of weapons and the episodes of discrimination against Russian artists, athletes, personalities of the culture and entertainment, sometimes against the very Russian language, these are all widely publicized by local mass media and get the Russians convinced that their country is fighting an existential war against a horde of fascists, and, militarily, against the whole of NATO.

If the West had really the will to restore peace it should work to destroy this representation of itself and disarm the Russian propaganda by removing the facts on which it's built. Specifically, I'm persuaded that many of the following points would be well received by the Western population and would demotivate the Russian people (including many of the soldiers stationed at the front) in fighting this fratricidal war:

  1. Removal of every discrimination against Russian culture and its representatives and performers.
  2. Promise that Ukraine won't be let into NATO or in other military alliances that would go beyond the commitment to reciprocal defense (that is, no to joint military drills or foreign bases in the territory of Ukraine, yes to a promise of military intervention in case of attack).
  3. Pausing the shipment of weapons until Ukraine removes the title of hero of Ukraine to Stepan Bandera and other members of the nazist organisation UPA.
  4. Pausing the shipment of weapons until Ukraine stops bombing civilian settlements devoid of military installations.

It should be noted that none of these points require collaboration or agreements between states (even joining NATO can only happen after the unanymous vote of all current members, as Turkey reminds us), so they all could be immediately implemented by any willing state. The bigger the number of Western countries pushing forward these policies, the more uncertainty will grow among the Russian population, and will ultimately transform into incomprehension and dissatisfaction, since this would destroy the ideological reasons that make the Russians support the conflict.

If we are to speak of a peace plan, agreed among NATO, Ukraine and Russia, then it could be developed along these lines:

  1. Ukraine condemns the nazist ideology (therefore Bandera and friends), accepts to open an international commission of inquiry (including Russia as well) over the massacres of Maidan square and Odessa.
  2. Ukraine grants the status of second official language to the Russian language, similarly to how Swedish language is treated in Finland2.
  3. Ukraine enacts laws to guarantee a limited autonomy to the 5 regions currently under Russian control (including Crimea) and amnesty for all those rebels that are not found guilty of war crimes (in other words, a sort of Minsk accords extended to all the occupied regions).
  4. Ukraine promises not to host military forces or equipment from other countries in its territory, and to not participate in joint military drills, without the consent of the Russian federation. It can, however, join defensive military alliances.
  5. Ukraine promises to never enact sanctions against Russia, nor to require visa from Russian citizens in order to cross its borders.
  6. The Russian army withdraws and gets temporarily replaced by the army of a third country, not member of NATO, chosen by Ukraine.
  7. New referendums, under the supervision of international observers (including Ukrainians and Russians) in the 5 contested regions. Times will be established by Ukraine. Russia and Ukraine commit to recognize and implement their results.
  8. The peace mission introduced in point 5 gets wrapped up.

It's of fundamental importance understanding that territorial questions are only a secondary matter, and that what is most pressing for the Russian people is to have good relations with the neighbouring countries: not having to worry about coups, colour revolutions stirred up by the West or about other attempts to use Ukraine as a weapon against Russia. If, for example, there were a Russian region that desired to separate itself from the federation and join Belarus, I'm convinced that this could happen in a peaceful way without serious repercussions, since the relationships between the two countries are good and Belarus is not perceived as a threat. This was also the situation with Ukraine before 20143, and it's the situation to which we should strive to return to.

  1. See for example the report for the period May-August 2018, page 5, point 22. More reports can be found in this list

  2. Note that Swedish in Finland is the native language for just 5% of the population, whereas in Ukraine Russian is the native language of about 30% of the population. 

  3. Not exactly, since there had already been attempts at colour revolutions resulting in anti-Russian governments. But I hope you'll pass this oversimplification of mine here. 

Back to Maemo!

New year, new job. After leaving Canonical I'm back to working on the same software platform on which I started working back in 2006: Maemo. Well, not exactly the vanilla Maemo, but rather its evolution known as Aurora OS, which is based on Sailfish OS. This means I'm actually back to fixing the very same bugs I introduced back then when I was working in Nokia, since a lot of the middleware has remained the same.

At the moment OMP (the company developing Aurora OS) is mostly (or even exclusively, AFAIK) targeting business customers, meaning corporations such as the Russian posts and the railway company, whereas the consumer market is seen as something in the far away future. Just in case you were curious whether there were any devices on sale with Aurora OS.

I should also explain why I've refused several very well paying job opportunities from Western companies: it's actually for a reason that has been bothering me since last March, and it's a very simple one. The fact is that because of the sanctions against Russia I already had to change bank once (as the one I was using fell under sanctions), and in these months I've always been working with the fear of not being able to receive my salary, since new sanctions are introduced every month and more and more banks are being added to the blacklist. That's why I've restricted my job search to companies having an official presence in Russia; and to my surprise (and from some point of view, I could even say disappointment) the selection and hiring processes were so quick that I received three concrete offers while I was still working my last weeks at Canonical, and I joined OMP on that very Monday after my last Friday at Canonical.

I mean, I could have rested a bit, at least until the Christmas holidays, but no. ☺ Anyway, I'm so far very happy with my new job, and speaking Russian at work is something totally new for me, both challenging and rewarding at the same time.

Leaving Canonical, again

For the second time, I'm being shown the door at Canonical. Well, technically, this time it was me who handed over my resignation, but that was only after I was told in very clear terms that I would eventually be fired. No timeframe was given, but since I don't particularly enjoy the feeling of checking my e-mail every morning to find out whether this is the day when I'm being fired, I decided to take the initiative and leave myself.

The reason? Those who know me well might suspect that it's related to some complications with that fact that I'm living in Russia, or maybe with some remarks I might have made about the war in Ukraine or about other current events, since I tent to be quite outspoken and provocative. Nothing of all that: it's about my refusal to get vaccinated against COVID-19; unfortunately, it has now become apparent that I'm not the only one leaving, and other employees who have refused either to get vaccinated or to disclose their vaccination status are also being shown the door (including people who have been in the company for more than 10 years). This has sparked some internal discussions in the company, and several different point of views have been voiced: from those who welcome this policy and would like to see it extended to flu vaccinations (which makes a lot of sense, since once you've accepted to renounce your freedom in order to protect the weak, you should accept it for all transmissible diseases), to those who voiced concerns about the legality of this move, or would have found this reasonable one year ago but not in the current situation as restrictions are getting lifted and the current variants are less scary than the previous ones; those who pointed out that being vaccinated has little impact on transmissibility of the virus; that we are mostly a remote company and we could instead have exceptions to allow unvaccinated people (or people with a weak immune system) to remotely attend the few in-person meetings we have; that as long as there are no vaccination mandates for plane flights and other guests attending the same hotel premises where we meet, mandating employees to get vaccinated might not help a lot; and whether this is a decision that a company should make, or shouldn't it rather lobby the politics to have it mandated at state level. I think there's merit to all these arguments, but I'm personally not particularly interested in discussing any of them, since my point is another.

Before talking about that, though, let me clearly set one thing straight: I hate lies, and Canonical's management is lying about this matter. The vaccination mandate measure is being justified on the grounds that it allows employees to travel (something that I've been able to do as unvaccinated throughout the last two years, even when restrictions were at their peak) and, most importantly, to protect our weaker colleagues. This is what I find most disgusting: using genuine feelings like love and compassion to justify repressive measures. No, dear Canonical, this has nothing to do with protecting the weak; not only because a vaccinated person can still spread the virus (and our employees know this from first-hand experience), but also because, if this was the real reason, then you'd accept people who have recently recovered from COVID-19, since immunisation after recovery is not worse than that of vaccination; but you don't, as I was explicitly told by HR that any previous infection is irrelevant. It's also significant that you didn't establish clear rules about how often one needs to get vaccinated, since all recent scientific literature on vaccine efficacy shows that this is not a minor detail. Why not just be honest with ourselves, and admit it's just for business? Being open about the fact that having a fully vaccinated workforce can grant us access to more business deals would not change a lot in the practical life of the (ex-)employees, but at least we won't feel that the company is treating us as fools while embellishing its image with fake care and compassion. Or, if there are other reasons, state them, because these ones don't stand up to logic scrutiny.

Another thing that doesn't match (though maybe this is a timing issue, so I cannot for sure call it out as a lie) is the fact that HR claims to have an exemption process through which one could opt-out of the vaccination for religious beliefs. Well, I was explicitly told in very clear terms by HR that no exceptions would be made on either moral or religious grounds. But maybe this has changed since the time I was told this (mid October) and now?

Here, finally, let me state why I believe that such a mandate is wrong. The first thing I want to put on the table is that even though I see very little reason for this mandate (given all what we know about the virus mutability and infectiousness, the shortcomings of the vaccines, etc. — by the way, if you are into science I suggest reading this article which raises some questions you won't hear in mainstream media and has a comprehensive bibliography for further study), I recognize that in principle there are very solid reasons for vaccination mandates, for example in the case where a virus is extremely lethal, its symptoms otherwise uncurable and the vaccine is 100% safe and highly effective. But even in that case, while getting vaccinated myself, I would still oppose a mandate. Why? Because of freedom, which trumps everything. The choice is never between a healthy life and freedom: if there's no freedom, there's no life worth living. Even if some decision has very solid reasons behind it, this doesn't automatically make it a good decision.

Let me make a few examples: if a company (I'm talking about companies here, but the reasoning could be extended to states as well) decided that smokers will be fired, or that those who drink alcoholics will be fired, or that you cannot eat meat, or that you must take a pill whenever your head aches, or that transgender people must undergo gender reassignment surgery, or that everyone should wear a black band on their arm whenever a relative of a colleague dies, or that employees' households must use the product made by the employer, or that they have to excercise sports for at least two hours per week, etc.; I would be categorically opposed to every single of these impositions, despite recognising that there are reasons behind each of them, and that I even dream of a world in which some of their goals are attained (could we just all be fit and healthy?!). Because I think that personal freedom is more important. You can always find good reasons to justify this or that action; surely, if we think back at the fascist and totalitarian regimes of the first half of last century, we must acknowledge that they were supported by the (overwhelming?) majority of the population. An effective propaganda machine could convince the population on this and that matter, but ultimately it's the population who reasoned and accepted that storytelling. Nowadays the situation is different, but the mechanisms are the same, except that propaganda has become way more effective (or have we become dumber?) and aligned over the same direction, thanks to the globalisation process.

I'm well aware that societies are made of rules and therefore inevitably restrict personal freedom: Western societies, for example, forbid nudity in public places, and that's something I accept because it's part of my culture; it's a rule deeply entrenched in our history, and I don't feel it as a burden. I'm convinced, however, that the evolution of human society should be that, as we become more conscious, we should be moving towards more free societies, with fewer rules and more tolerant for diversity.

The “idiotism” of software developers

Before you get angry at me for this title, please let me state that I count myself in the number of the “idiots” and, secondly, that what I mean by “idiotism” here is not to be intended as an offence, but as some traits of mindset which are typical of very logical brains.

Some months ago I finished reading Dostoevskiy's “The Idiot”, a book about an exceedingly good-hearted man, prince Lev Mishkin, whose behaviour was puzzling the people around him so much that they thought of him as an idiot. Sure, the fact that he was suffering from epilepsy didn't help, but it was far from being the primary reason for their thinking, since his epileptic seizures were very rare (if I remember correctly, only two occurred during the time of the story) and everybody's opinion had already formed well ahead of witnessing him in such a state.

He was an idiot because he was open, trustful, and especially because he could not “read between the lines” of what was been said to him: his social conduct was straight, and although he was following at his best the customs that he had been taught, he was supposedly awkward and unable to perceive and parse all the messages that are implicitly conveyed by social behaviours and human interactions. I added the word “supposedly” because, as a matter of fact, his behaviours were all perfectly normal for me: I only noticed their awkwardness when it was pointed out by the other characters, at which point I couldn't help smiling and acknowledging that, indeed, that thing he did was weird.

However, he was a good and caring person, and not without talents: he had an interest in calligraphy, and everybody liked to listen to him, as his speech was insightful and his thoughts were original. I wonder how many of my readers can identify themselves in such a character?

I definitely can. I won't get into the details, but I've felt many times on me the amused or puzzled glance of people (like that time in high school when I could not open a door in front of dozens of people, and I heard them say “So, that guy is the genius of mathematics?” — I'll never forget that!), often without understanding the reason for their reactions. Still, generally people seem to like my company and be genuinely interested in talking to me.

So, what's wrong with prince Lev Mishkin, me, and maybe with you too? Well, a few things, I would say. I'm not going to claim any scientific truth on what I'm going to say, these are just my own impressions and deductions, which seem to be shared by other people in the interwebs too, judging from a quick search I did; take them for what they are.

The first thing I notice is some common traits between us and autistic people: we tend to work better with things, rather than with people; we can to focus on a certain thing (work, a mathematical problem, a game) and forget about the world around us; we have our unique hobbies, like solving puzzles, arguing about a specific and very narrow topic, learning artificial (both human and programming) languages; it's as if we needed to build a small, better world where we would feel safe and at ease.

The other thing, which I actually consider harmful and which I put efforts to change in my own life, is the fact that it's extremely easy to get us interested into a specific aspect of a problem, and make us forget (or just not notice) the big picture. That small part that we are looking at is stimulating and challenging, and we are led to think that it's core of the issue, and maybe of all the issues that affect our world. What is often missing is the ability to take one step back and try to look at the issue from a different angle, and especially the ability to listen for counter arguments; I mean, we do listen to them, but since we have, in a way, “gamified” the issue, even when we think that we are open to listen for the other side, we are in reality trying to win the counter-arguments, rather than genuinely trying to understanding them.

Another thing which we have, is faith. Yes, you read it right: even though the IT world is probably the one with the highest percentage of atheists, men always need something to believe in. We just don't realize it, but we do hold a blind trust in certain persons and authorities. This does not mean that this trust lives forever and cannot be broken, but this generally does not occur because of a conscious realization of ours. Much more often than we'd like to admit, the reason why we lose faith in a certain person or authority is because the rest of the persons and authorities that we trust has told us so. In other words, even if there's undoubtedly a reasoning of our own, the full realisation and conviction occurs after having collected and compared the opinions (or statements) of those we trust. The net result is that the IT population is the one most trustful of the mainstream media, because it's the mainstream media who has more “voice”: that's where the most reputable journalists, scientists, activists are (and “reputable” is the key word here, since this reputation is recursively created by the mainstream media themselves or by their sponsors).

I might be biased by my own experience here, but it seems to me that there isn't a group of people more homogenous in their political (and generally, world) views than that of IT workers. When, in 2018, I saw the leaked video of Google's co-founder Sergei Brin and other executives' reaction at Trump's presidential victory, what I found most surprising was not the contents of the speech, as they were mostly mainstream opinions, but rather the fact that all this could be said in a company meeting. Something like this, I though, could never happen in an European company, as political matters are a conventional tabu in the work environment. But the point is that Brin and others could say those words only because they knew that the overwhelming majority of the audience shared the same opinion. I don't think you could find the same homogeneity of thought among shop assistants or philosophy professors.

Assuming that you have followed me this far into my rambling, and that you recognize that there might be some truth in what I wrote, you might now be wondering if there's a way to counterbalance our “idiotic” traits. Unfortunately I don't have a full answer, as myself am only halfway there (but maybe I'm too optimistic here? and does this road even ever end?), but there are a few things that I think are absolutely worth trying:

  • Talk with people. Better if face to face, or at least in a video call; just 1-on-1, avoid groups, or you'll get on the defensive and try to defend your position for the sake of not losing the argument in front of an audience. But it's not a fight. Your goal when talking should not be that of convincing or getting convinced, but rather just to understand the other points of view.

  • Read both sides of the narrative. Try to see the other party's argument as they themselves present it, and not how it is presented in the media you usually read. Media often use this trick, to either invite “clown representatives” of the other point of view just to ridicule it, or they give them too little time, or extrapolate their answer out of context, just to make them appear unsensible.

  • Always assume that other people are smart, and that no one is bad.

  • Whatever the argument, try to answer the key question: “Cui bono?” (who profits?) to be at least aware of all the hidden interests behind this and that. They don't necessarily invalidate a position, but they must be considered.

  • Lose faith. The only faith you are allowed to keep is the faith in God (or Gods), if you have it: but men, theories, institutions, authorities (including religious ones!), these must always be assumed to be imperfect and not blindly trusted. People serve their interests or can be manipulated. Try always to start from a clean table and an empty mind, and see if they have enough arguments to convince you.

  • Do never assume “They can not all be wrong” or “If this were wrong, at least some media would report it”. It just doesn't work this way, this is again a matter of having faith in the majority. Think of how many times in (recent) history you were presented an unambiguous truth, which later came out to be a scam (Iraq war being a famous one).

  • Defocus. You might be spending a lot of energy into something that's not worth it. I mean, feel free to pursue whatever hobbies you like, as long as they make you feel better. But if you think you have a mission, think twice about it. Think about the world you'd like to live in, and whether/how this mission contributes to it.2

  • Ask questions. Be curious. Be challenging. For any topic, there are questions that have not been answered in mainstream media1. Find the answer, then find explanations, never stopping at the first satisfactory one, but always get at least two competing answers. From here, ask more questions, rinse and repeat. And at every step ask yourself this: why didn't I know about this? Is someone trying to hide the truth from me?

  • Aim at improving. Whenever you read something or talk to people, keep a humble attitude and try to be challenged. Your goal should be that every reading and every dialog should make you wiser, even if what you initially read and heard sounded like garbage. There are always reasons for all these thoughts you disagree with.

  • Reach out to the people nearby. Try not just to be sympathetic to the needs of some population living far away from you, which the media has singled out as being those needing your compassion, and try instead (or in addition to that) to be sympathetic and helpful to the people around you. To your neighbours, to those you see in the public transport and, first and foremost, to your relatives.

Summing up, what I want you to realize is that we IT workers are easily exploitable. All those thought manipulation techniques represent a problem to everyone, but it's particularly with us that they tend to be especially effective; as a matter of fact, I've found that awareness of how the power controls us is higher among uneducated people, because they are more distrustful of the media and just tend to consume less of it. We, on the other hand, are not only well educated to respect the authority (see Noam Chomsky on education), but our logical, detail-focused mind can be easily externally controlled by continuously stimulating it to focus on specific things and not others.

How would Dostoevskiy call us?

  1. My favourite one is: which country hosts more refugees from Ukraine? 

  2. I was recently surprised when I read people in a forum who were discussing avoiding doing business with Saudi Arabia because of their human rights record. Seriously? We are talking about a government who has indirectly caused the death of more than 300 thousands people in Yemen, and your main reason to criticize them is human rights? It's like asking the police to arrest a killer because before the assassination he misgendered his victim! Yet the elephant in the room continues to go unseen. 

Deride, a generator of mock objects for unit testing

If you have been writing C++ classes for mocking out your C or C++ dependencies, you know how tedious it is. I generally write small classes with just a handful of methods, so it's generally bearable, but when using third-party code I'm usually not that lucky. If the dependency is a C library this becomes especially tricky, both because they might be larger than what you can handle, and both because the lack of an object-oriented design might not offer you an easy solution to store the mock object data.

But fear no more, Deride is here!

I won't spend too many words describing it, since you can read its description from the link above, where you will also find some example code. More examples, by the way, can be found in the example/ folder in the code repository, where you can see how it can be used to mock both pure C++ and QObject-based classes, and C libraries.

What is most important for me to say now, is that the project is in alpha state, meaning that I've tried it on a handful of header files only; it's highly likely that it will not work on many real-life scenarios, and if that happens I warmly invite you to inform me by filing a bug report providing the include file that was not properly processed.

I leave you with a short example of a unit test, written using Deride. The class under test is called Stable, and internally it uses objects of type Horse, that we decided to mock. We used Deride to generate the mocked implementation and a MockHorse class which can be used to control the mocked objects. When building the test, we won't link against the original horse.cpp, but we'll only use the original horse.h; the implementation will be found in mock_horse.cpp, generated by Deride. And in the corresponding mock_horse.h file we'll find the MockHorse class with all the on<method>Called() hooks which we can use to install our callbacks (either to reimplement the object behaviour, or to just be notified on when its methods are called).

    /* This MockHorse is the object created by Deride
     *                   |
     *                   |
     *                  \|/
     *                   V
    using Mock = Animals::MockHorse;

    std::list<std::string> horseNames = {

    /* We could use a vector, but let's be explicit */
    Mock *mockTom;
    Mock *mockDick;
    Mock *mockHarry;

    int createdHorses = 0;
    // onConstructorCalled() is created by Deride and called when the mocked
    // Horse object is created
    Animals::MockHorse::onConstructorCalled([&](const std::string &name) {
        std::cout << "Horse instantiated: " << name << std::endl;
        if (name == "Tom") {
            mockTom = Mock::latestInstance();
        } else if (name == "Dick") {
            mockDick = Mock::latestInstance();
        } else if (name == "Harry") {
            mockHarry = Mock::latestInstance();
        } else {
            assert(false); // should not be reached

    Stable stable;
    /* It's at this point that the contructor callbacks we defined above will
     * have been called. Let's double-check that indeed that's the case.
    assert(createdHorses == 3);
    assert(stable.count() == 3);
    assert(mockTom != nullptr);
    assert(mockDick != nullptr);
    assert(mockHarry != nullptr);

    /* Prepare for mocking the jump; these methods are generated by Deride and
     * allow setting the return value for the corresponding jumpHeight() method
     * from the original Horse class. */

    std::string highestJumper = stable.findHighestJumper();
    assert(highestJumper == "Dick");

In my closing words I'd like to thank the Clang project, which Deride is using to parse and interpret the input files, and Jinja2, the templating engine used to generate the mock code.