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…

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.

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.

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" /><%

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" /><%
    // }

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!


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”.

Visited countries

Following the meme started on (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>

ADSL adventures, part 2

Once I managed to get the necessary information for configuring my Speedtouch 350 DSL modem (see part 1), the next logical thing to do was to start using it. Or at least try to.

The first problem was that Belgacom apparently never sent me the letter containing the user name and password that I was supposed to use for accessing their services. After spending a few minutes on the phone (that music sounds familiar) I got a login and password that I could use. Well, that’s what I thought. I learned later that what I got was not the login/password pair that I asked for, but just a pair of passwords (for PPPoE and for POP). No login. Doh!

My second call to the support center (ah, that music again!) was barely more successful: this time I got a user name and a (new) password, but again I discovered later that the user name that I got was incomplete (last characters missing).

The third call was more interesting. After 20 minutes of music (I really know it by now), a technician told me about the missing characters in my user name and asked me to try logging in while he was monitoring their side of the DSL line. This time, the PPP authentication was successful but then the PPP connection went down immediately after that. Strange! The modem re-tried a few seconds later, with the same results. And again, and again… After a few more minutes of debugging, he told me that he was resetting their card and asked me to power-cycle my modem. I did that and when the line came back, the connection worked and I was able to access the Internet. Oh joy! But I also noticed something else while looking at the system log of the modem: the connection speed after the reset had dropped from 3 Mbps to 1 Mbps. I mentioned that to the guy, who said that it was normal. Ah well, at least the ADSL connection was usable so I was happy (after wasting two hours on that).

According to a colleague who had a similar experience, the reason why my line went down immediately after a successful authentication was related to the 3 Mbps. By default, the DSL access is configured for 384K/3M up/down. But the offer that I had accepted had a cap at 1 Mbps (apparently, because I never got the letter with the details of the offer). Although the telco part of Belgacom handling the DSL access was happy to let me in with 3 Mbps, the ISP part of the company was not happy with that and dropped the connection immediately. That could make sense, but I am still wondering why the access line had not been configured correctly on their side in the first place and why it took so long for the problem to be identified. Ah well, at least I can use my connection now… And I am glad that I could do all the tests using the built-in web interface of the modem over Ethernet instead of USB. I’m wondering what would have happened if they had required me to use some Windows software for configuring the stuff.

ADSL adventures, part 1

A few weeks ago, I got a call from a telemarketer about a new ADSL
offer from Belgacom/Skynet (main telco and ISP in Belgium). I did not
hang up immediately and I even accepted the offer. By now, you
probably think “sucker!” and you may be right, but that’s not the
point of this blog entry. After a bit of discussion about this offer,
he asked me what version of Windows I was running and I said “Linux”.
Hmmm… Two minutes of please-do-not-hang-up music later, he was back
and said that everything should work fine with Linux and my “free”
modem would be delivered soon. So far so good.

One month later, after returning a package containing the wrong
modem (USB only), I eventually received a package containing the right
one (Speedtouch 530, with both Ethernet and USB ports), some cables,
ADSL filters and CD-ROM for setup and documentation. That CD-ROM
surprised me, as it appeared to be empty. Strange… It was mounted
without errors, it had a label and a non-zero size, but there was
something missing: the files.

After a bit of investigation, it turns out that the CD-ROM had both
Joliet (Windows) and Rock Ridge (UNIX) extensions. But the Rock Ridge
extensions were hiding every file on the CD! So mounting this CD on a
Linux machine (or Solaris, MacOS X or other UNIX systems) shows an
empty filesystem. From a Windows system, everything looks fine.
Fortunately, mounting the CD with the option -o norock
allowed me to access its full contents. I did not care much about the
drivers for Windows included on the CD, but the whole documentation
including the basic hardware and software setup instructions could
only be found there. Without that documentation, it would have been
hard to guess that I had to use the address in order to
access the configuration menu of the modem.

I found out later that I could get this information and much more
by visiting the Speedtouch web
directly instead of relying on the CD distributed by
Belgacom. But still, that CD was interesting considering that I had
specifically asked for Linux support…

By the way, if you want to create such a CD, you can play with
mkisofs and the options -hide and
-hide-joliet. I have used these options a few years ago to
create useful CDs that were showing README from Linux and ReadMe.txt
from Windows (with DOS CRLF line endings). But you can also use these
options for creating broken CDs, if you really want to alienate your

XHTML2 and the noscript element

More than two years ago, I reported an issue to the XHTML working group: the specifications for all versions of HTML and XHTML (up to the XHTML2 draft that was current at that time) forbid the usage of the <noscript> element in <head>. As a result, it is difficult for a page author to have a fallback solution in case scripting is disabled and the header of the page contains a script generating a link to a style sheet or generating the title of the page. Well, in reality it is possible because all browsers support the usage of <noscript> in <head>, but this is not allowed according to the HTML and XHTML specifications.

The main issue is that due to the way the DTDs for the various versions of HTML and XHTML were defined, the <noscript> element could only contain elements allowed inside <body>, but not the elements allowed inside <head> (such as <link>, <title>, <meta> and <script>). So <noscript> was simply not allowed in <head>.

I was pleasantly surprised when I received an e-mail message yesterday telling me that this issue had been addressed some time ago in the XHTML2 draft but they forgot to notify me earlier. The way this issue was solved (together with other related issues) is interesting: they introduced a new Handler module to XHTML2, defining a <handler> element that basically replaces the old <script> and <noscript>.

This is nice. But I’m wondering how long it will take for XHTML2 to become an official standard, and how long it will take before XHTML2 is implemented in the browsers and used by web designers…

Back from GUADEC

GUADEC 6 in Stuttgart was a great event, as expected. Compared to the first GUADEC in Paris, some things were a bit different (the way the event was organized, the number and size of the sponsors, the keynote speeches, etc.) but many things were the same (great hackers presenting their stuff, great discussions after the presentations). Talking with people was probably the most important part of that event: meeting other GIMP developers and also some hackers that I had not met before. Now that I have recovered from the party(ies) and lack of sleep, I could write a lot about GUADEC. But instead, I will make it short and just say that it was a lot of fun.

I came back from GUADEC with more than 600 MB of photos. I still have to find a way to publish them somewhere, in case some people would like to see their pretty faces (or not so pretty, especially after the party). Anyway, I will take care of that when I am back from vacation and from a business trip, so that will not be done in the next two weeks.

Joining the blog meme on

Well, well, well… So I have been somehow convinced to join the fun here on This place looks nice.

But I have to admit that I am not good at blogging. I just imported the previous entries from my Advogato diary. The last one was from February 2002. The previous one from February 2001. These dates should say something about how active I have been in the last few years.

I am not sure that I will have interesting (or even uninteresting) things to say here on a regular basis, but who knows? Maybe I will update this journal more than once a month and not abandon it after a couple of months? Only the future will tell…

Attribution-ShareAlike 3.0
This work is licensed under a Attribution-ShareAlike 3.0.