What’s happening in Italy?


I read a few good articles in English about the latest elections in Italy, but they all seemed a bit unclear about what can actually happen and what cannot happen.

I hope this post can be easy to understand, not too boring and not too imprecise (I’m trying to simplify a few things and I didn’t study law).

A brief introduction

Italy is a parliamentary republic. The parliament is formed by two separate houses, the chamber of deputies and the senate. The two houses have the same powers to make laws and to pass votes of confidence for the government.
The cabinet is usually formed by members of the parliament, but this is not a requirement. The prime minister is not particularly powerful, for instance the prime minister cannot dismiss ministers or call for new elections.
The president of Italy is the head of state. The president is mainly a figurehead with limited powers, but becomes very important when it’s time to form a new government or to dissolve the parliament.
The president is elected by a joint session of the two houses of the parliament plus 58 local representatives for a 7-year term.

How is the parliament elected?

The current electoral law, disliked by almost everybody, was used for the first time in 2006 and was designed to make it difficult for the left to get a stable majority. Parties can form coalitions or stand on their own.
For the lower house, the coalition or party with the most votes automatically gets 55% of the seats. The rest of the seats are assigned to the other coalitions or parties on a proportional basis.
The senate is elected in a similar way, but on a regional basis (Italy is formed by 20 regions). This means that the party or coalition that gets most of the votes in a region gets 55% of the seats assigned to that region. It means that, at a national level, it’s possible that nobody will have a majority.

What are the main parties/coalitions in Italy?

The left is formed mainly by the Democratic Party (a center-left social democratic party) and by Left Ecology Freedom (a communist-ish/green party).
The centre is a mix of Christian and economically liberal parties. Its leader is Mario Monti, the current technocrat prime minister.
The right is formed by Silvio Berlusconi‘s People of Freedom and by the Northern League (they want more independence for the North of Italy and they are a bit populist and racist).
The new entry at the latest elections was Beppe Grillo‘s Five Star Movement. Their policies are a mix of environmentalism, anti-corruption and euroscepticism. While most of their goals are laudable, they are very populist with huge holes in their policies; basically it’s not clear where they could get the money for any of their policies. While they claim to value direct democracy, it’s Beppe Grillo who actually completely controls the party, even if he was not a candidate at the elections.

Why isn’t Beppe Grillo in the parliament?

Beppe Grillo says he is just the spokesperson of his party. Moreover, the Five Star Movement is against electing people that were found guilty of any crime in the past and Beppe Grillo was found guilty of manslaughter for a car accident in which three passengers died.

Who won the elections?

Nobody. The left has a majority in the lower house, but no current coalition has a majority in the senate.

Who voted for the 5 Star Movement?

Apparently one third of their voters used to vote for the left, one third for the right and one third didn’t vote in the past.

What is going to happen now?

The new parliament’s term will start in a couple of weeks. At that point the two houses need to vote for their presidents/speakers. Then the Italian president will hold meetings with the various political leaders and try to find a prime minister that has good chances of creating a cabinet that could pass a confidence vote by both houses of the parliament. This is the problem as there is no majority at the moment.

Is a broader coalition possible?

In theory yes. Any coalition will have to include the left because they control the lower house.

  • A coalition of the left and the centre is what most people expected before the elections, but Monti didn’t get as many votes as expected, so this coalition would not have a majority in the senate.
  • A coalition of the left and the 5 Star Movement would have a majority, but Beppe Grillo doesn’t want to form alliances with anybody. The 5 stars are against traditional politics and want a deep renovation of the Italian political class; if they decided to form an alliance with a traditional party they would lose a lot of their voters.
  • A coalition of the left and the right is possible too, but unlikely. The current technocrat government was, after all, a coalition of left, centre and right, but Berlusconi decided to stop supporting it, so why should he be trusted again? Moreover, I think that a coalition of left and right would disgust a lot of their voters.

Is a minority government possible?

It would be very unstable but yes, it would be possible to have a minority government formed by the left and, maybe, the centre with external support by the 5 stars. The problem is that this cabinet would still need to pass a vote of confidence in the lower house (easy) and in the senate (not so easy as the 5 stars don’t want to vote for it).

But the 5 star senators could just abstain, right?

No. Abstentions in the senate count as no, so the government would not get the parliament’s confidence.

But the 5 star senators could just leave the senate during the confidence vote!

No. Votes in the senate are only valid if the majority of senators are present. The right would not have enough votes to block the confidence vote, but they could just leave before the vote, making the vote invalid.

Can’t you just vote again?

Usually the president, when it’s clear that there is no chance to form a cabinet, calls for elections, but this time it’s not possible.
The authors of our constitution were worried that a president could dissolve the parliament just before the end of the presidential term in the hope of getting a more favourable parliament that would elect the current president for another term.
The term of the current president will end in a few months, so he cannot dissolve the parliament now.

How about another technocrat government?

It would be possible (and it would be very different from the current one!) but it would be very difficult to get the left and the 5 stars to agree on much.

Could the new parliament elect another president that would then dissolve the parliament?

Yes, but finding an agreement to make this happen is going to be complicated and take time. In the meantime, Italy won’t have a stable government (the current Monti government will be in charge until a new government is found, but with very limited powers).

So, what is going to happen?

Good question. I have no idea.

Why is g_hash_table_insert used?


Yesterday I was discussing a bug in some code using a GHashTable with Will and we both started to wonder if there is any reason to use g_hash_table_insert instead of g_hash_table_replace.

First of all an example, look at this code and try to find the bug.

#include <glib.h>

static void
add_entry (GHashTable *ht, const gchar *config)
{
  gchar **split_config = g_strsplit (config, "=", 2);

  if (g_strv_length (split_config) == 2) {
      gchar *key = g_utf8_strdown (split_config[0], -1);
      gchar *value = g_strdup (split_config[1]);

      g_hash_table_insert (ht, key, value);

      g_print ("Set %s to %s\n", key, value);
  }

  g_strfreev (split_config);
}

int
main (int argc, char **argv)
{
  GHashTable *ht = g_hash_table_new_full (g_str_hash,
      g_str_equal, g_free, g_free);
  gint i;

  for (i = 1; i < argc; i++)
    add_entry (ht, argv[i]);

  g_hash_table_unref (ht);

  return 0;
}

If it’s not clear where the bug is, try invoking the program with “apples=42 Pears=12 APPLES=10” on the command line.

If a key already exists in the hash table, the key passed to g_hash_table_insert is destroyed and you cannot use it afterwards. This behaviour is documented, but it’s easy to find code affected by this bug. g_hash_table_replace behaves like g_hash_table_insert, but without this problem.
Is there any good reason for using g_hash_table_insert instead of g_hash_table_replace? Can you come up with a non-contrived example where you want the behaviour of the former?

Message Notifier for Gnome 3.6


Recently I didn’t have much time to hack on Message Notifier, but luckily Guillaume Desmottes ported it to Gnome 3.6. This version also changes the shortcut to open the menu from Win+M to Win+L, as the former is now used by the shell.

To update, just visit the extension page and click on the update button next to the on/off switch.

Boss Mode extension


Gnome-shell’s popup notifications and integrated chat are great, but sometimes I’m annoyed when the content of a chat is displayed on screen at the wrong moment (for instance if a colleague sends you a work-related message while you are sitting at a conference next to other people).
The Boss Mode extension allows you to quickly disable notifications, without any UI feedback, by just pressing Win+B. Press Win+N to enable notifications again.

The default keybindings can be modified by clicking the preferences button on the extension page (next to the switch to enable/disable the extension).

Keybinding for the message notification extension


I uploaded a new version of Message Notifier to extensions.gnome.org. The main new feature is that you can now open the menu pressing Win+M.
The default keybinding can be modified by clicking the preferences button on the extension page (next to the switch to enable/disable the extension).

This version also fixes notifications for xchat-gnome on Fedora.

Better notification support


Yesterday I released a new version of my message notification extension for gnome-shell (3.2 and 3.4), to install it or to update it just visit its page on extensions.gnome.org.

The main feature in the new version is that it just handles notifications coming from well-known applications: Empathy, XChat, XChat-GNOME, Pidgin and notify-send. Handling the Empathy notifications is easy because they are well integrated with the shell, but the other notifications required some hack because all the applications handle notifications in different ways. I did my best to make the notifications as useful as possible, similar to the Empathy ones, but there are some small limitations.
Some of the handled applications require plugins to show notification bubbles:

  • Pidgin: Click on the “Tools” menu and then “Plug-ins”. Make sure that the “Libnotify Popups” plugin is enabled. If the plugin is not in the list it means you need to install it. On Debian the package is called “pidgin-libnotify”, other distros should have a package with a similar name.
  • XChat-GNOME: Click on the “Edit” menu and then “Preferences”. In the “Scripts and Plugins” tab make sure that “On-screen display” is enabled.
  • XChat: Click on the “Settings” menu and then “Preferences”. In the “Alerts” tab make sure that “Show tray baloons” is enabled for both “Private Message” and “Highlighted Message”. If the notifications pile up in the bottom right corner of your screen and clicking on them does nothing, it means that XChat is using notify-send because it cannot find libnotify. I don’t know how to fix this issue on different distros, but I found a Red Hat bug explaining the problem.

Message notification
Notifications coming from Empathy and XChat-GNOME

Is there any other common application that you would like to be handled by my plugin? The only prerequisite is that they somehow use standard notification bubbles (and this means I cannot implement it for Skype).

If you are looking for the source code, it’s in this git repository.

Updated message notifier and new cooking blog


A few months ago I wrote a gnome-shell extension that shows how many conversations with unread messages you have, so that I could stop missing incoming messages.
I updated the extension so it now works better and it can also show what the incoming notifications are when you press the icon. You can get the new version (and install it with just two clicks) from extensions.gnome.org. If you previously installed the extension from git and you don’t have an update button on that page it could mean you need to first manually remove ~/.local/share/gnome-shell/extensions/message-notifier@shell-extensions.barisione.org/ and reload the shell (ALT-F2 and then type “r”).

Message notification

Note that the extension shows the number of conversations with new messages and not the number of messages; I don’t like seeing “2” up there if somebody just wrote me “hi” and then “how are you?”.

There is still a major problem with the extension. I wanted to be able to also see if somebody pinged me on IRC (I’m a XChat-GNOME user) so I don’t limit the count to active chat conversations, but I consider all the active notifications. I find this very useful to avoid missing something, but it means that the red icon will also appear every time banshee or rhythmbox change song. Suggestions on how to solve this?

Changing completely topic, I recently moved to a new home and, having a nice new kitchen (with dishwasher), I started cooking a lot again. I decided to start a new cooking blog called gnocchialpesto.co.uk to keep track of my recipes and share them with others. If you like food, in particular Italian one, take a look at it :).

Previous Articles

Permanent IM notifications


Broken GTalk calls


Folks and QtContacts


Welcome to my blog

meI'm an Italian software engineer living in Cambridge (UK). Here I work for Collabora on open source projects like GNOME and Telepathy.
I have a skeleton in the cupboard: Opera is my favourite web browser.