Thursday, 16 June 2011

Calligrams with Inkscape

Today I was looking for a quick way to create a calligram. I tried to do it with the GIMP, but it was not that easy, so I looked for another alternative, and I found Inkscape. I had never used it before, but it looks very powerful for vector graphics. As for the calligram, it is very easy to make both things that I was looking for, as illustrated below: make text to follow a path (which can be obtained from a picture, as the example below) or to flow inside a given shape (the guitar svg file can be found here).

Friday, 10 June 2011

Goodbye Palm...

I've been an owner (and a heavy user) of a Palm device for many years (around 15 years...) but lately I was not using it anymore, so I decided to get rid of it, but I needed to backup some of its data. Basically this came down to backing up:

  1. The contacts, which I did by using the J-Pilot software for linux. The contacts were easily exported to a CSV file. I tried to import into BBDB following these instructions, but the program was outdated, so at the end I had to do it "manually" (through regular-expressions inside Emacs).
  2. Birthday data store in the HappyDays application. I didn't find an easy way to export the data compiled by HappyDays, but in the end decided that it was not that important, since the birthday data is actually collected from the contact data, which I already exported.
  3. The most important data after the contacts was the data stored in SplashID. I believe that more recent versions of the Palm software come with a version to export directly in the device into a CSV file, but my version is very old (2.03), and didn't have this feature. The trick was to install the Palm Desktop software (Version 4.1.4) in a Window XP virtual (VirtualBox) machine, and then install the 2.59 old version of the SplahsID Windows software. But I couldn't get the Windows virtual machine to recognize my USB-connected device. It turned out that I had to upgrade the VirtualBox that comes with Ubuntu 10.04 and install the 4.0.8 version, and add myself to the virtualbox group. I got it to work by following these instructions (although I din't add myself to the usb group, only to the virtualbox one). Once that was in place, I easily synchronized my SplashID data in the Palm to the Windows software, and then exported the data in CSV format, which was then imported into an encrypted org-mode file to handle with Emacs (which is much more convenient to me now).

Monday, 6 June 2011

When the lack of any probability theory knowledge can bring a big unfairness

Recently I enrolled my son for the local music school. As there are always more candidates than places, somebody apparently decided that it would be a good and fair system to do the following:
  1. Sort out all the candidates alphabetically.
  2. Randomly select one of the letters and then choose n candidates (where n is the number of available places), starting with the first candidate whose surname starts with the chosen letter, and just go down the list in 1. (continuing from the beginning if the end of the list is reached) until all available places are taken.
To see how bad a system this is, I just got a list of 106 people that were applying to another local school (I just didn't have the original list with me) and assumed that 25 places are available. The probabilities of getting a place are so unfair, that I'm going to contact the local school to see if they want to change the system for coming years. Two of the extremes:
  1. One person has only a 3.85% probability of being chosen (the last one whose surname starts with S, since there are 14 people whose surname starts with R, and 12 people whose surname starts with S, so the only chance for her is that the randomly chosen letter is S).
  2. Another person has a 42.31% probability of being chosen (the first one with the letter C, since surnames starting with letters from S to B are a very small proportion of the total, and he would be chosen if any of those letters are randomly chosen. The number of surnames for each of these letters is: S: 12; T: 4; U: 1; V: 4; W: 1; X: 0; Y: 0; Z: 0; A: 1; B: 1).
Below I include a chart which, assuming 25 places, gives the probability (as a percentage) of being chosen for all the 106 people included in my test sample.

Wednesday, 1 June 2011

TestDisk saved my day

Today I discovered a little gem: TestDisk. My USB pendrive had lost the partition table with some important documents that my guitar teacher gave me yesterday (perhaps because he removed the drive without safely unmounting it first), and this program recovered the partition in a matter of minutes (before I even had the time to read its documentation).

Certainly a tool to have handy...