bari - Marco Barisione

Markoshiki 1.1

In the last month I managed to spend some time on Markoshiki (a puzzle game I developed) to rewrite the way the user interacts with the game and to do several other user interface changes.
I think this is a very good improvement and brings the game 99% close to what I wanted to achieve.

Markoshiki with an empty board  Markoshiki with a partially filled board

Enjoy and let me know what you think about it!

Download from the App Store Download from Google Play

bari - Marco Barisione

Markoshiki

Lately, I’ve been working on a web app to learn more about JavaScript, jQuery and other technologies that web developers use. This app is available as a web app, on iPhones/iPads and on Android.

Markoshiki is a logic puzzle game, similar to Sudoku, Futoshiki, etc. The user needs to fill the numbers missing from a board, split in four quadrants, which already has some numbers in it.
The rules are simple:

  • Numbers grow in a clockwise direction following the arrows.
  • Consecutive numbers are in the same row or column as the previous number, but in different quadrants.
  • The numbers that are already in the board when you start the game cannot be modified.

Markoshiki with an empty board  Markoshiki with a partially filled board

For the next version I will focus on making the iOS and Android apps look more native, improve the flow of inserting notes (it’s a bit cumbersome now) and use better the available screen space (including support for landscape mode).

Please play online or install the apps.
If you have any feedback, please let me know at markoshiki@markoshiki.com.

bari - Marco Barisione

Bye bye Bromium, hello Undo

In March 2015, I joined Bromium to work on a very cool security product. Unfortunately, my project was put on hold and I was not really interested in the new one, so I decided to leave.

In a couple of weeks, I will start working for Undo on their reversible debugger.
Imagine how cool it is to just wait to reproduce a bug and then step backwards to see what caused it instead of spending hours in a debugger hoping for a bug to happen! And all of this without affecting performance much!

bari - Marco Barisione

Smart home?

I recently moved into a new home and I started to get it renovated. The first two steps were fixing the heating (I installed a evohome system and I’m very happy with it) and get some old roof Velux windows replaced as one wouldn’t open any more and another had some other problems.

Two of the windows are in the master bedroom close to the bed and the other one is in what will be the study, just on top of where a desk will be. Considering the unpredictable weather in England, I was worried that sudden rain would damage my bed and the stuff on the desk (probably a laptop).
Velux makes some automated roof windows, called Integra, that can close by themselves in case of rain, plus you can control them with a remote, you can set the blinds to open at a certain time of the day, etc.
The cost of the automated feature is small compared to the very expensive windows (roof windows are shockingly expensive compared to normal ones) and to the cost of replacing a laptop and mattress in case they get damaged by rain.

The windows seemed to work fine except from automated programs with a timer (for instance to wake you up by raising the blinds), but I assumed Velux could tell me how to fix this.
Today I came home from work and I discovered that all of the windows opened by themselves! And it was even raining!
Moreover, one of the windows damaged the insect net I got installed (mainly to keep my cat inside) by opening too much.
After this, one of the windows stopped responding to the remote control completely, see the picture below.

Velux Integra failure
The right window stopped working, the left one still works
(click for a bigger image)

Welcome to the glorious and shiny future of home automation!

Update: After spending some time resetting all the windows and controllers, I found out that probably the problem was due to a misbehaving remote controller that would just do things on its own (I watched while it was randomly and repeatedly clicking buttons on its own). The customer support at Velux was good and efficient and sent me a replacement controller.

bari - Marco Barisione

Bye bye Collabora

Seven years ago, immediately after finishing my master’s degree, I visited Cambridge for an “interview” with Collabora. I was hired and, shortly afterwards, I moved to Cambridge.

It has been seven great years since then, even if there were some low points, like when Nokia cancelled some of their projects.
At Collabora I had the opportunity to learn a lot of new things and to work with a lot of incredibly competent and smart people. Despite this, after all this time, I felt like I wanted some little change, but not enough to start looking for another job and risk losing all the good things I had here at Collabora.

Recently, another company got in touch with me and offered me a job. The projects they work on are very interesting and the people there seem great (and, in many ways, similar to the people at Collabora). It was a difficult decision, but I decided to accept.

Today was my last day at Collabora. Thanks to everybody that I’ve met while working there! It was great!
Next week I will start working for Bromium!

(By the way, Collabora is hiring.)

bari - Marco Barisione

WebKit on the new Raspberry Pi 2

Today the Raspberry Pi Foundation announced a new model of the Raspberry Pi!
While the new Raspberry Pi looks almost identical to the previous one, it’s much more powerful (and with four cores instead of one) and costs just $35.

Here at Collabora we have worked together with the Raspberry Pi Foundation on optimising WebKit for the first Raspberry Pi, achieving a good browsing experience (notwithstanding hardware limitations) with smooth 720 videos, good responsivity, etc.
Despite this work, a lot of web sites are just incredibly heavy and don’t run too well on the RPi1, so the extra CPU power is very useful. Just look at this video to see the difference in performances between the two Pis.

No video displayed here? Watch the video on Youtube.
Comparison between the RPi1 and RPi2 (mp4 video file)

Our optimised WebKit-based web browser (i.e. GNOME Web, AKA Epiphany) is already available in Raspbian images, so you will get this out of the box.

bari - Marco Barisione

A web browser for the Raspberry Pi

As I previously mentioned, Collabora has been working with the Raspberry Pi Foundation on various projects including a web browser optimised for the Raspberry Pi.
Since the first beta release we have made huge improvements; now the browser is more responsive, it’s faster, and videos work much better (the first beta could play 640×360 videos at 0.5fps, now we can play 25fps 1280×720 videos smoothly). Some web sites are still a bit slow (if they are heavy on the JavaScript side), but there’s not much we can do for web sites that, even on my laptop with an Intel Core i7, use 100% of one of the cores for more than ten seconds!

The browser is based on Gnome Web (Epiphany) using WebKit 1 (i.e. the non-multi-process version of WebKit).

Our main achievements are:

  • More responsive UI and scrolling, even under heavy load (like when loading a page)
  • Progressive tiled rendering for smoother scrolling (as mobile browsers do)
  • Startup is three times faster
  • Avoid useless image format conversions
  • Better YouTube support, including on-demand load of embedded YouTube videos to make page load much faster
  • Hardware decoding of videos (through gst-omx)
  • Hardware scaling of videos (again, through gst-omx)
  • Reduction of the number of memory copies to play videos
  • Faster fullscreen playback using dispmanx directly (a bit buggy at the moment, we are working on it)
  • Memory and CPU friendly tab management
  • JavaScript JIT fixes for ARMv6
  • Disk image cache (decoded images are kept in memory mapped files in a cache, saving CPU)
  • Memory pressure handler support

No video displayed here? Watch the video on Youtube.
The Raspberry Pi web browser (mp4 video file)

To install the browser, just update your Raspbian and install the “epiphany-browser” package:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install epiphany-browser

Thanks to all the people at Collabora that, at some point or another, helped on this project: Julien Isorce, Emanuele Aina, ChangSeok Oh, Tomeu Vizoso, Pekka Paalanen, André Moreira Magalhaes, Derek Foreman, Gustavo Noronha, Danilo Cesar, Emilio Pozuelo Monfort and Jonny Lamb (I hope I haven’t forgotten anybody!).
Also thanks to the Raspberry Pi Foundation, and in particular to Eben Upton, for their commitment to making browsing on the Pi better, and to Ben Avison for his work on optimising pixman and libav for ARMv6.

Update: people have reported a few bugs since the release, in particular a problem with Raspbian configured to use 24-bit or 32-bit mode for graphics. We should be able to fix this in a week or so.
Another problem is that Vimeo videos stopped working. This seems to be due to a change made by Vimeo that broke playback also on other browsers and on Android.

bari - Marco Barisione

Maynard: a Wayland desktop shell for the Raspberry Pi

In the last year or so, Collabora has been working with the Raspberry Pi Foundation on a web browser and on Wayland. See Daniel’s and Pekka’s blog posts about their Wayland work.

To make Wayland on the Raspberry Pi actually usable, we needed a shell, but lightweight desktop environments (like LXDE) don’t support Wayland and normal desktops (like Gnome and KDE) are just too heavy.
This meant we ended up writing our own shell based on Tiago Vignatti’s gtk-shell, so Maynard was born!

No video displayed here? Watch the video on Youtube.
Maynard running on my laptop (webm video file)

No video displayed here? Watch the video on Youtube.
Maynard running on a Pi (mp4 video file)

Maynard is far from complete, but it’s already starting to take shape nicely. Its goals are to be functional, light and pretty, so it will never see some of the features one might expect from Gnome or KDE for instance.

The main current limitations are:

  • No XWayland support, so non-Wayland applications cannot run (issue #1).
  • GTK applications take too long to start (issue #2).
  • Active apps are not shown in the panel (issue #3).
  • No configurability (issue #7). I hope you like the background from kdewallpapers we use as you cannot change it for now ;)

Interested in the project? Follow these links:

bari - Marco Barisione

Empathy chat accounts and GOA

Two years ago the first version of GNOME Online Accounts (GOA) was released and Empathy got the ability to use the GOA accounts that supported chat. This feature was a bit incomplete as you could configure Google and Facebook accounts in the control center (through GOA), but the other accounts could only be configured directly in Empathy. Similarly, you could use, but not modify, GOA accounts in Empathy. This problem was not fixed before as it required a lot of work, even if (from a user point of view) it was just a matter of moving some UI around.

In the last month at Collabora I worked hard on fixing this issue (and it took more than 160 patches in several components) and now you can configure every type of IM account in the control center.
All of this was done without breaking compatibility. If your program uses the Telepathy API nothing will change; if your program uses the GOA API then it will also able to handle Telepathy accounts.
This was also a good chance to fix several UI issues (mainly misaligned widgets and too much/too little spacing between widgets), see what the old UI looked like.

Adding a new account in GNOME Control Center
Adding a new account in GNOME Control Center (click for a bigger version)

Personal Details dialog
Personal Details dialog (click for a bigger version)

The task is not 100% finished yet as Empathy still opens its own accounts dialog instead of the control center and there are also a few other UI improvements to make.

Thanks to Emanuele for starting the job, Rishi and Guillaume for the help and the reviews, Allan for the designs, and Intel for sponsoring the bulk of the work.

bari - Marco Barisione

New versions of Message Notifier and Boss mode

I uploaded new versions of my two extensions (Message Notifier and Boss Mode) to extensions.gnome.org. To update, just visit the extension pages and click on the update button next to the on/off switch.

Message notification
Notifications coming from Empathy and XChat-GNOME

Sorry if it took a while, but Debian (even unstable) is still using Gnome 3.4.

bari - Marco Barisione

Orecchiette pasta with Brussels sprouts and peppers

Brussels sprouts can be very good if not overcooked and this pasta dish gets the best out of them, also thanks to the sweetness of the pepper and the saltiness of the pecorino cheese.
Orecchiette, literally “small ears”, are a type of thick small pasta that is particularly good with sauces containing strong flavoured vegetables, like Brussels sprouts and broccoli.
If you can find it, I recommend using pecorino Romano cheese in this recipe. It’s a very salty and sharp sheep cheese that is used on pasta dishes in a similar way as Parmigiano cheese. Once opened, it lasts for months in the fridge, so you don’t have to worry about wasting any if you buy it for the first time for this recipe.

Ingredients:

  • 20 Brussels sprouts
  • 1 red bell pepper
  • 2 peeled garlic gloves
  • 400g (14oz) orecchiette pasta (or other dry small pasta)
  • 120g (½ cup) single cream
  • Pecorino Romano cheese (or Parmigiano)
  • ground black pepper

Serves 3-4 as a main course, 4 as a first course .

Wash the Brussels sprouts and quarter them. Wash the bell pepper, remove the stem and seeds, and cut it in big cubes.
Heat the olive oil in a big pan (it needs to fit all the ingredients, including the cooked pasta) on medium heat with the whole garlic gloves. When hot, add the sprouts and the pepper. Fry for 4 minutes stirring often.
In the meantime, start cooking the pasta according to the instructions on the package; it should take about ten minutes, but it varies depending on the pasta brand.
While the pasta is cooking, add the cream and a few spoons of hot water from the orecchiette pan to the vegetables and cook on low heat until the vegetables are cooked but still crunchy (6 or 7 minutes). If the vegetables get dry while cooking, add some more water. If the vegetables are ready before the pasta, just turn off the heat.
Drain the cooked pasta and add it to the vegetables. Turn the heat back on and cook for a minute, adding more hot water if the pasta gets too dry. Add salt and pepper, and cook for a minute.
Serve the pasta with plenty of grated pecorino cheese on top.

bari - Marco Barisione

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.

bari - Marco Barisione

Baci di dama biscuits

A few months ago I found an old piece of paper with a recipe for baci di dama biscuits. I’m not sure who wrote it and when, but the recipe was written on the back of a 40-year-old letter, so I guess that the recipe was written in the early ’70s. I tried it and the results were delicious!

If you are wondering, a bacio di dama (lady’s kiss) is a biscuit made with two hazelnuts biscuits that are stuck together with chocolate, so that the two halves “kiss” each other. Like most Italian recipes with hazelnuts, baci di dama come from Piedmont.

If you don’t have a food processor, you can also use ground almonds instead of hazelnuts.

Ingredients:

  • 100g (⅔ cup) whole hazelnuts (or almonds if you prefer)
  • 100g (½ cup) sugar
  • 100g (3½ oz/a bit less than a stick) butter
  • 150g (1¼ cup) plain flour
  • 60g (2 oz/&frac13 chips) dark chocolate

Ingredients for 25-30 biscuits.

Put the hazelnuts and the sugar in a food processor and reduce to a fine powder.
In a bowl, mix with your fingertips the hazelnut and sugar mixture, the flour, and the butter cut into pieces. You will end up with a mixture looking like coarse breadcrumbs. Work quickly and don’t overmix or the biscuits will come out very hard.
Press the mixture to form a ball, wrap in cling film and put in the fridge for at least 30 minutes.

Preheat the oven at 160 °C/320 °F. Cover an oven tray with greaseproof paper or aluminium foil.
Make little balls (½ inch large) of dough with your hands; even if the dough looks like crumbles, it should easily stick together when you press it. Put the balls on the tray leaving some space between them.
Bake the biscuits until golden, about 30 minutes.

Melt the chocolate in a metal bowl or pot set over a bigger pot of barely simmering water, stirring occasionally, until smooth.
Put a small amount of chocolate on the flat part of a biscuit and then top with another biscuit pressing slightly. Let the biscuits rest until the chocolate is firm.

bari - Marco Barisione

Aubergine parmigiana

Aubergine parmigiana is a traditional dish from Southern Italy (it’s not clear if it’s from Naples or from Sicily), made with layers of aubergines, tomato sauce and cheese.
Traditionally the aubergines are deep fried, but I prefer a quicker (and lighter) version with oven cooked aubergines.
For this recipe you need to use real mozzarella; the one that comes shaped balls and is packed with water to keep it fresh and moist.

Ingredients:

  • 3 medium sized aubergines (eggplants)
  • 3 garlic gloves
  • 2x400g cans crushed tomatoes
  • small bunch of basil
  • 3 mozzarella balls (375g)
  • 40g grated Parmigiano cheese
  • olive oil
  • ground black pepper

Serves 4 as a main course, 6 as a second course or starter.

Heat the oven to 180 °C. Usually aubergines are not peeled, but sometimes the skin is a bit tough, so it’s your choice whether to peel them or not. Cut the aubergines lengthwise into slices ½cm thick. Put some foil on the oven tray, drizzle some olive oil on it (so the aubergines won’t stick) and place the aubergine slices on it. Probably the aubergines won’t fit in a single tray, so repeat with another tray or with the wire shelf.
Bake the aubergines for 30 to 35 minutes until soft, turning once during the cooking time.

In the meantime, heat up a couple of tablespoons of olive oil in a pan with the finely chopped garlic. When it starts sizzling, add the tomatoes, the shredded basil, some salt and some pepper. Bring back to a boil and cook uncovered (or partially covered to avoid splatters) for 25 to 30 minutes, until quite thick.

When the aubergines and the sauce are both ready, you can start assembling the dish. First of all, drain the mozzarella balls and chop them in small pieces.
Spread a couple of spoons of the sauce on the bottom of an oven safe rectangular dish (I use a 35x23cm pyrex dish).
Cover with a layer of aubergines; you should use about a third.
Spread one third of the tomato sauce on the aubergines and cover with one third of the mozzarella.
Repeat for other two layers. If you used a differently sized tray you could end up with more or fewer layers, but it doesn’t matter for the final result.
Spread the grated Parmigiano cheese on top of the dish.

You can now bake the parmigiana or keep it in the fridge until needed; it will last for a couple of days.

Bake the parmigiana in a preheated oven at 180 °C for 30 minutes. Leftovers can be reheat in the oven for 20 minutes or in a microwave until hot.

Alternative version with fried aubergines. Cut the aubergines in the same way as in the original recipe. Heat up quite a bit of frying oil (sunflower oil for instance) in a pan. When hot, fry a few aubergines at a time until golden on both sides and soft. Dry the aubergines with some paper towels to absorb the excess oil.
Make the sauce and assemble the dish as in the original version.

bari - Marco Barisione

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?

bari - Marco Barisione

Pandolce Christmas cake

Pandolce, the typical Christmas cake from Genoa, exists in two versions, short (basso) and tall (alto). The latter is made with yeast and is similar to a sweet and fruity bread. The short one, my favourite and the one described in this recipe, has a crumbly texture, similar to a scone. Both variants are very rich of pine nuts, raisins and candied orange peels.

Ingredients:

  • 70g pine nuts
  • 150g raisins
  • 150g candied orange peels
  • 300g white flour
  • 100g sugar
  • 9g (2 teaspoons) baking powder
  • 120g softened unsalted butter
  • 2 eggs

First of all, weigh the pine nuts, peels and raisins and put in a small bowl. Line a baking tray with baking paper and preheat the oven to 160 °C. You don’t want to have to do these things while your hands are covered in dough!

Mix the flour, sugar, baking powder, softened butter and eggs in a big bowl using your hands and work the mixture until the dough is smooth, but don’t overmix. Add the pine nuts, raisins and peels and mix until completely incorporated. Make a ball with the dough and then press it slightly so that the bottom and top surfaces become flat. Place the dough on the baking tray and cook in the oven until the top becomes golden brown, it takes about 1 hour and 10 minutes in my oven.

When the pandolce is cooked, it will still appear a bit soft; let it cool down completely before eating, so it can get the right texture.

Making two smaller cakes. If you prefer two smaller cakes you can proceed in the same way, but split the dough in two before shaping it. The cooking time will be 5 to 10 minutes shorter.

bari - Marco Barisione

Gorgonzola and chorizo lasagne

I really like “proper” Italian-style lasagne with layers of lasagne sheets, homemade ragù Bolognese and bechamel, but it takes quite a while to make. This lasagne dish is quite tasty and creamy without any bechamel, thanks to the gorgonzola cheese, and it’s way quicker to cook as the sauce needs to be cooked for only 25 minutes, while a proper ragù should be cooked for several hours.

Ingredients:

  • 1 big onion
  • 225g chorizo
  • 2x400g cans crushed tomatoes
  • 150g gorgonzola cheese
  • 250g fresh lasagne sheets
  • 300g grated mozzarella cheese (or a mix of mozzarella and cheddar)
  • 40g grated Parmigiano cheese

Serves 4 as a main course, 6 as a first course.

Prepare the sauce. Fry on medium-low heat the chopped onion with a couple of tablespoons of olive oil. In the meantime, cut the chorizo lengthwise and then cut it into ⅓cm slices (as thick as a £1 coin). Add the chorizo to the pan and fry for a few minutes.

Add the canned crushed tomatoes, half a can of water, some salt and some black pepper to the pan. Bring back to a boil on medium heat and cook uncovered for 25 minutes.
Taste for salt and pepper.

Add the gorgonzola to the sauce and let it melt. Stir to mix the melted gorgonzola.

Assemble the lasagne. Spread a couple of spoons of the sauce on the bottom of an oven safe rectangular dish (I use a 35x23cm pyrex dish). Cover with a layer of lasagne sheets. The sheets should cover completely the surface without overlapping; you can simply break them with your hands to get the needed size to fill all the gaps. Spread one third of the tomato sauce on the lasagne. Cover with one third of the grated mozzarella.
Repeat with more lasagne, sauce and cheese. In total you should have enough ingredients for three layers.
Spread the grated Parmigiano cheese on top of the lasagne.

You can now bake the lasagne or keep it in the fridge until needed; it will last for a couple of days. You can also freeze the lasagne until needed. In this case defrost it completely before baking.

Bake the lasagne in a preheated oven at 180 °C for 30 minutes.

If you have leftover lasagne you can just reheat it in a microwave.

bari - Marco Barisione

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.

bari - Marco Barisione

Cannoli

Cannoli (the singular is cannolo) are typical Sicilian pastries. They consist in crunchy deep fried shells filled with a creamy ricotta-based mixture, usually containing candied fruit and chocolate chips.

To make cannoli you need a few cannoli moulds; 3 is enough, but it’s easier and faster if you have at least 6. I use some cannoli moulds I ordered on amazon.co.uk.
This recipe includes gelatine because the ricotta that I can find here seems to be a bit watery even after draining it, but it’s not a traditional ingredient.

And remember, “leave the gun; take the cannoli”.

Ingredients for the shells:

  • 140g flour
  • 20g butter
  • 25g sugar
  • 50g dry white wine (or water)
  • 1 teaspoon cocoa powder
  • ½ spoon vinegar
  • 1 egg white
  • plenty of oil for frying

Ingredients for the filling:

  • 500g ricotta cheese
  • 200g sugar
  • ½ teaspoon orange blossom water (optional)
  • 125g chopped candied orange peels
  • 80g small chocolate chips
  • 2 leaves gelatine
  • 2 spoons milk

Ingredients for the decoration:

  • icing sugar for dusting
  • 10-12 candied cherries

You will need a few cannoli moulds.

Makes 10 to 12 cannoli.

Make the dough for the shells. Mix all the ingredients for the shell, except for the egg white and the oil, in a bowl until you get a uniform and smooth dough.
Make a ball with the dough, wrap in some cling film and put in the fridge for at least one hour.

Make the filling. Put the gelatine in a small bowl and cover with cold water for at least 5 minutes.
Put the ricotta in a sieve to get rid of as much water as possible. With a spoon or spatula push the ricotta through the sieve into a bowl (collecting also the ricotta that remains on the bottom of the sieve).
Mix the ricotta with the sugar and the orange blossom water until smooth.
Add the chocolate chips and candied orange peels.

Bring the milk to a boil in your smallest pan. When it starts boiling, turn off the heat and add the drained gelatine. Mix until completely melted.
Slowly pour the gelatine into the ricotta mixture and mix very well.
Put in the fridge for at least one hour.

Cook the shells. Roll the dough until thin (1 or 2mm). Using a 4 inches (10 centimetres) wide cookie cutter or large glass, cut the dough in circles. You should get between 10 and 12. If you don’t have any cookie cutter of the appropriate size, you can cut the dough in rectangles.
Press the circles a bit to enlarge them slightly and wrap around the cannoli moulds. The two opposite sides should slightly overlap. Seal the overlapping sides with the egg white.

Heat enough oil to cover the cannoli in a pan big enough to fit 2 or 3 cannoli. Deep fry 2 or 3 cannoli at a time until browned on all sides. Remove from the oil and dry on kitchen towels.
To remove the mould, let the cannoli cool down for a few minutes, then press the sides of the mould and remove.
Let all the shells cool down completely.

Fill and decorate the cannoli. Fill the cannoli pushing some ricotta mixture inside the shells from both sides with a teaspoon.
Dust the cannoli with some icing sugar. Cut the cherries in half and decorate the sides of the cannoli with them.

bari - Marco Barisione

Cabbage minestrone

Minestrone, literally “big soup” in Italian, doesn’t have a fixed recipe, but it always contains a few vegetables and some kind of beans. Other common ingredients are pasta or rice added towards the end of the cooking.
When I was a kid I really disliked minestrone, but I now really like a few variants, in particular if they contain tomatoes (not a very common ingredient for minestrone) and no rice.

Being a quite thick and rich soup you can serve it as a main course on its own or, in smaller quantities, before another main course.

Ingredients:

  • Olive oil
  • 1 big onion
  • 1 rib of celery
  • ¼ cabbage
  • 100g kale or cavolo nero
  • 100g unsmoked bacon (optional)
  • 400g canned crushed tomatoes
  • 400g canned borlotti beans (or any other type)
  • 1l chicken broth (or water)
  • piece of Parmigiano cheese crust
  • 180g chifferi rigati, ditalini or other small pasta shapes
  • 1 teaspoon thyme
  • 1 teaspoon majoram
  • 2 bay leaves
  • black pepper
  • 1 pinch of sugar
  • grated Parmigiano cheese

Serves 4 to 6 people.

Add to a big pot a couple of tablespoons of olive oil, the diced onion and the diced celery. Fry on low heat until translucent but not browned.

In the meantime, if you are using the bacon, chop it very finely so that it can almost melt into the soup; you could use an electric chopper if you have one. Add the bacon to the onion and celery, and cook for a few minutes.

Clean the cabbage and chop it in big pieces.
Add the cabbage, crushed tomatoes, the drained beans, the broth, the spices, the sugar and a couple of big pinches of salt.
If you have some Parmigiano cheese, cut a big piece of crust from it and add it to the soup; it will add an amazing flavour.
Let the soup simmer 45 minutes, adding water if it gets too thick.

Add the washed and chopped kale to the soup and cook for about 10 minutes.

Taste and add salt if needed. The soup should be quite thick, but still a soup, so add water if needed.
Add the pasta and cook until tender.

Remove the crust of Parmigiano from the soup and throw it away (or better, eat it!).

Serve in bowls. Drizzle with a bit of olive oil and dust with some grated Parmigiano cheese.

How to freeze

Minestrone freezes really well, in particular without the pasta.
If you are planning on freezing the minestrone, keep it a bit thicker. When the kale is cooked, remove the pot from the heat and let it cool down. Split the minestrone in portions and freeze it in individual containers.

When you want to eat the minestrone, put the thawed soup in a pan with a bit of water and bring to a boil. When it’s boiling, add the pasta and cook until tender.

bari - Marco Barisione

Cold cherry soup

Hideg meggyleves (cold cherry soup) is an unusual, but very good, Hungarian soup; despite containing cherries and sugar, it’s normally eaten as a proper soup and not as a dessert.
Usually the soup is prepared with sour cherries, but fresh ones are not easy to find in England, so you can just use normal cherries (that are also quite cheap at this time of the year).
If you prefer, you can use fresh, frozen or canned sour cherries, but check they don’t contain extra sugar. If using sour cherries you should use 150g of sugar.

Ingredients:

  • 800g cherries (that’s about 650g pitted cherries)
  • 100g sugar
  • 2 cinnamon sticks
  • 20g corn flour (or 30g normal flour)
  • 300ml sour cream

Serves 6 people.

Wash the cherries and pit them. Put the pitted cherries in a pot with 1.4 litres of cold water, the sugar, the cinnamon and a pinch of salt.
Bring to a boil, reduce heat to medium-low and simmer for about 15 minutes, until the cherries are soft but not falling apart. Remove the cinnamon sticks.

In a small bowl, whisk together the flour with a few spoons of hot soup. When mixed, add the sour cream and a few more spoons of soup and mix.
Add the sour cream mixture into the soup and mix well. Simmer for other 5 minutes stirring frequently.

Cover the soup and let it cool down a bit. When warm, put in the fridge until cold and thick (it will take at least a couple of hours).

bari - Marco Barisione

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).

bari - Marco Barisione

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.

bari - Marco Barisione

Strawberry tiramisù

This is an interesting (and delicious) variation of the normal tiramiù, with coffee replaced by strawberry puree. The recipe for the mascarpone mixture, unlike most British and American ones, doesn’t use whipped cream, producing a much better final result. Note that tiramisù contains raw eggs, so you should use very fresh eggs.

Ingredients:

  • 800g strawberries
  • 140g sugar
  • ½ lemon
  • 4 eggs
  • 500g mascarpone
  • 300g savoiardi biscuits (or ladyfingers)

Serves 8 to 10 people.

Quickly wash 500g of strawberries under running cold water and hull them. Cut the strawberries in half and put in a bowl with 60g of sugar and the lemon juice. If you have time, set aside the strawberries for about one hour.
Put the strawberries and the juice they released in a blender and blend until you get a liquid puree. If you don’t like the tiny strawberry seeds, you can strain the puree through a fine sieve.

Whisk the yolks with the remaining sugar until the mixture is fluffy. Add the mascarpone and mix well. In another bowl, whip the egg whites until stiff peaks form. Delicately fold the whipped whites in the mascarpone mixture.

For normal tiramisù I prefer whole savoiardi biscuits, but, in this case, they don’t soak the puree as well as coffee, so I prefer to cut them in half lengthwise. If you are in a hurry, you can skip this step.
Soak a few savoiardi at a time in the strawberry puree and arrange them in a serving dish (I usually use a 35×23 cm Pyrex dish). You should use about half of your biscuits for the first layer. Spread half of the mascarpone mixture over the savodiardi. Repeat with another layer of soaked biscuits and one of mascarpone mixture.

Wash and hull the remaining strawberries. Cut the strawberries lengthwise and decorate the tiramisù with them.
Refrigerate for at least 8 hours before serving.

bari - Marco Barisione

Hazelnuts and cheese risotto with port wine reduction

I got inspired for this risotto recipe, one of my favourites, by a restaurant in Vercelli.
In Italy I would use a toma cheese from Piedmont to prepare this recipe, but this kind of cheese is difficult to find here. After a few experiments I found out that Ossau-Iraty is quite similar to toma cheeses, but I also add some creamy Gorgonzola to add a bit more flavour and creaminess. It’s important that you get the creamy version of Gorgonzola (like the one in the picture below) because the stronger version would cover the flavour of the Ossau-Iraty. Alternatively, you can replace the gorgonzola with Galbani Dolcelatte (it’s similar in flavour, very easy to find and cheaper too).

Ingredients:

  • 50g hazelnuts (possibly already toasted and chopped)
  • 0.8 liter vegetable broth
  • 2 tablespoon extra virgin olive oil (or 1 knob of butter)
  • 1 medium onion or 2 shallots
  • 320g risotto rice (Carnaroli, Vialone Nano or Arborio)
  • 1 small glass of white wine
  • 180g Ossau-Iraty cheese
  • 75g creamy gorgonzola
  • 30g butter
  • 50g grated Parmigiano Reggiano
  • ground black pepper
  • salt

Ingredients for the port reduction:

  • 240g port wine
  • ¼ teaspoon cinnamon powder

Serves 4 as a main course, 6 as a first course.

First of all, read the recipe for basic risotto for hints about making risotto.

If you are using non-toasted hazelnuts, preheat your oven to 180 °C. Place the hazelnuts in a baking pan and put in the oven for about 10 minutes. Let the hazelnuts cool down enough to be handled easily. Get a few hazelnuts in your hands and rub them to remove the skins (don’t worry if some skins don’t come off).
Chop the hazelnuts into small pieces.

Heat up the broth in a pan, or prepare one if you are using fresh ingredients.
Finely chop the onion or shallots and fry on low heat in a pan with a knob of butter or with the olive oil. When the onion starts getting slightly translucent, but it’s not browned, add the rice. Turn up the heat to medium-low and fry the rice for 2 minutes stirring often.
Add the wine and stir. It should evaporate quickly.

When the wine is evaporated, add a ladle of broth. Add some salt and ground black pepper. Whenever the liquid in the pan is absorbed, add another ladle of broth. If you run out of broth before the rice is ready, you should start adding boiling water.

While the rice is cooking dice the Ossau-Iraty in small pieces and the Gorgonzola in big chunks.
Prepare the port reduction by putting the port in a small pan with the cinnamon. Bring to a boil and let simmer until reduced to about half.

The rice needs to be cooked al dente; it’s ready when it’s not hard any more but it is still firm inside. It will take about 15 minutes, but it depends on the rice you are using.
Check for seasoning and add more salt and black pepper if needed.

Turn off the heat. Add the butter and the three cheeses, and stir well. Cover the pan and allow to sit for 2 or 3 minutes.
Stir again and transfer to serving plates. Pour the port reduction on the risotto and sprinkle it with the chopped hazelnuts.

bari - Marco Barisione

Basic risotto

Risotto has always been one of my favourite dishes, also because I come from Vercelli, a small city that produces and exports a lot of rice. Making risotto is not difficult as long as you use the right rice, you cook it correctly (it’s not just boiled rice with a sauce added at the end) and, when it’s cooked, you let it sit with butter and cheese for a few minutes to make it creamy. This recipe is just a basic risotto to show you how to make a good risotto, so it’s not particularly tasty without other ingredients.

There are a lot of varieties of rice and the one for risotto needs to be rich of starch to produce a creamy result, but it should not fall apart while cooking. The most commonly used types of rice are Arborio, Carnaroli (in the picture above) and Vialone Nano. I prefer Carnaroli as it’s very rich of starch but remains firm after cooking, even if you accidentally overcook it a little bit. Vialone Nano is a very good risotto rice that absorbs the condiment well, but it doesn’t stay as firm as Carnaroli. Arborio is the most common rice for risotto, probably because it’s also the cheapest one, but it’s not as good as the others.
The brand of rice I usually buy in England is Riso Gallo Carnaroli. Despite being far from the best rice I ever tried, it’s the best that can be easily found here, but it’s twice as expensive as some Arborio rice brands.

Ingredients:

  • 0.8 liter broth (vegetable or chicken)
  • 2 tablespoon extra virgin olive oil (or 1 knob of butter)
  • 1 medium onion or 2 shallots
  • 320g risotto rice (Carnaroli, Vialone Nano or Arborio)
  • 1 small glass of white wine
  • 50g butter
  • 100g grated Parmigiano Reggiano
  • ground black pepper
  • salt

Serves 4 as a main course, 6 as a first course.

Heat up the broth in a pan, or prepare one if you are using fresh ingredients. A good broth is important for a basic recipe like this one, but for other recipes I usually just add some stock cubes to the rice and then add water from a kettle instead of adding the broth.

Choose a pan that would be large enough to fit the uncooked rice in a layer of 1 or 2 centimeters. Finely chop the onion or shallots and fry on low heat in the pan with a knob of butter or with the olive oil.
When the onion starts getting slightly translucent, but it’s not browned, add the rice. Turn up the heat to medium-low and fry the rice for 2 minutes stirring often. This step is needed to toast the rice so it will remain firmer when cooked.
Add the wine and stir. It should evaporate quickly.

When the wine is evaporated, add a ladle of broth. If you are as lazy as me and you are using a stock cube and water, you should add the crumbled stock cube now. Add some salt and ground black pepper.
Let the risotto absorb the water, when it’s almost completely absorbed add another ladle of broth. Keep adding broth when needed until the rice is cooked. If you run out of broth before the rice is ready, you should start adding boiling water.
The rice needs to be cooked al dente; it’s ready when it’s not hard any more but it is still firm inside. It will take about 15 or 16 minutes since you added the fist ladle of broth if you are using Carnaroli. The cooking time for Arborio is 13 or 14 minutes, and for Vialone Nano it’s 12 or 13 minutes.
Check for seasoning and add more salt and black pepper if needed.

Turn off the heat. Add the butter and Parmigiano cheese, and stir. Cover the pan and allow to sit for 2 or 3 minutes. This step, called mantecatura, is what makes good risottos so creamy.
Stir again and serve.

bari - Marco Barisione

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.

bari - Marco Barisione

Nuovo blog in inglese

Più di quattro anni fa mi sono trasferito in Inghilterra per lavoro. All’inizio ho provato a continuare ad aggiornare questo blog, ma alla fine mi sono arreso. Qui mi capita spesso di cucinare ricette con ingredienti difficili da trovare in Italia e, vice versa, non riesco a trovare alcuni ingredienti italiani, quindi mi era passato la voglia di bloggare in italiano. Alla fine mi sono arreso all’evidenza: difficilmente aggiornerò ancora questo blog, ma lo terrò vivo visto che ricevo ancora parecchie visite, in particolare per le ricette della tarte tatin e della torta ricotta e pere.
Nel frattempo ho creato un nuovo blog di ricette, questa volta in inglese, chiamato gnocchialpesto.co.uk. Su questo blog posterò varie ricette, soprattutto italiane, che possono essere preparate con ingredienti che si trovano facilmente in Inghilterra. Se capite l’inglese seguitemi sul mio nuovo blog! :)

bari - Marco Barisione

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 :).

bari - Marco Barisione

Bonet

Bonet, pronounced like if it were written as “boonet”, is a typical dessert from Piedmont with amaretti biscuits and cocoa.

There are two types of amaretti, soft and hard. For this recipe we need the hard and crunchy ones. They can easily be found in all the major UK supermarkets, the most common brand is shown in the picture below.

I prefer cooking bonets in savarin moulds (circular and with a hole in the middle). You can also use loaf tins or, if you prefer single portions, ramekins.

Ingredients for the caramel:

  • 80g white sugar

Ingredients:

  • 6 whole medium eggs
  • 150g sugar
  • 60g unsweetened cocoa powder
  • 200g hard amaretti biscuits
  • 300g double cream (or replace with milk)
  • 450g semi-skimmed or whole milk
  • 1 small cup of espresso coffee or 3 teaspoons of instant coffee (optional)
  • 50g amaretto liqueur (optional)

Serves 8 to 10 people.

Prepare the caramel. Making caramel is easier than most people think, but you need to pay attention because it’s very hot and it gets solid really quickly when the temperature decreases.

Place the sugar in a pan with a thick bottom. The right size for the pan should allow the sugar to cover the bottom completely but the sugar layer should not be thicker than half a centimeter. Turn on the heat and leave on medium-low until the sugar starts to get liquid. Never stir while making caramel!
When the caramel starts getting liquid and bubbling on the sides, turn down the heat. Let cook undisturbed until the caramel is completely liquid and brown, the right colour is the one in the picture below. If most of the sugar seems to have turned into caramel but a few chunks are still hard and white, you can use the tip of a knife to break them.
When the caramel is ready, pour it quickly in the bonet mould. Pay attention because the mould will get hot quickly.

Prepare the bonet. Whisk together 3 eggs, the sugar and the cocoa powder. When mixed well, add the other eggs and mix again. I prepare the mixture starting with 3 eggs so that you can easily mix the ingredients without ending up with lumps of cocoa and without over-whisking. It’s important to avoid over-whisking; too much air ruins the texture of the bonet, so you should also avoid using an electric whisk.

Grind the amaretti biscuits until you get a fine powder. Add to the egg mixture the amaretti powder, the coffee, the amaretto liqueur, the cream and the milk, and mix. Pour the mixture into the mould or ramekins.

Put the mould or ramekins in a bigger ovenproof pan (a roasting pan for instance). Add room temperature water to the pan until it reaches two thirds of the height of the bonet mould.
Place the pan in a preheated oven at 180 °C. Cook the bonet for 60 minutes if you are using a big mould or loaf tin. If the shape of the mould you used makes the mixture very thick you will need to cook the bonet 10 more minutes. If you are using ramekins it will take just 45 minutes.
When the dessert is cooked, remove the pan from the oven and leave the mould in the water until it reaches room temperature.

Refrigerate for at least 8 hours, but it’s much better if you prepare the bonet a couple of days in advance. When it’s time to serve, pass a knife around the mould, put a plate upside down on top of the mould, keep the two together with your hands and turn them upside down quickly. Pour the caramel remaining in the mould on top of the bonet. You can decorate with whole or crushed amaretti. Making caramel is easier than most people think, but you need to pay attention because it’s very hot and it gets solid really quickly when the temperature decreases.

Place the sugar in a pan with a thick bottom. The right size for the pan should allow the sugar to cover the bottom completely but the sugar layer should not be thicker than half a centimeter. Turn on the heat and leave on medium-low until the sugar starts to get liquid. Never stir while making caramel!
When the caramel starts getting liquid and bubbling on the sides, turn down the heat. Let cook undisturbed until the caramel is completely liquid and brown, the right colour is the one in the picture below. If most of the sugar seems to have turned into caramel but a few chunks are still hard and white, you can use the tip of a knife to break them.
When the caramel is ready, pour it quickly in the bonet mould. Pay attention because the mould will get hot quickly.

bari - Marco Barisione

Vitello tonnato

Vitello tonnato, literally “tunnied veal”, is a typical summer dish from Piedmont (the region where Turin is) that is usually eaten as a second course or as a starter. The typical version of this dish is composed by thin slices of veal covered with a tuna-based creamy sauce. Considering that veal is expensive and difficult to find, I prefer to use pork fillet as it produces a very similar result for a fraction of the cost (and it’s also much quicker to cook).
This dish must be prepared at least one day in advance because the flavours need time to blend together.

Ingredients for the meat:

  • 1 pork fillet (the weight is usually between 400 and 500g)
  • 1 carrot
  • 1 onion
  • 3 cloves
  • 1 rib of celery
  • 2 bay leaves

Ingredients for the sauce:

  • 3 whole eggs
  • 50g of (possibly stale) white bread (that’s one thick slice)
  • 3 tablespoons of vinegar
  • 2 tablespoons of capers
  • 150g drained canned tuna
  • 5 anchovy fillets
  • Worcestershire sauce (optional)
  • ground black pepper
  • salt

Serves 6 as a starter, 4 as a second course.

Peel and quarter the onion. Clean both the carrot and the celery, and chop them in a few big pieces.
Put all the ingredients for cooking the meat, except for the meat itself, in a pan with enough water to cover the pork. Bring the water to a boil and let it simmer for 15 minutes. Add the pork fillet to the boiling water and let it simmer for 20 minutes. It’s important that the water is just simmering or the pork will get tough.

After 20 minutes remove from the heat and let the pork cool down inside the broth. It should take at least one hour.

While the meat is cooling, you can start preparing the sauce. Place the whole eggs in a small pan, cover with room temperature or cold water and bring to a boil. When the water starts boiling cook the eggs for about 8 minutes. Cool down under running cold water and peel them.

If the capers are preserved under salt rinse them to remove it. Do the same with the anchovies if they are preserved under salt.

Break the bread into a few pieces and put it in a bowl together with the vinegar. After a few minutes place the bread, the roughly chopped eggs, the capers, the drained tuna, the anchovies, a few drops of Worcestershire sauce and some ground black pepper in a blender. Add about 100g of the broth where the meat was cooked.
Blend the mixture until smooth. The end result should be a smooth and creamy sauce that is more liquid than mayonnaise, but not too runny. The sauce will probably be still too thick at this stage, so add more broth until you get the expected result. Season with salt and black pepper to taste.

Remove the pork fillet from the broth and pat it dry with some kitchen towels. Slice the pork fillet thinly and place in a big enough plate so that the slices cover the plate completely but overlapping as little as possible. Cover the meat uniformly with the sauce. If you want, you can decorate the dish with capers and lemon slices.

Refrigerate for at least one day before serving.

bari - Marco Barisione

Pasta alla carbonara

Let’s start this blog with a dish that, despite being simple, is rarely good outside Italy. Pasta alla carbonara should be creamy, but the creaminess should be achieved without using any cream, and should not contain any extraneous vegetables (no garlic and no onions) or meat (no chicken please!), just some form of bacon.
The most traditional bacon to use is guanciale (made from pig’s cheeks), but it’s difficult to find. Unsmoked pancetta cubes, usually sold in double packs like in the picture below, are the best choice and are available from most grocery stores. If you cannot find pancetta, you can use unsmoked lardons, but they are usually bigger so they need to be chopped in smaller cubes.

Ingredients:

  • 250g spaghetti
  • 130g unsmoked pancetta cubes (or lardons)
  • 3 yolks and 1 whole egg
  • 15g parmigiano reggiano (grated)
  • 15g pecorino romano (grated, you can replace with parmigiano)
  • salt
  • ground black pepper

Serves 2 as a main course, 3 as a first course.

Cook the pasta in salted boiling water according to the instructions on the packet (the cheese and pancetta are salty, so don’t add too much salt in the water).

While the pasta is cooking, add the pancetta to a small frying pan and cook on medium-low heat for a few minutes, until it’s lightly golden. When done, remove from the heat and set aside.

Meanwhile, add the yolks, the whole egg, the cheeses and some black pepper to a bowl or deep dish. You can just use more parmigiano if you don’t have pecorino. Mix the egg mixture with a fork.

When the pasta is cooked, drain it and put it back in the pan (but not on the hob), add the egg mixture and mix quickly. The residual heat in the pasta and pan will cook the egg; by mixing quickly you will prevent the eggs from forming overcooked lumps. Add the pancetta, including the fat remaining in the pan, and mix again. Serve with some more black pepper on top.

bari - Marco Barisione

Permanent IM notifications

Update: the extension is now available on extensions.gnome.org.

Gnome 3 and the shell look really great, but there are a few things that annoy me. My main complaint is that I keep missing IM messages because there is no visual clue that you got a message (unless you are staring at the bottom of your screen exactly when you receive something).
This problem will probably be fixed in the next version of Gnome, see bug #641723, but I wanted something now. That’s why I wrote a simple extension that just displays the number of conversations with unread messages. To install it, just clone the git repository and execute “make install”.

Spot the difference
Spot the difference

The extension is unpolished, it does very little, the code is horrible and I didn’t pay any attention to usability; I just wanted a quick fix while waiting for upstream to fix the bug properly. Nevertheless, I hope this code will be useful for other people too!

bari - Marco Barisione

Broken GTalk calls

Recently Google updated their XMPP servers to use standard Jingle for audio and video calls; see the “Google: The Future is Jingle” post on xmpp.org for some more details.
This would be good news for us, except that, by doing so, they broke calls in telepathy-gabble (so in Empathy, the N900 and MeeGo) in multiple ways.

Luckily GTalk developers were really cooperative and they agreed on fixing their servers and Will and Olivier already fixed Gabble too. The new version of Gabble (0.12.2 for the stable branch and 0.13.1 for the development one) should make calls work again on the desktop, MeeGo and on Harmattan (i.e. the N9 and N950) too.
For the N900 we don’t have any way to release updates, but Google will push an update to their servers (in the next week or two hopefully) with a N900-specific workaround.

Sadly video calls on the N900 will keep not working; the version of gst-dsp on the N900 doesn’t properly handle changes in the parameters of the stream :(.

Update: just to be clear, this affects only calls from GTalk to gabble. Calls in the other direction still work and calls between two devices of Gabble work too.

bari - Marco Barisione

Folks and QtContacts

At the moment I’m at the MeeGo conference in Dublin, finally finding a bit of time to blog on what I have been working on for the past 2 weeks. The conference is really well organised and the location is a bit unusual but awesome. For me, the best thing about this conference seems to be the possibility of meeting so many people that I know because of GNOME, Collabora and Maemo/MeeGo. Considering that Collabora is now employing several KDE people, this conference is also a good way to meet more KDE developers while awaiting for the Desktop Summit in Berlin.


The Aviva stadium

Nowadays, Empathy uses libfolks to access contacts and to merge multiple contacts (called personas in Folks) into a single “meta-contact” (called individual).
On MeeGo, on the other hand, it seems that QtContacts (part of QtMobility) is the future. QtContacts is just an API and relies on backends for the actual access to contacts, so why not trying to have QtContacts using libfolks? In the last weeks I worked a bit on writing a QtFolks backed for QtContacts and a small demo written in QML to show what the backend can do.

The demo showing some of my XMPP contacts
The demo showing some of my XMPP contacts

Folks doesn’t just want to be a library for IM contacts, but a generic library to access all of your contacts. The next logical step was to add extra backends to access more sources of contacts.
If you use the Facebook XMPP server, you can already have access to Facebook friends and chat with them, but you don’t get all the information that are available through the web API. This is why I modified the Facebook libsocialweb plugin to also access Facebook contacts and added new interfaces to libfolks to expose this information. Moreover, we can rely of the Facebook ID to automatically merge the persona from the Facebook XMPP and the one from the Facebook web API into a single individual.

A contact with multiple IM addresses and information coming from Facebook too
A contact with multiple IM addresses and information coming from Facebook too

guido - Guido Vicino

Anche io sarei potuto diventare un pirata

“..ci sono pirati che violentano le ragazzine. Ci sono ricchi mercanti che vendono armi alle nazioni in cui i bambini non hanno cibo da mangiare. Ci sono proprietari che impiegano bambini come manodopera[..].Quando stiamo in piedi davanti alla montagna,subito prima di Toccare la Terra capiamo di essere non solo bodhisattva ma anche le vittime stesse dell’oppressione e dell’ingiustizia. Noi siamo il pirata che sta per violentare la ragazzina e siamo la ragazzina che sta per essere violentata dal pirata. La famiglia in cui viveva quel pirata viveva nella miseria più nera, suo padre era un pescatore che conosceva un solo mezzo per dimenticare i suoi problemi,la bottiglia;un uomo che non sapeva educare il figlio e lo picchiava spesso.Alla morte del padre poi,aveva continuato il mestiere suo;non aveva rìisorse per comprendere o amare. Il giovane aveva ceduto alla tentazione di diventare un pirata. In mare aperto non c’era la polizia,quindi perchè non seguire l’esempio dei suoi compagni e violentare quella ragazzina,sulla barca che aveva assalito?
Se avessimo avuto un fucile avremmo potuto sparare al giovane e lui sarebbe morto,ma non sarebbe stato meglio insegnargli a comprendere ed amare? Dov’erano i politici,gli educatori che dovevano aiutarlo? Se i bambini non verranno seguiti ed educati adeguatamente,alcuni di loro diverranno pirati. Se io stesso fossi nato in una famiglia povera,se non avessi mai ricevuto un’istruzione,se avessi avuto genitori così anch’io sarei potuto diventare un pirata.”
Thich Nhat Hanh – Il segreto della pace

bari - Marco Barisione

Feature complete custom ringtones

I finally released a version of “Custom ringtones for your contacts” that implements every basic feature I wanted to have for a first stable version, so I think it deserves being called 1.0 :).
Apart from some bug fixes, this new version is translatable and allow you to set a ringtone for callers with a hidden phone number and for contacts not in your address book. The new settings are available from the address book settings dialog.

The settings dialog with the extra ringtone buttons
The settings dialog with the extra ringtone buttons

For now there is only an Italian translation, but any help to get more is appreciated. Don’t worry, there are just 8 strings to translate!
To propose a new translation just go to the Transifex component page, download the .pot source file, add the translations to it, login to Transifex, and upload the file by pressing “Add a new translation” and setting as target file “po/XX.po” (where “XX” it the language code, for instance “fi” for Finnish, “de” for German, etc.). If you don’t know how to use gettext translation files I suggest using Poedit or gtranslator.

The custom ringtones application is now available both from extras-testing and from my personal repository:

Install per-contact-ringtones
Install from my personal repository
(follow the link on the N900 browser)

Update: I released version 1.0.1 containing some new translations: German (by NightShift79), French (by Alban Crequy), Brazilian Portuguese (by Humberto Sgrott Reis) and Swedish (by Andreas Henriksson). I will add more when I receive more.

Update 2: I released version 1.0.2 containing a crasher fix and some new translations: Albanian (by Ilir Gjika), Dutch (by Daniel Holsboer) and Spanish (by Fernando Borrego Polo).

Update 3: I released version 1.0.3 containing some new translations: Russian (by Misha Ketslah), Norwegian (by Stian Husemoen), Korean (by KwangHee Cho), Czech (by Pavel Fric), Hungrarian (by Balázs Bárány) and Romanian (by Bogdan Vernescu).

guido - Guido Vicino

Morte di un Cool-er Ereader

COOL-ER ereader

Qualche giorno fa si è rotto il mio primo lettore di EBook dopo circa due mesi scarsi di vita. Il lettore in questione era un COOL-ER Ereader. Lo schermo a tecnologia E-ink si è dimostrato non all’altezza di un pendolarismo selvaggio tipico della mia attività… I pregi e difetti del defunto sono erano i seguenti:

Pro:

  • Economico (269 €).
  • Ottima leggibilità.
  • Supportava molti formati elettronici (in due mesi ho letto 2 PDF ed 1 Epub.

Contro:

  • Fragilissimo e fatto della stessa plastica dell’ovetto Kinder
    (si è rotto tenendo nella borsa porta computer interna tra una cartellina e dei fogli).
  • La ditta che lo produceva è andata in liquidazione.
  • L’attacco per le cuffie non è quello standard (anche se dentro ne trovate un paio.

Il mio problema attuale è se vale la pena comprarne un altro o meno (ovviamente di un’altra marca). Cosa fare?

bari - Marco Barisione

Ringtoned 0.2.4 (now with vibration!)

I just released ringtoned 0.2.4 with a fix to make the N900 able to vibrate again when a call is received.
Ringtoned (displayed in the application manager as “Custom ringtones for your contacts”) is available from extras-devel (that contains a lot of other unstable software!) or from my personal repository:

Install per-contact-ringtones
Install from my personal repository
(follow the link on the N900 browser)

This release fixes the last major reproducible bugs, but I’m sure there are more. If you find any please report them in the bugzilla explaining clearly what you are doing, what you would expect to happen and what happens instead. A log attached to the bugzilla entry is very useful to understand what is going on, and can be easily created by opening a terminal and giving this command:

ringtonedctl -d stop startwait > /home/user/MyDocs/ringtoned.log 2>&1

Then attach the ringtoned.log file that is in your documents directory to the bug report.

bari - Marco Barisione

Ringtoned 0.2.1

The Fremantle daemon that decodes ringtones seems to have a bug that, in some cases, makes it produce wave files with an invalid size in them. These files cannot be played by libcanberra, so it meant that some ringtones couldn’t be played when you receive a phone call. I just released ringtoned 0.2.1 with a work around for the bug, please let me know if this version works better for you.

Anyway, I got a new component in the Meamo Bugzilla for ringtoned, so please report bugs there.

Update 2: I released ringtoned 0.2.2 that just adds some more debugging info to make my life easier.

bari - Marco Barisione

Faster custom ringtones

Several people complained that my custom ringtones application is too slow when receiving calls, so I started analysing what ringtoned does when a new call is received. The three main operations in this case are creating the object that represents a call after retrieving all the needed information (caller ID, etc.) from Telepathy, looking up the contact that matches the caller and playing the ringtone.
The Telepathy bit just needed to be slightly smarter, but was already quite fast. The contact look up was already very fast, unless you have so many contacts to make your address book unusable.
The code that needed more optimisation was the one that plays ringtones. It turned out that using GStreamer with playbin2 (the element able to detect and play all the supported file types) is not fast enough for this use case. I tried different approaches and in the end I decided to always use uncompressed wave files and stream them directly to PulseAudio.[1]
Note that GStreamer is not the best solution just in this very specific case, for all the other use cases GStreamer is still the best solution.

After these changes I was really expecting to get very good performances, but it was still quite slow. My analysis was showing that, since when ringtoned gets notified from Telepathy of the existence of a new call to when it starts streaming to PulseAudio, less than 0.1 seconds passes, so why was it still slow?
At this point I tried using bustle to generate graphs of the D-Bus activity when a call is received. The graphs showed that the delay was not ringtoned’s fault, but a bug in Maemo causing a freeze that made the dispatching of new calls about 4 seconds slower when ringtoned was running. Somebody is now working on the bug and trying to figure out why it’s happening, in the meantime I’m working around it watching for new calls in a different way.[2]

Ringtoned and the related packages are available in Maemo extras-devel under the name “Custom ringtones for your contacts”. If you don’t want to add the extras-devel repository (as it contains a lot of unstable software, you have been warned!), you can download ringtoned directly from my personal repository:

Install per-contact-ringtones
Install from my personal repository
(follow the link on the N900 browser)

The only known big problem left is that ringtoned breaks vibration, I will fix it in the next days/week.

Update: It looks like MyContacts is incompatible with ringtoned, so you cannot use these two programs together.

[1] The file is uncompressed in background, so you can still use any type of file for ringtones. Just notice that, when you update from a previous version, the first time you receive a call from a contact that already had a custom ringtone you will get the default ringtone and not the custom one as previous versions were not generating the uncompressed file.
[2] For people interested in Telepathy: the freeze happens if there is an observer running, even if at that point the dispatching to observers didn’t start yet! The (ugly, but effective) solution was to just listens to the NewChannels signal directly. When the Maemo bug will be fixed I will revert my code to use an observer.

bari - Marco Barisione

Disappearing plugins

If you have any application that adds buttons to the address book (like the contacts merger), you could have noticed that the buttons recently disappeared. This happened because of a bug in Monorail, the IM file transfer application.
Alban already fixed this bug and uploaded a new version to extras-devel. This new version also fixes other bugs, including a crash caused by the sharing plugin in Conboy.

Update: Note that you need to reboot or kill osso-addressbook after updating monorail to see the plugins again.

bari - Marco Barisione

Custom ringtones for your contacts

Yesterday I finished implementing the first release of a new program (ringtoned, i.e. ringtone daemon, i.e. I don’t have any imagination for program names) that allows setting a custom ringtone for specific contacts. Ringtoned tries to integrate nicely with the system:

  • You can select the default ringtone in Settings → Profiles as usual
  • To set a custom ringtone you go to the Contacts application, select the contact and press the new “Set custom ringtone” button in the menu
  • The dialog to set custom ringtones tries to be a perfect copy of the dialog to set the global ringtone
  • It works both for normal phone calls and GTalk/SIP/Skype calls, thanks to Telepathy
  • The ringtone is played only when the normal one would be played and at the same volume, thanks to some PulseAudio magic

Ringtoned also tries not to break your phone, if for any reasons it crashes the default behaviour should be restored. Nevertheless, this is just version 0.1, so it could be full of bugs and could make you miss phone calls. You have been warned! Moreover, replacing the default ringtone components with something more complex could make the ringtone start slightly later in case of heavy load, see my previous blog post. You have been warned again!

If you still want to give it a try, ringtoned is now in Maemo extras-devel under the name “Custom ringtones for your contacts”. If you don’t want to add the extras-devel repository (as it contains a lot of unstable software), you can download ringtoned directly from my personal repository:

Install per-contact-ringtones
Install from my personal repository
(follow the link on the N900 browser)

If you are interested in the source code, it’s in Collabora’s git repositories.

The are two major features that are missing at the moment: the ability to set a custom ringtone for anonymous phone calls and for calls from an unknown number, and the ability to set ringtones for groups and not only for single contacts. The former feature should be easy and it mainly just requires some UI, so it will be hopefully implemented shortly.
Groups are more difficult to implement because they are not supported at all by the Maemo address book; I would first have to implement support for groups and then add ringtones for the groups. I hope to be able to find time for this, but I cannot guarantee anything.

In a future post I will explain the architecture of ringtoned and how to extend it: the code that chooses the custom ringtone is actually just a small plugin of the ringtone daemon and it’s possible to write other similar plugins for different needs.

bari - Marco Barisione

How hard can it be? (Or why you don’t have custom per contact ringtones on Maemo)

Often in blogs, forums or IRC you can find people complaining of missing features in some programs (and some of them are very rude). While they can be right sometimes, other times they just make me angry because they don’t know how difficult writing software can be, and they don’t understand the difference between a semi-working prototype and a proper stable application written by professional developers, designed by professional UI designers and tested by professional testers.

Implementing some features can actually be quite difficult and it could be better to skip those from your product and focus on other things; on the N900 one of these missing features is the ability to set customised ringtones for specific contacts.
Several people wondered how hard it can be, after all a lot of old phones do it. What they don’t consider is that, in many ways, the N900 is not a traditional phone and is more similar to a small computer. On the other hand, the N900 still needs to be reliable to be certified as a phone; for ringtones this means that the ringtone should be played as soon as the phone call is received, or the user could miss it.
Now suppose your N900 is under heavy load due to multitasking (real multitasking, like on a normal computer) and you receive a phone call from a friend; being a close friend that often calls you, you have an MP3 ringtone set just for him. The phone has to look up for the contact corresponding to the phone number, load the file from the (slow) memory card, load the libraries for playing the ringtone, uncompress the file, and finally play it. All of this on a phone under heavy load with most programs swapped out of memory!
To workaround this problem the N900 seems to do some tricks: the ringtone is uncompressed into a (big) WAV file and saved on the faster (but small) internal memory, and the component playing the ringtone is memlocked (i.e. never removed from memory). Of course, you cannot do this for all the possible ringtones or the already small disk space would be used immediately. Choosing not to uncompress the files, on the other hand, would mean keeping loaded in memory all the possible codecs.

Does this mean that it’s impossible to have a different ringtone for a specific contact on Maemo? No, it just means that if you want it you have to be ready to accept that the ringtone could start playing a couple of seconds later in some uncommon heavy load conditions. When you are ready to do that you just have to wait a couple of days, so that I can polish and publish the program I wrote to have custom ringtones :D

In other news, I’m going to GUADEC for the whole week: see you there!

I'm going to GUADEC

bari - Marco Barisione

Essere inglesi

Mettersi a litigare all’una e mezza di notte per decidere se la fila per i taxi deve andare da sinistra verso destra o da destra verso sinista.

guido - Guido Vicino

Webmin

Webmin

Webmin is a web-based system configuration tool for OpenSolaris, Linux and other Unix-like systems, although recent versions can also be installed and run on Windows.

guido - Guido Vicino

Danziger – The People are still behind me

Danziger - The People are still behind me

Danziger,

from Los Angeles Times (Unknow number…let me know which if you know.)

guido - Guido Vicino

The Modern Day Shugyosha

IT Consultant – The Modern Day Shugyosha

…ho sempre avuto il dubbio che Reply avesse il potere di chiedermi l’Harakiri!

guido - Guido Vicino

Memo sull’Impermanenza

<object height="344" width="425"><param name="movie" value="http://www.youtube.com/v/pgYA2c5iyzs&amp;hl=it&amp;fs=1&amp;"/><param name="allowFullScreen" value="true"/><param name="allowscriptaccess" value="always"/><embed allowfullscreen="true" allowscriptaccess="always" height="344" src="http://www.youtube.com/v/pgYA2c5iyzs&amp;hl=it&amp;fs=1&amp;" type="application/x-shockwave-flash" width="425"></embed></object>

…un bel memo sull’impermanenza.

guido - Guido Vicino

Umberto Veronesi

« L’umanità rischia un effetto a catena distruttivo: esaurimento di energia, di acqua potabile, di alimenti base per soddisfare consumismi alimentari errati. In Cina e in India è aumentato il consumo di carne, così come non si ferma in Occidente. I conti non tornano. Sei miliardi di abitanti, tre miliardi di bovini da macello (ogni chilo di carne brucia 20 mila litri d’acqua), 15 miliardi di volatili da alimentazione, produzione di combustibili dai cereali. Tra un po’ non ci sarà più cibo. Grano, soia, riso, mais costano sempre di più e vanno a ingrassare gli animali da allevamento. Dobbiamo fermarci ora. Primo passo: diventare vegetariani, o quasi. »

Umberto Veronesi, (citato in Corriere della sera, 20 maggio 2008, p.9)