Older blog entries for Raphael (starting at number 41)

Surprise on the way to the airport

Last month, I was driving a bit fast towards Brussels because I didn’t want to miss my plane. It was raining heavily, but fortunately there wasn’t too much traffic on the motorway.

Suddenly, I see the three cars in front of me slowing down very quickly and switching from the first to the third lane. Oops! The road is covered with sugar beets and some of them are still rolling… Fortunately, I was paying attention so I quickly stepped on the brakes and then moved to the third lane like the other cars. Once I had slowed down enough, I grabbed my mobile phone and took this photo through the windshield without aiming much because I still had to be careful and avoid the other cars… not to mention slaloming to avoid the rogue beets trying to attack my car.

Surprise on the way to the airport
That was an interesting driving experience… I eventually reached the airport safely and got my plane just in time.

Syndicated 2007-10-21 22:56:08 from Raphaël's Last Minutes

Tivoization still possible with GPLv3 (draft4)?

The latest draft of the GPLv3 contains many improvements over the previous ones. It also still contains several minor issues, some of which date back to the first draft. Among these, there is a paragraph that remained unchanged since the first draft, although there were several comments saying that it could provide a loophole:

The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.

The problem is that “automatically” is not defined and it could lead to abuses, including preventing users from running modified versions of GPL software on some devices (the Tivoization problem that GPLv3 tries to prevent). “Automatically” can cover current practices such as generating Makefile from Makefile.in using autoconf, generating parser.c from parser.y using bison, etc.

But “automatically” could also include some operations that are impractical in terms of time or special equipment required. A file that can be regenerated automatically but requires several hundred years of computation on a supercomputer will effectively prevent most people from compiling the software and installing it on their device (if that file is required during installation or during run time). The canonical example would be if the tool that regenerates the missing source file requires the factorization of the product of two very large prime numbers.

As long as the company selling the device provides the complete Corresponding Source (including tools necessary for regenerating the missing files) and Installation Information, then they would be compliant to the GPLv3. As long as the source code (with the missing file) is the “prefered form of the work for making modifications to it”, then they have followed the GPL to the letter… while still preventing users from running modified code on their devices.

Of course I reported this problem and I included links to the previous comments on the same issue. But it looks like this issue has been ignored so far, despite the fact that the comments on the first draft are more than a year old. :-(

Syndicated 2007-06-20 20:25:10 from Raphaël's Last Minutes

Customer service

I bought my current camera (Nikon D70) in May 2004, just a few days after that model started to appear in shops. I made several thousand photos with this camera and I have been happy with the results… Until a few months ago, when it started behaving in a strange way: sometimes the camera would take unusually long to power up, sometimes it would appear to work correctly for a while but then suddenly start to display bogus exposure values. Without moving the camera or changing the lighting conditions, it would randomly change between 1/500s and 2 seconds, or some other very different values. When the camera started to behave like that, it was almost impossible to shoot anything with the correct exposure.

Over time, this problem became more and more severe so I eventually decided to bring the camera back to the shop for repair. My camera was 3 years old, so the warranty had already expired. The guy at the shop asked me to pay 50 EUR in advance and told me that he would send it to Nikon for repair, without expecting too much: regardless of the brand and model, many cameras are just returned because repairing them would cost more than a new model. This is a bit annoying when the camera costs around 1000 EUR.

Two weeks later, I got a letter telling me that my camera was back in the shop. The letter did not mention any repairs, so I was a bit worried. I went to the shop to pick it up and I had a pleasant surprise: Nikon replaced the defective circuits at no cost. When I tested the camera, I found that they also upgraded the firmware to a newer version, which includes new features and fixes some bugs that I had encountered before. And they also cleaned up the camera (inside and outside). So this is a happy end. Thanks to the Nikon customer service!

Syndicated 2007-05-14 14:46:52 from Raphaël's Last Minutes

Sophie

Sophie was born 6th of September, a bit before 16:00. She is not a small baby, weighting 4.390 kg and measuring 55 cm, but she did not take too long to come out and greet her happy parents Isabelle and Raphaël. A couple of hours later, she met her sister Catherine who is now two years old. The baby and mother are doing fine. The main job of the father was to hold the mother’s hand. This very important job was accomplished successfully according to the mother.

The picture below shows Sophie less than 4 hours after her birth. She was about to ask for more food…

Syndicated 2006-09-07 09:17:57 from Raphaël's Last Minutes

Print shops and posters

At the end of last year, my wife Isabelle asked me if I could create some postcards for the association she works for. The idea was to have something that can serve both as a greeting card for the new year and an indication that they have recently moved into new offices. After a couple of iterations with POV-Ray and GIMP, I eventually managed to create something that she and her colleagues were happy with. I created a winter scene showing their front door (modelled from photos), some cardboard boxes in front of it and some trees in the background instead of the ugly wall that is there in reality.

Later, she asked me to create some posters showing different versions of this scene. I re-rendered the winter scene at a higher resolution (approx. 3000 * 2000) and I also created a summer scene in which the snow is gone, the grass is greener and there are leaves on the trees. Here are some smaller versions of these images:

winter scene
summer scene

I gave Isabelle a CD-ROM containing these images and she went to the cheapest print shop nearby to get them printed on posters (100 * 70cm). At that size, the resolution of the images is 75dpi. I thought that it would be good enough for a poster that is designed to be viewed from some distance.

Well, it turns out that the employee of that shop discouraged Isabelle from printing the posters because they were not at 300dpi. She claimed that the images would look bad because of the low resolution. On the other hand, she looked at the samples that I had given to my wife (printed on photo paper) and she said that she would not be able to get the same quality on posters. Go figure. Oh, and she also said that her computer could not read that strange PNG format, but fortunately I had also included a JPEG version.

Anyway, she asked for 300dpi so she will get them. For 100 * 70cm, 300dpi means about 12000 * 8000 pixels, for a total of 97 megapixels. I wish I had a camera that could take photos at that resolution. I estimated that re-rendering the image with POV-Ray would take a couple of weeks using my fastest computer (which just died anyway - see my previous entry), so I simply let GIMP scale up the image and I only recreated the parts in which the details could be interesting. In the process, GIMP asked me if I really wanted to create an image that took more than 1 GB. Well, sure, that’s what the shop asked for! I will burn these files on a CD now. I hope that they will not complain that the image is too large for their computer to handle…

Syndicated 2006-01-16 07:48:59 from Raphaël's Last Minutes

Dead PC

Back from vacation. Found that my PC does not want to start anymore. What a nice way to start the new year!

I did not have much time to investigate what died. It could be the motherboard, the CPU, the RAM, the video card or the power supply. In any case, the PC locks up on startup and does not seem to initialize the PCI cards correctly. I am guessing that because I get no video signal and the lights on the network card get stuck in an unusual state, which usually means that the card did not get the proper signals on the PCI bus. Regardless of what it is, it looks like I will have to waste some time finding the bad components and replacing them.

Fortunately, my data should be safe. I learned a lot from the disk crash that I experienced a few years ago just when I was starting my (then irregular) backup on CDs. At that time, that caused me to lose a number of GIMP source files that I was working on, such as a preliminary version of a GIMP macro recorder. Since then, I have started doing automated backups on external USB drives in addition to the less frequent manual backups on CDs. USB enclosures are relatively cheap (about 10 EUR) and buying two hard disks instead of one (or 4 instead of 2) is also cheap in comparison with the value of the data that could be lost.

Even if my main PC will not be usable for the next few days, I can still use the laptop that I got from work. But for how long? I just learned that 2 of my 6 colleagues who had the same model of laptop experienced a hard disk crash in the last two weeks. Another one had a disk crash a few weeks before the Christmas break. And another two lost their data after coming back from vacation due to software problems. So this means that 5 out of 6 had problems with their laptop recently (OK, in two cases this was likely to be a human error, but still…). I am starting to wonder if there is a timebomb built into these laptops. So maybe I am next on the list. I’m going to back up my laptop now…

Syndicated 2006-01-16 05:30:37 from Raphaël's Last Minutes

Features and remote controls

Jimmac posted a very interesting journal entry about “more features” and a comparison with remote controls. I thought about it a bit and started typing a comment to his blog, but as it grew longer and longer I decided to move it here so that I have a bit more space…

This nice comparison with a remote control made me think about how I use mine. The device that controls my TV (and VCR) has a little flip hiding the “advanced” buttons. I do not have a photo of my remote control, but I found one that is reasonably similar. The top part until the red power button can be opened to reveal more buttons.
(photo of a remote control)

The basic buttons such as channel selection, volume and start/stop for the VCR are always visible. If you lift the flip, you get extra buttons for selecting input sources (e.g., DVD player or camera) or outputs, changing the parameters of the display and other exotic stuff. As it turns out, two of the “advanced” buttons on my remote control are as worn out as the channel and volume selection buttons that are among the “normal” buttons. So I am very glad that these buttons exist, otherwise the device would have been far less useful to me. On the other hand, I understand that they are hidden under a flip because some other people (whether they are a majority or a minority is irrelevant) would probably never use them. Even myself, I do not need to see all buttons all the time.

The comparison with this little device that I use almost every day is very interesting to me. And I take some lessons from it: the designers of this device could not predict which buttons I would use most frequently. They modeled this device for a slightly different class of users, yet I enjoy using it because the “advanced” buttons that I need are still within reach when I need them.

In case you cannot guess where I’m heading yet, let me add that the “advanced” buttons are not visible by default so that they do not confuse those who do not need them, but they are easily discoverable and once you get to them, they look and behave exactly like the other buttons. I do not need to open my TV and flip a few DIP switches to get to the advanced options. Translated in the GNOME or GIMP world, this means that I would have a default set of features that I can play with but also some advanced settings that are easily accessible from the application without having to resort to some other obscure tool such as a gconf editor.

I do not really need to have “everything at my fingertips” and be confused by huge configuration dialogs for every little feature. In fact, I prefer to have the less frequently used options hidden away, as long as there is an easy way to access them whenever I need them. It is essential for these advanced options and features to be discoverable, so the dialog that contains the basic options should give a visible hint that more stuff exists but is hidden (using an expander for the dialog or an “advanced options” button or whatever).

Also, even if I do not use some of the other “advanced” buttons on the remote control, I do not think that I would have bought that TV set if I had not seen that these options were available.

Update: moved the image and its description up a bit.

Syndicated 2005-12-14 09:18:15 from Raphaël's Last Minutes

Resurrecting GIMP metadata

It has been a long time since I last updated the metadata code in GIMP CVS. It is annoying how real life gets in the way… In fact, my contributions to the GIMP have been almost nonexistant in the last months, except for some minor contributions to the help pages. But I will take advantage of the Christmas break to get back to that metadata code.

First I have to fix some outstanding issues with the model (based on XMP) so that it is easier to link the model and the GUI. Currently, opening the File->Properties window leads to an ugly collection of empty widgets. Once the model and the GUI are correctly linked, it should be possible to have correct values displayed in these widgets and to update the model when the values are edited by the user.

Once this first step is done, it should be much easier to work on the remaining parts: adding pretty widgets in the properties window, converting to and from EXIF and IPTC, and eventually moving some of the code currently residing in gimp/plug-ins/metadata/ into a library so that plug-ins could link this code directly instead of using some functions through the PDB. I will write more about this once the first step is done.

Syndicated 2005-12-07 04:20:35 from Raphaël's Last Minutes

Unmaintainable Code?

How To Write Unmaintainable Code

Two days ago, I enjoyed reading the collection of tricks titled How To Write Unmaintainable Code and I mentioned it to a colleague. We both had fun reading it and commenting on some entries, but then forgot about it.

The Mysterious JSP Bug

Yesterday, he came to me to check if I could help him debug an application. That was a bit of JSP code that I had written some time ago and that he extended. Note that I seldom write JSP or even Java - he is a much better Java programmer than I am. The problem was that after his modifications, the JSP page did not produce the expected results. That page was supposed to display some results after submitting a form, but it didn’t. There was a rather large amount of code in that page, but I will spoil the fun for you by quoting only the part that caused the problem (of course he initially thought that the problem came from a completely different part of the code):

<%
    String submit = request.getParameter("submit");
    if (submit == null) {
        /* if the user did not confirm, go to the exit page */
        %><jsp:forward page="./SomeExitPage.jsp" /><%
    }
    do.something(useful);
%>

Nothing very fancy in that code. Now, since he was testing a modification of that code, he was not sure that the form submission would always be correct. So he did the obvious thing and commented out some parts of the code that were not ready yet for testing, including the one that I just mentioned. That part of the code now looked like this:

<%
    String submit = request.getParameter("submit");
    // if (submit == null) {
    //     /* if the user did not confirm, go to the exit page */
    //     %><jsp:forward page="./SomeExitPage.jsp" /><%
    // }
    do.something(useful);
%>

Nothing unusual, right? Just commenting out a few lines that are not ready yet. Well, this is wrong! I found out that the problem was precisely there: the unexpected results that he got were just the contents of the exit page. The problem did not come from some other part of the code that we were looking at. It came from the lines that were commented out.

Why? Well, it should have been obvious: the scope of the JSP tags <...> and <jsp:.../> is evaluated before the language-specific features such as comments, etc. As a result, the <jsp:forward.../> was not commented out. On the contrary, it was now unconditionally included, since the if condition had been removed. That was a nasty trick!

Epilogue

The bug was fixed quickly, but we thought again about one of the interesting examples in “How To Write Unmaintainable Code”, specifically the one titled “Code That Masquerades As Comments and Vice Versa”.

Syndicated 2005-11-24 11:29:40 from Raphaël's Last Minutes

Visited countries

Following the meme started on planet.debian.net (but one week late), here is a list of countries that I have visited…

Rather dense in Europe, but unfortunately not much outside of it. I am planning to change that.

North America is shown as one big piece, but to tell the thruth, my visits to Canada have been limited to Quebec (plus one airport stop that doesn’t count) and my visits to the US include only CA, AZ, NV and UT (plus DC and IL if you include airports). Note that the isolated red dots (islands) around Hawaii are incorrect and came as a side effect of selecting the US, but most of the other ones are correct.

Update: Two months later, I managed to fix the title of this entry. It turns out that NewsBruiser gets sometimes confused with its authentication cookie and displays the unhelpful error message “Error: I don’t think you meant to enter that as the title.” if you put anything in the title. Submitting an entry without title worked, though. Solution: go to the configuration page, select “Security”, re-enter your password and enable or disable the authentication cookie. After that, you can enter titles again. <sarcasm>Why didn’t I think of this obvious solution before?</sarcasm>

Syndicated 2005-09-22 13:02:42 from Raphaël's Last Minutes

32 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!