Category: Computers

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 ' ' '_' *

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.

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.

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.

Is there a life after delicious?

Delicious isa social bookmarking service that allows users to tag, save, manage and share web pages from a centralized source. With emphasis on the power of the community, Delicious greatly improves how people discover, remember and share on the Internet“. I extensively use(d) it and I think it’s one of the very good tools Yahoo! (its parent company) has to offer on the web for the moment (along with Flickr and the currency converter). I was thus very disappointed to read persisting rumours that Yahoo! will shut down Delicious. And I’m not totally reassured by the official comment from the Delicious blog: “No, we are not shutting down Delicious. While we have determined that there is not a strategic fit at Yahoo!, we believe there is a ideal home for Delicious outside of the company where it can be resourced to the level where it can be competitive“.

So, first, export your bookmarks. It seems there is no limit to the number of bookmarks you can save, all of them are there. Delicious uses a modified Netscape bookmark file format with meaningful use of HTML tags. In clear: this file can easily be parsed and stored in another format, in a database, in another tool.

Now what if someone finally decides to shut down Delicious? Or what is the future of your data if Delicious outside Yahoo! is transformed into a paid web service (like Historious for example)? What is the competition? What are the alternatives?

I will not blindly list them all. You can find them via a simple web search. Instead I’ll list the features I liked in Delicious and also add some improvements I would have liked to see. If I go for something new (or an improved Delicious), it would be nice if it’s better than the actual one, isn’t it?

What I like in Delicious (in no particular order):

  • simple: a link, some tags, a description and you are done
  • tags suggestions based on other users’ tags
  • private tags
  • simple “social” link, suggestions between users and trends about what’s currently bookmarked
  • web-based (accessible from everywhere), quite fast
  • simple API, extensions for most popular browsers, widgets and badges for inclusion in websites
  • free, accounts not necessarily linked to Yahoo! (at least in the beginning)

And now what can be added to make it better?

  • free license (e.g. Affero)
  • free access to dataset (the whole dataset, not just your dataset ; so compliance with OSSD))
  • decentralised system while maintaining interoperability (à la Jabber)

And for the rest of your digital life, what if the service provider decides “that there is not a strategic fit” for it at the parent company? Self-hosting seems to be the only viable alternative.

Installing Fedora 13 on a Toshiba Satellite L670-10K

I quickly needed a new laptop to continue working and I found a Toshiba Satellite L670-10K. It’s a nice entry-level laptop with a dual core processor (I didn’t know Intel was still doing Pentium-branded processors) and a 17″ screen (read the specs for other details). I downloaded the latest Fedora Linux (version 13, 64 bits ; and version 14 is coming soon) and installed it from the LiveCD. Nearly everything was recognized out-of-the-box: screen resolution, graphical card (Intel, with 3D effects), wired network, webcam, card reader, sound card, etc.

The only thing that was not recognized was the wireless network card: a Realtek RTL8191SE. Here is how to install it. On the Toshiba website for (Windows) wireless drivers, it is always associated with the RTL8192SE model. So don’t be surprised if the driver downloaded from the Realtek website is a file with RTL8192 in its name although you clicked on the link for the RTL8191SE-VA2 model. Unpack this file. The LiveCD doesn’t come with some packges so you have to install them (via the System menu, Administration, Add/Remove software). These packages are: kernel-devel, gcc and make. Once it’s done, do a simple “make;make install” as root and reboot the laptop. Your wireless connection is now up and running!

Wireless UFO?

If you want to have Flash on your 64-bits Linux, Adobe released version 10.1 of their Flash player with native 64 bits support. Download Flash player “Square”, unpack the archive and copy the (only) file “libflashplayer.so” in directory /home/yourusername/.mozilla/plugin, restart Firefox. You have now a Flash-enabled browser!

Finally, I must have done something wrong, somewhere but I kept having the first configuration screen after installation, even after subsequent reboots. After a quick search, I didn’t find anyone with the same issue. YMMV. In order to skip this screen (after you went through them a first time), just add the line “RUN_FIRSTBOOT=NO” in the file /etc/sysconfig/firstboot and voilà!

In conclusion, I’m very pleased with this laptop and Fedora. My Linux desktop was ready in just a few minutes. Let’s work, now! 🙂

A good issue of Nature, obviously!

The October 14th, 2010 issue of Nature is obviously a good one. It had to be a good one! I usually advocate Open Access but it is always nice to reading complimentary issues of Nature which is Closed Access but is also publishing very good articles about science at the same time.

In this issue, I was interested in various topics …

First, there is a serie of articles about the US midterm elections and what (US) scientists feel about two years of Obama administration. Obama promised total transparency in American science, a new era of integrity and more freedom for scientists. From what I read, this isn’t the case yet.

Then, there are two article about publishing computer code from scientific experiment. In a World View, Nick Barnes, director of the Climate Code Foundation takes some concerns about that to pieces. The main reasons to provide computer code is to improve programming skills (the software author’s and others’) and enable others to engage with your research. Don’t be ashamed of the quality of your code. Don’t be afraid of starting the trend if no one around you share their software. Don’t be afraid to refuse support when badly asked for. Don’t overestimate the intellectual property value of your code. Nick Barnes also wrote a blog post about it. And you can comment on the Nature article here.

In a News Feature, Zeeya Merali tells stories of scientists who found themselves in uneasy positions regarding to the software they wrote but, at the same time or later on, realised publishing their software was the best thing to do. Besides formalising one’s training in programming, Zeeya Merali advocates some simple steps to practise “safe software”: use a version-control system ; track sources, data and events ; write testable software ; test the software and encourage sharing of software.

I was also interested in these articles in two ways. First, I also realised the need of a formal training in programming during my Ph.D. and I eventually got a B.Sc. in computer science. In the team and field where I’m now working (Health Economics and modelling of infectious disease), I can clearly see the benefit of having such training. Don’t get me wrong: I meet wonderful colleagues every day who don’t have the training but have lots of skills and can solve lots of problems ; I just often see the ease to grasp algorithms as well as some better procedures and testing that comes with training. And, second, I would like to addd that free software licences are to be considered when publishing your software (for science or not).

In the same issue, there was also a small news about the Europe’s use of research animal. This reminded me of the good-old-days :-). Fundamental biology still account the largest proportion of animal experiments but what intrigued me is the 12.2% of “Other” usage.

There was also a comment on a book, The Professional Guinea Pig, about paid participants in phase I clinical trials. Interesting perspective from “the other side” of trials.

There is also an Outlook on the Lindau Nobel Laureate Meeting. It features interviews with 10 Nobel laureates (it’s always nice to readd their comments on science) and an article about science in the digital age (not yet read but it seems interesting).

Finally, an ad for my previous lab (GIGA ULg) caught my attention, as well as the small article about Science in Belgium. I must however write that this article is a bad summary of the research landscape in Belgium with, for example, mention of only two universities: the KUL and the UCL (we have many more). Souvenirs, souvenirs.

Facebook updates: nothing to fuss about

So Facebook, the current paramount social website, updated its website with the possibility to download all your data (among other updates). I don’t see why people need to fuss about this.

Although maybe useful, the important is not to be able to retrieve your data. After all, if your pictures are on Facebook, they were previously on your computer / camera / whatever. So you should already have them (and Facebook sends them to you in a zip file? what a feature!). Unless Facebook allows you to also download data about you but uploaded by others; this is a bit more interesting from a sociological / academic point of view (what has been posted about you). And then? A “big” step towards interoperability between social websites? Are you joking? For interoperability, you need 2 partners and, to my knowledge, no other websites (social or not) are currently offering the possibility to upload data from Facebook. Will it arrive? I’m sure of it. Is it secure? I doubt it: nothing is 100% secure in IT, Facebook is no exception. But this is still not important!

The important thing would have been to have total control on your data. The ability to post data. The ability to effectively remove data (Facebook policy explicitely states nothing is necessarily physically erased, not even your account if you decide to close it!). The ability to remove data about you posted by others. The ability to control data posted about your children. The ability to have real privacy.

So, why do I blog this? I don’t really get why people are so excited about this feature. Oxford building a new library [1, 2], why and how, this has nothing to do with the topic of this post but this is news!

Bodleian Library: Divinity School
Photo credit: Bodleian Library: Divinity School by Beth Hoffmann on Flickr (CC-by-nc-sa)