Vertical badge

vertical number of days without Belgian governmentI was writing the next version of my badge counting the number of days without Belgian government when Laurent added his comment requesting for a vertical version. You can see it on the right.

Since the original release, I also added translation of the sentence in Dutch and German (after all, Belgians are speaking 3 official languages). And I approximately centered the text on the vertical version (I personally prefer the text on the right for the horizontal version but you can easily modify this by yourself).

As usual, here is the HTML code to include this vertical version in your page, blog, etc.:

<img src= "http://www.epot.org/belgov/belgovv.php" alt="belgov counter on epot.org" />

And here is the source code (for both version): belgov-0.3.tar.gz (20kb).

How many days without governement?

Now it’s not a secret anymore: more than 148 days passed since we, Belgians, went to vote (it was on the 10th of June 2007) and we still don’t have any government!

If you want to count the numbers of days without Belgian government, it’s easy: just have a look at Belgian newspapers. Or … have a look at the counter below (in French, Vlaams or German) 😉

belgov counter on epot.org

And if you want the same on your website or blog, it’s very easy, just copy/paste the HTML code below:

<img src="http://www.epot.org/belgov/belgov.php" alt="belgov counter on epot.org" />

Enjoy!

P.S. For those who could be interested, here is the source code: belgov-0.2.tar.gz (6kb). It’s written in PHP and under the GNU GPL (so it’s free!). Each small animal (Lion of Flanders or Rooster of Wallonia) represents 2 days without government. On the last line, there is a small gradation of transparency.

P.P.S. If you want to specifically support the unity of Belgium (because quite a number of politicians and citizens want to split Belgium), Pilok has a “I love Belgium” banner. Here I just wrote a counter of days without government, whatever your opinion is about Belgium.

Edit on Nov. 7th: I added translations in Vlaams and German for the line on the bottom.

OpenSocial, a step further towards a "society of social networks"

Since Thursday, Google Code is hosting the OpenSocial project, a group of APIs allowing the development of common software for a certain number of “social networking” websites (e.g. LinkedIn, MySpace, Ning, Orkut, …).

Before Thursday, every programmer wanting to develop a software for social networks had to learn an API, how to write code and sometimes a new language for each of these networks (when these ones exposed a public API!). Now, OpenSocial gives access to the most common functions of all the participating networks. Currently, the API gives access to:

  • the users profile information
  • the networks and friends information
  • events in the network

One advantage of OpenSocial is that it’s based on existing languages (Javascript, HTML and Flash) where other APIs (the Facebook one, to be clear) impose a new language like FBML. Source code for examples is under a free license as well as all the documentation. OpenSocial promises to open the API source code soon (see the FAQ).

Finally, one slowly achieves a true social networks society (federation) where, whatever website/network you are registered, you’ll be able to use the same applications (who spoke of standardization?). Web 2.0, software are coming!

Now, some questions remain unanswered …

  • One day, one can be registered in a network and access other networks without being registered with them (a bit like gateways allow people using one type of IM can chat with friends using another type of IM).
  • What about security, access to data (from outside) and the public perception about this? (see Bruce Schneier’s opinion on Facebook and data control)

I initially wrote this news in French for LinuxFr (see here).

More on Java DBs comparison

Following a comment from Alexandre on a previous post, I went a little bit further with my performance test of database engines running under Java. This evening, I tested a profiling tool and a variable number of insertions/retrievals (I didn’t tested transaction).

Taking the code from the previous time, I simply changed the number of elements to be inserted/retrieved. As expected, the durations of object initialization (except for 2 points for Derby and H2) and database creation did not change with the number of elements to be inserted, Derby being still the slowest engine to create a simple database (1 table only). The durations of the insertion step increased slowly with all the database engine, except for SQLite+JDBC: you can see a much steeper initial angle in the increase of the duration in the graph below (be careful: x-axis shows logarithmic values).

Click for bigger graph

For the retrieval, all the engines increased their time spent in this step in the same way (approximately). All the graphs can be seen here.

Performance analysis was completed using a free profiling tool, jRat (list of tools available here and here). There is a big difference here since jRat measures the time spent in each function. These functions approximately match the previous “steps” but not exactly. And I had memory problems using jRat with a number of elements inserted > 100 (hence the limit here).

Derby and SQLite+JDBC always performed worst than other engines (except for the showData() function). Usually, H2 and HSQLDB had more stable results (smaller standard deviations). And SQLite+JDBC was still the worst engine regarding data insertion (see graph below).

Click for bigger graph

It was also very strange to see that H2 and HSQLDB took approximately the same time to insert 100 or 1000 elements (note that for HSQLDB, I did not take into account the fact one needs to explicitly close the connection, allowing HSQLDB to temporarily store data in memory before committing them to the file — but closing the connection didn’t take so much time). All the graphs can be seen here.

One conclusion of all this: if you write a Java application and need a fast Java database engine, use HSQLDB (BSD-like license) or H2 (modified MPL). Next time, I’ll test transactions (but I don’t know when it’ll be).

Published in Schmap

Colonne du CongrèsOne of my photos on Flickr is now on Schmap, a website providing travel guides for some destinations in the world (only Europe, North America and Australasia for now). See here how it looks.

What was interesting for me was the way they did it. I came to know it via an e-mail from Emma Williams (from Schmap) telling me my photo was included. And, at first sight (*), they correctly understand the conditions of the Creative Commons Attribution-ShareAlike 2.0: attribution is on their website, as well as the “cc” logo next to the image. And they link to the the image on Flickr 🙂

(*) If you read the terms of use, you’ll notice all the material (including third-party material) “are protected by copyright laws. You may only access and use the Materials for personal or educational purposes and not for resell or commercial purposes by You or any third parties”. My photo is also protected by copyright laws but you can access it for other purposes than personal or educational uses, you can sell them (the cc-by-sa allows it). Since the transformation they did is “only” a resizing, does it really matter since the original material is given and resizing is easy to re-do?

SQLite+JDBC, worst than Derby!

Following a comment from Alexandre on a previous post, I included SQLite in my performance test of database engines running under Java.

What prevented me from using SQLite in the previous test is that it’s not a pure Java database and one have to use third-party JDBC driver and implementation classes in order to manage this database engine. IMHO, I also dislike another fact: SQLite does not enforce data type constraints (and it’s a feature, not a bug) so everything is stored as ASCII string, even if you have very few other “artificial” data types.

In order to include SQLite in my test, I have to rely on a third-party libraries: David Crawshaw’s JDBC driver for SQLite. Some minor adaptations also had to be done to the code (see the SqliteTest class in the source code below). Brandon T. provides a good tutorial on how to use this driver on MS-Windows here.

The result? SQLite performances are worst than Derby! In this case, the slowest step is the data insertion: more than 11s for 100 insertions (see graph below). The database creation step is also slower than with H2 or HSQL (but much faster than Derby). If you compare the whole process (initialisation + creation + insertion + retrieval), SQLite (and its JDBC driver) is the worst database engine. The only good point is that it only creates one file (the other engines creates at least 2 files) and this file is only 5kb.


Click to show the normal size graph.
A graph with a log y-axis is available here

Protocol. Same as in the previous post except that now I have 4 engines to rotate. Source code is here (4kb) and the jar file + libraries is here (5Mb).

Microsoft Research to sponsor Open Access awards

In a somewhat strange move, Microsoft Research is going to sponsor BioMed Central 2007 Research Awards.

Lee Dirks, director, scholarly communications, Microsoft Research: “We are very supportive of the open science movement and recognize that open access publication is an important component of overall scholarly communications.”

I hope the other Microsoft divisions are going to follow this move and sponsor (or release their products as) Open Source and free software projects … More details on the announcement here.