Sony DSC-HX5V

For my next holidays I bought a new camera (since the previous one died last year) and I wanted a quite cheap camera (I suck at taking pictures) with a GPS in order to have the coordinates of the shots easily.

I decided to buy a Sony DSC-HX5V which is well rated for its pictures quality.

This post is about the GPS receiver inside the camera. If you are like me, you don’t like/want to install extra software for things like a camera. Usually camera makers provide poor softwares and they are quite always not compatible with plenty of things. So I didn’t installed the software provided with the camera.

I tried using the camera a bit and I noticed that acquiring GPS signal was painfully slow, which is quite normal for a GPS when it’s not assisted in any kind of way to know its position or the satellites positions (while a smartphone usually can know its approximate position from the cell tower it’s connected to and/or can download satellites positions from a website).

After looking a bit in the camera menu and looking on the internet, it’s possible to add a file with satellites positions for the next 30 days in the memory card and the camera use it to help locating itself.

From nearly 2 minutes to find it’s position it dropped to less than 20 seconds, which is now acceptable.

The software provided by Sony does that (writing the satellites position on the memory card) at least the Windows version. On Mac OS it doesn’t seem to work and of course, there is no version of this software running on Linux.

The manual way to do that is to:

This procedure is from Henrik Brix Andersen’s blog. Check it to find a perl script he did to automate that. One guy provided a simple application to do that automatically each time you plug your camera on Mac OS: https://code.google.com/p/gpsassist-update/.

Posted in Uncategorized. Tags: , , , . No Comments »

pwad on GitHub

This week-end I moved pwad to GitHub.

I already blogged about pwad, a utility software I wrote to download pictures from picasa web. I was hosting it on my server but since I’m using git as SCM I decided to move it to GitHub (well, the main reason is that I wanted to play with GitHub :-) ).

Anyway, now pwad’s official website is http://github.com/ldesgrange/pwad (and current version is 0.4).

FOSDEM 2011

FOSDEM (Free and Open Source Software Developers’ European Meeting) 2011 is happening this week-end (5-6 february) in Brussels as usual. I’m not living there anymore but I’m going to FOSDEM this year again.

This meeting is really open source developer oriented, several communities are meeting there (debian, mozilla, kde, enlightenment…) and I’m unfortunately not involved in any of this, so lots of tracks are too specific for me. Nonetheless some of them are more “general” and sound interesting.

Last year I was wondering how to contribute a bit to the open source community, the only thing I did was small piece of software (called pwad) to download picasa albums sent by friends. I can do better than that.

Anyway, FOSDEM is a great event, if you are in Brussels at that time, you should definitely go there and at least have a look of what’s happening. Last year I learned very interesting stuff and ideas that I hope will be nicely integrated in mainstream software/operating systems.

Mirror SVN

I had this set of commands in a file on my desk for ages, so lets share it before everybody moves to git.

For some reasons you may want to replicate a subversion repository. For instance if you have a big SVN with lots of users, you may want a master SVN and read-only slaves. Or maybe your SVN is quite big and doing a full backup each time is too long so you want to do a kind of incremental backup.

Let say you have a subversion repository at http://svn.example.com/repository and you want to create a mirror of that repository. First you have to create an empty repository on the mirror server:

$ svnadmin create /path/to/repository

Then you have to activate the revision property change hook. To do that you need to create a file in the hooks directory (/path/to/repository/hooks/). This file is a bit different depending on your platform. On windows you need to create an empty file “pre-revprop-change.cmd”. On *nix the file is “pre-revprop-change”, must be executable and return 0:

#!/bin/sh
exit 0

Now the mirror need to be initialized with the master content:

$ svnsync init file:///path/to/repository http://svn.example.com/repository 

This step can be quite long, your master SVN is copied revision by revision to the mirror. When it’s done the only thing you have to do is run the following command from time to time in order to synchronize the mirror with the master:

$ svnsync sync file:///path/to/repository 

That’s all. But you can also migrate to git and don’t bother about backups (mostly ;-) )

Restore grub

My server was installed a long time ago and it seems that the partitions were created in a way that grub does not like. And when grub does not like something you have good chances of having a computer not booting.

Since I have the problem from time to time, let’s write a reminder on how to fix this.

Sometime there are grub updates, and on the next reboot, well, nothing happens. Hopefully, my hosting provider provides an option to boot my server on a Ubuntu live CD (my server is running Debian but that’s fine).

When Ubuntu has finished booting, I can ssh on it and list my hard drive partitions:

# fdisk -l /dev/sda
(…)
 Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          12       96389+  83  Linux
/dev/sda2              13       19324   155123640   83  Linux
/dev/sda3           19325       19454     1044225   83  Linux

Here sda1 is my boot partition, sda2 is my root partition ans sda3 is swap. Let’s mount that:

# mount /dev/sda2 /mnt
# mount /dev/sda1 /mnt/boot

Now we have to change the “root” directory from the live CD to my server’s disk so we can simulate being running on my server’s disk:

# chroot /mnt

And now we can reinstall grub:

# grub-install /dev/sda

In my case I have to give the --force option to install grub. That’s all, I can now restart my Debian server.

Posted in Uncategorized. Tags: , , , . No Comments »

BudgetView

2ème billet d’affilé où je parle d’un logiciel, mais cette fois-ci ce n’est pas un petit logiciel fait par moi-même, mais une vrai application pour gérer votre budget (faite par des amis, donc je fais un peu de publicité).

BudgetView est donc une application vous permettant de gérer, organiser, planifier votre budget assez facilement. Ce n’est pas une application en ligne, donc vos données restent bien chez vous et ne sont pas envoyées sur l’internet à des inconnus, mais bien un logiciel à télécharger et à lancer sur votre ordinateur. BudgetView fonctionne sur Mac OS X, Linux, Windows (et vu que c’est écrit en Java, il y a certainement moyen de faire fonctionner l’application sur d’autres systèmes). Vous téléchargez vos relevés de comptes sur le site de votre banque, vous les importez dans BudgetView et voilà (il faut quand même catégoriser quelques dépenses et après ça dépend de ce que vous voulez faire).

J’utilise BudgetView depuis pas mal de temps maintenant, et comme toute bonne application, l’idée c’est d’avoir à s’en servir le moins souvent possible (mon but dans la vie n’est pas de perdre mon temps devant mon ordinateur, mais de faire des choses intéressantes). Personnellement je me sers de BudgetView environ une fois par mois, pendant 15 minutes. Pour gérer mon budget, ça va, c’est assez rapide (faut dire que mon budget, je le laisse un peu vivre sa vie, mais au moins BudgetView me permet de savoir à l’avance dans combien de temps je vais passer dans le rouge).

La mauvaise nouvelle ? Ce n’est pas open source et c’est payant, mais ça va, c’est pas trop cher : 30 € (ouais enfin 29,90 €). Il y a une période d’essai de 30 jours, ça peut toujours vous donner une idée de ce que vaut l’application. En ce qui me concerne je pense qu’une période d’essai de 45 ou 60 jours aurai été un peu plus appropriée vue que BudgetView affiche les informations par mois, 1 seul mois d’essai c’est un peu limitant (quoique, vous pouvez toujours télécharger un historique plus long sur le site de votre banque pour voir l’évolution passée de votre budget).

Bref, si vous cherchez un logiciel pour gérer votre budget qui soit à la fois simple et puissant, essayez BudgetView ;-) .

Posted in Uncategorized. Tags: . 1 Comment »

pwad

I’m not very fond of services like picasa, but some of my friends use that to share pictures with me. Unfortunately, retrieving pictures from a friend’s picasa web album is a pain. I have tried to find how to do that and usually the tips I found were not so great and softwares were outdated/not maintained anymore.

Being a software developer, I decided to write a small software to do that, so I created “pwad” (aka Picasa Web Album Downloader). Yes, I know, I’m bad at finding names.

You just have to copy the link provided in the picasa email you receive when a friend shares an album with you, paste it in pwad and click on the download button.

It’s open source (Apache License 2.0), it’s written in Java, so you need Java (at least version 6) installed on your computer. I haven’t packaged the application with an installer yet, double-clicking on it should be enough to launch it, but first you have to download it from: http://pwad.desgrange.net/wiki/download (current version is 0.3).

If you find this application useful, bugged, etc. you can leave feedback and comments on this post.

UPDATE: pwad has been moved to GitHub http://github.com/ldesgrange/pwad.

iTunes 10, Firefly, forked-daapd

Apple recently introduced the new version of iTunes: iTunes 10. For those, like me, who are using Firefly to broadcast their music on their local network, you may have seen that iTunes 10 does not show the content of your remote playlist anymore :-( . The bad news is that a lot of commercial products are using it (especially NAS devices like Drobo…).

Someone started a thread about that on Apple’s forum: http://discussions.apple.com/thread.jspa?threadID=2564925

One guy says to have a look to forked-daapd which is a full rewriting of Firefly. So I did. On my Debian box, a package is available in “testing”:

$ sudo apt-get install forked-daapd

Change the directory where the music is in /etc/forked-daapd.conf, restart and that’s all. Then go to iTunes, the shared library should be visible and filled with your music!

Since Firefly is a dead project (no activity for a while), everybody using it should migrate to forked-daapd.

Note: this is my 100th post on this blog!

Do not check email adresses!

You may have noticed that on some rare websites (≈99.999 % of internet websites), you have to provide an email address when you register. And most of the time the application running the website check if the email address you entered is valid.

But you know what? Most software developers (you know, the guys staying all day long in front of computers, the guys you call when you have a problem with your computer because they have some magical power that allows them to fix your problems) don’t know what a valid email address is!

Why do I say such things? Because each time I register on a website, it complains that I should enter a valid email address… but my email address is valid actually! What I’m complaining about is not that they check email addresses of course, I’m complaining about the fact they are rejecting valid ones. Like for an email spam filter, you don’t care that some spam emails still reach your inbox, but you hate when a valid email is dropped because it was considered spam.

Unfortunately, most email address filters that have been written are rejecting a lot of valid email addresses. Why? Because checking that an email address has a valid format is very difficult. Have a look at this summary of RFC’s email address format, you will understand what I mean.

So, if you are a software developer and you have to check the validity of email addresses, don’t bother much checking the email address format (or the strict minimum like “there is a ‘@’ and a ‘.’) because even an email address that have a valid format may be invalid (in the way that the corresponding email account does not exists).

For registration process it’s easily solved by asking the user to click on a confirmation link you send them to the given email address. Only then you will know that the email address is really valid.

Les Cast Codeurs

Si vous êtes développeur Java, vous connaissez certainement le podcast The Java Posse, 4 experts (Tor Norbye, Carl Quinn, Dick Wall et Joe Nuxoll) du monde Java (au sens large) parlant des news concernant Java, la JVM et tout ce qui touche de près ou de loin (voire de très loin) à ça, sur un ton en général très décontracté et humoristique.

Il y a un peu plus d’un an maintenant, 4 français (Emmanuel Bernard, Guillaume Laforge, Antonio Goncalves et Vincent Massol) ont décidé de faire quelque chose de similaire, le podcast Les Cast Codeurs, mais dans la langue de Molière. Je dois avouer qu’au début je ne voyais pas trop l’intérêt, étant donné que nous travaillons dans un secteur très anglophone, ça me semblait assez redondant avec The Java Posse, à part peut-être pour les quelques irréductibles gaulois qui ne comprennent toujours rien à l’anglais (et il semblerait qu’il y en ait encore pas mal en France ;-) ).

Récemment je me suis décidé à en écouter quelques épisodes, et c’est plutôt pas mal, même si dans l’idée c’est assez proche du Java Posse, le contenu et l’approche sont assez différents pour que ce ne soit pas complètement redondant. Sans compter que l’actualité française et européenne du domaine (si si, il y en a) est un peu plus abordée. C’est entre autre par Les Cast Codeurs que j’ai découvert le BruJUG.

Continuez comme ça les gars, ça me fait quelque chose de plus à écouter dans le métro ;-) .