Skip to content


New home

Please update your bookmarks and RSS feed readers: the new home for this blog is here and the associated RSS feed is here. See you there!

Posted in Websites.


Managing photos

I am still managing my photos based on directories named by date + event (e.g. “110515-person” contains photos from the person and taken today). I tried Shotwell, saw Picasa or iPhoto working but I was not really convinced. Maybe I like to be closer to the file structure (and it’s enough for my needs) and don’t like too much the idea of being dependent on a software and its internal database.

The only issue I faced is that I’m collecting photos from my camera and my phone: they both use different naming conventions. So when I look at my photos, I first have all the photos from my phone in chronological order then I am forced to go back to the beginning of the event and look at all the photos from my camera (again in chronological order).

The solution I applied is to take into account the EXIF tag concerning the date/time each photo was taken in order to rename the file accordingly. For that I use exiv2:

exiv2 -r'%Y%m%d-%H%M_:basename:' rename $(ls)

The result are names like: 20110515-1814_IMG_3704.JPG. This is easily sorted. Provided my phone and my camera date/time settings are approximately synchronised, it solves the issue mentioned before.

Now not all pictures are rotated. Most file managers and photo editing software take care of that and show you corrected photo if needed (Nautilus and Gimp do that at least). But some software do not take that into account (I think of Piwigo for instance). Here I use jhead with the following command:

jhead -ft -autorot *.JPG

Now in order to get some photos out of the computer,

  • I just use a regular USB key to give the photo shop and print some photos ;
  • I use a simple FTP client to upload some photos to our private photo gallery ;
  • I use Postr (previously mentioned here) to upload some photos to my Flickr gallery ;
  • I finally sometimes use the Picasa web interface to upload a few pictures there.

And you, how are you managing your photos?

P.S. By the way, I recently discovered a nice tip to transform all spaces in file names by underscores (or any other character):

rename ' ' '_' *

Posted in Computers, My life, Photo.

Tagged with , , , , , , .


Two annoying issues with Firefox 4 (and their solutions)

The Mozilla Foundation updated Firefox to its version 4 last month and it has lots of interesting features. So I upgraded and although I initially criticized the new interface (when looking at screenshot from beta releases), I now quite like it: it gives more space to the actual content (web pages) to keep the “container” (the Firefox GUI in itself) to a minimum.

But … (because there always is a “but”). But I found 2 annoying issues with the new version …

  1. the “open in new Tab” option is now second in the pop-up menu when you right-click on a link;
  2. Firefox will not save all your open tabs when you close it.

In version 3, when you right-click on a link, the pop-up menu shows you options to open in new window or in new tab in this order:

  1. Open Link in New Window
  2. Open Link in New Tab

Now in version 4, when you right-click on a link, the pop-up menu shows you these options in the following (inverted) order:

  1. Open Link in New Tab
  2. Open Link in New Window

So if you are used to click on the second option to open the link in a new tab (in version 3), you automatically do this in the new version. But you open a new window. That’s annoying! And that’s a known bug/feature.

There are three solutions to this issue:

  1. use Ctrl + (left) click to open a link in a new tab.
  2. use the Menu Editor add-on to re-organise the pop-up menu order as you wish.
  3. use this tweak proposed in a Mozilla forum.
  4. (I know, a fourth solution) just get used to it because I’ll also find it annoying if Firefox developers suddenly change the order of the menu items back in version 5.

My other issue with this new version of Firefox is that it doesn’t warn you that you will close it but not save the tabs you are currently browsing. In Firefox 3, there was a warning dialog box telling you something like: “you are about to close Firefox but there are still tabs open. Would you like to save them, quit anyway (and lose them) or stay in Firefox”. In Firefox 4, no warning, it closes and doesn’t save your tabs.

Initially you think you made a mistake, there was no tab when you closed Firefox. Or maybe you didn’t pay attention to the dialog box and closed Firefox, telling it not to save. At the third occurrence, you are sure there is an issue! And there is one indeed! The Firefox development team apparently decided not to show this box anymore. It sounds ok if you think that this roadblock-dialog-box isn’t in the user’s way when he/she decides to quit. But then save the tabs to users used to this features don’t lose their tabs. This evening, I lost at least 20 tabs containing things not so important (so not in bookmarks) but I wanted to read tonight. Grrr …

Fortunately, as usual, there is a solution:

In the address/url bar enter: about:config
In the filter box enter: quit
set browser.showQuitWarning to ‘true’

Again, this is a feature or an explicit decision: see bugs 592822 and 593421 for instance.

From my point of view, the gold standard is: don’t change the UI and user experience ; or do it but tell the user you did it the first few times the old behaviour isn’t occurring.

Posted in User Interface.

Tagged with , , , , , , , , , .


March 24th was world TB day

TB stands for tuberculosis. It’s an infectious bacterial disease caused by Mycobacterium tuberculosis, which most commonly affects the lungs. It is transmitted from person to person via droplets from the throat and lungs of people with the active respiratory disease.

Like all other World Days regarding infectious diseases, it is meant to raise awareness about its global epidemiological aspects and the efforts to eliminate it. For tuberculosis, March 24th was chosen because Robert Koch first described Mycobacterium tuberculosis on March 24th, 1882. He then received the Nobel Prize in Physiology or Medicine for this in 1905.

On the WHO website, there is a huge amount of data that can be easily parsed (here too).

I was first interested in the estimated TB incidence per 100 000 population in 2009 (per 100,000 population) in the BRIC countries (see table below). Clearly, there is Brazil with a low incidence (compared to others, it’s still around 10 times values found for “occidental” countries) then Russia and China around 100 cases/y and finally 168 cases/y for India. I added their respective Gross Domestic Product (GDP) in the table as it’s often considered as an indicator of a country’s standard of living (in 2009, numbers from Wikipedia/IMF). I also added the annual growth rate of GDP per capita (in 2006, numbers from EarthTrends/World Resources Institute). The only interesting thing I see is that if your annual growth of GDP per capita is low, your estimated TB incidence per 10,000 is also low.


Country Est. incidence GDP per capita Annual growth rate …
Brazil 45 11,289 2.4
China 96 7,518 10.1
India 168 3,290 7.7
Russian Federation 106 15,807 7.2

Now if we look at some occidental countries (table below, same sources), this seems right.


Country Est. incidence GDP per capita Annual growth rate …
Belgium 8.6 36,274 2.6
France 6.1 34,092 1.4
Germany 4.9 35,930 2.9
Japan 21 33,828 2.2
UK 12 35,053 2.2
USA 4.1 47,123 1.9

The treatment involves medications for long period and is usually accompanied by antibiotics. Regarding prevention, Bacille Calmette Guerin (BCG) is the only current vaccine for tuberculosis and contains a live attenuated (weakened) strain of Mycobacterium bovis. TB eradication is part of the UN Millenium Development Goals (Target 6c: Have halted by 2015 and begun to reverse the incidence of malaria and other major diseases). It is also part of the WHO Global Plan to Stop Tuberculosis.

Recently (because of this World TB Day?), two interesting research papers were recently published in the litterature:

Posted in Health.

Tagged with , , , , , , .


R and the proxy server

R is a “a free software environment for statistical computing and graphics“. Being a desktop software, R is working out-of-the-box, even if you don’t have a network connection. However, if you want to install packages using a repository on the internet, you need a network connection (of course). If your computer happens to be behind a proxy server, you have to slightly modify your shortcut (in MS-Windows) to allow R to download packages. This can be done by modifying the “Target” field in the “Shortcut” tab of the shortcut properties (right-click on the shortcut to R, select tab “Shortcut”, edit field “Target”):

"C:\Program Files\R\R-2.12.2\bin\i386\Rgui.exe" http_proxy=http://proxyaddress:80 http_proxy_user=ask

Adapt the path to your R version, change the string “proxyaddress” by your proxy (see this previous post for a tip on this) and you’re done!

Because I never remember them, I’ll conclude this post with standard commands related to the installation of a packages:

Installing packages in R:
> install.packages("packageName", repos = "http://cran.ma.imperial.ac.uk/", dependencies = TRUE)

Notes:

  • You might get a window asking you for your firewall credentials and to choose a mirror server
  • CRAN repositories can be found here: http://cran.r-project.org/
  • This will download and install the package again, even if it is already installed

Updating packages in R:
> update.packages("deSolve") # for the deSolve package, for example

Know all packages installed in R on your computer:
> libraries()

Finally, here is a R reference card that can be useful too.

Posted in Computers.

Tagged with , , , .


What is my proxy on Windows XP?

In computer networks, a proxy server is a server (a computer system or an application) that acts as an intermediary for requests from clients seeking resources from other servers.” From Wikipedia. This can be useful for a company to force its employees to use a proxy (to filter where they surf, to cache the web content for speed issues, to keep machines on the network anonymous, etc.). This post will look at 3 ways to get the proxy definition for a Windows XP machine in order to use that information in another program. It may work in other Windows-type operating systems.

The first one is to use the command line tool proxycfg but this is different from the one that may be used by Internet Explorer, see here. On my corporate PC, there is no proxy defined this way. But there is one defined in Internet Explorer.

So, in Internet Explorer, to see the proxy connection, you go in the “Tools” menu -> “Internet Options” -> “Connections” tab. And then click on the “LAN settings” button. But this can be blocked by your PC administrator (it’s my case) so let’s look at the other options.

Another option is to use the Firefox (if your company allows you to use it): in the “Tools” menu -> “Options” -> “Advanced” tab -> “Network” tab, in the box named “Connection”, click on the “Settings” button. Then:

  • You have no luck if the settings are auto-detected.
  • If the option “No proxy” is chosen, your company doesn’t use a proxy.
  • If the option “Use system proxy settings” is chosen, you should have seen the proxy with the command line tool proxycfg above.
  • If the option “Manual proxy configuration” is chosen, you can directly read the parameters.
  • If the option “Automatix proxy configuration URL” is chosen, you can copy-paste the link given in the text field in the address bar to see how Firefox will determine which proxy to use. This page is just a bit of code that tells Firefox in which conditions it should use what proxy. You can find some details here or elsewhere on the web. You have to use the value just after the string “PROXY“. For instance, your proxy is “LOCATIONPROXY01” if your proxy string is “PROXY LOCATIONPROXY01“. If there are many proxy definitions, you have to try to understand the logic behind the .pac file if you want to be sure to find the correct one. Or you can try all of them (brute-force) and you’ll find the one that works.

Posted in Computers.

Tagged with , , , , , .


Today is *not* World Epilepsy Day

I continue in the serie of “World x Day” and for a reason still unknown even to myself, I thought today was the World Epilepsy Day (it’s in fact on March 26th, called Purple Day). But, anyway, epilepsy is “a common chronic neurological disorder characterized by seizures. [...] Epilepsy is usually controlled, but cannot be cured with medication, although surgery may be considered in difficult cases.” (Wikipedia).

Out of curiosity, I was looking for mathematical models for the description of the epidemiology of epilepsy. But unfortunately, I couldn’t find anything. Probably because epilepsy is not an infectious disease for which tentative mathematical models have more predictive power (in terms of the population scale and time scale). The epidemiology of noninfectious diseases is primarily a study of risk factors associated with the chance of developing the disease. Nothing very fancy for a mathemarical model! ;-) (But if you find something, feel free to share! Thanks in advance!)

According to Wikipedia, the next World [Infectious Disease] Day is on APril 25th (malaria).

So today is just Valentine’s Day :-)

Posted in Health, My life.

Tagged with , , , , , .


World Cancer Day

It doesn’t seem jolly but last Friday, it was the World Cancer Day. About this, the WHO set up a nice website about cancer control.

Following my previous post on Jamie Oliver and the top 15 causes of death in the USA, I started to collect similar data from other countries. Linking this to cancers, the annual statistics on cancers in Belgium can be found on the Belgian Cancer Registry. The latest numbers are however from 2006. Here are the top 15 cancers in Belgium in 2006 (all sexes and regions mixed):

Rank Classification Cancer type Cases Remark
1. C50 Breast 9556  
2. C61 Prostate 9254 male only
3. C34 Bronchus and lung 6956  
4. C18 Colon 5233  
5. C44 Malignant neoplasms of skin 3110  
6. C20 Rectum 2264  
7. C67 Bladder 1986  
8. C82-85 Non-Hodgkin-lymphom 1925  
9. C43 Malignant melanoma of skin 1572  
10. C64 Kidney 1377  
11. C16 Stomach 1356  
12. C54 Corpus uteri 1320 female only
13. C25 Pancreas 1172  
14. C80 Unknown primary site 1168  
15. C15 Oesophagus 920  

It’s interesting to note a few things:

  • These figures represent cases of cancer and not deaths by cancer. Note also that prostate cancer is in third position but only concerns males.
  • The latests data is from 2006. The website doesn’t seem to be updated since 2008 (and 2008 seems to be the year when data from 2006 are available ; if we follow the 2-years-gap logic, I guess the data from 2009 are available somewhere but not on this website)
  • Data accessibility seems to be average. Data is there in Excel format (and PDF which is pretty useless if you want to reuse the data). On one side, these Excel files can be opened by almost every office suite. On the other side, some open format would have been preferred. And some direct interaction with the data on the website is now the norm (ok, I just wrote it doesn’t seem to be updated since 2008)
  • The classification is quite good since it uses the “Classification Internationale des Maladies” which is the “International Classification of Diseases” in English better known as ICD-10 (online).

Posted in Health, Lab life, Reading.

Tagged with , , , , , .


Chúc mừng năm mới!

Happy Vietnamese New Year!

Posted in My life.

Tagged with .


World Leprosy Day

Today was World Leprosy Day. Leprosy has a high incidence in countries like India, Brazil and Burma (and other countries in the middle of Africa). But its incidence in occidental countries is rather low. This may explain why there isn’t a lot of epidemiological models of leprosy (I wish I had some time for this kind of thing).

Posted in Health.

Tagged with .