dinsdag 12 oktober 2010

Upgrading to Ubuntu 10.10

One of the tings I like the best about Ubuntu, is its six month release cycle. If there's a problem with an application, chances are it will be fixed within a matter of days. However, if things are so bad that they can't be fixed with a simple update, six months isn't such a long period to wait. Often that's just what I do too, instead of trying to install another application.

What's an even bigger joy with the six month release cycle, is that you always have a lot of new and better functionality to long for, but without being as disruptive as e.g. a Windows update tends to be. Compared to the hassle it was every time I had to upgrade to a newer Windows version, upgrading to another Ubuntu release is as easy as eating cake. That doesn't you don't need to make back-ups before you start to upgrade, but you won't need to spend a lot of time trying to find applications that are compatible with your new OS and at the same time can handle your old files.

There are, however, always small things that have to be done once you've upgraded to a new release of Ubuntu. Most of them are simple reconfigurations. Here's a list of things I had to do after upgrading to Ubuntu 10.10:

  • For one reason or another, the GLText screensaver configuration has been set back to a default text showing the name of my computer and the version number of the kernel in every single release. As a consequence, I'm getting good at setting its configuration file /usr/share/applications/screensavers/gltext.desktop back to include the line Exec=/usr/lib/xscreensaver/gltext -root -no-wander -no-spin -program "<my-custom-script.sh>"

  • Adding all accounts to Gwibber again. I was of course expecting having to reauthenticate, but erasing all information about all accounts just seems very clumsy. Besides from that, the new version of Gwibber seems to be a big improvement.

  • I had to change the default proportional font in Thunderbird back to serif. For one reason or another, it had fallen back to sanserif.

zaterdag 1 mei 2010

Customizing Your Keyboard Layout in Ubuntu 10.04

In Ubuntu, it is possible to customize your keyboard layout in a very simply way. In fact, all you have to do is find the right configuration file, make a few changes, and you're done. Here's how you can customize your keyboard layout:

First, you'll have to find the file that defines your keyboard layout. In Ubuntu 10.04, these files are located in a directory called /usr/share/X11/xkb/symbols. Most files use a land code as a name, with the exception of some vendor specific definition files, and a few more generic ones.

The format of these files is pretty self-explanatory. Most files define a basic layout, which is the default one, and some variations. Each layout can include another layout from the same file, or from another file. Keys are defined by their row and column name, and can contain up to four values (in the simple case). The first value is the character you'll get when you just press the key, the second one when you combine the key with the Shift key, the third one when you combine it with the Alt Gr key, and the fourth one when you combine the key with both the Shift and the Alt Gr key.

In my particular case, I use a standard Norwegian keyboard, i.e. the basic layout in the file called no. Since I have to write mails in Esperanto from time to time, I need access to characters like «ŝ» (s with circumflex) and «ĉ» (c with circumflex). They are easy to produce on a standard Norwegian keyboard in Ubuntu: just press the dead circumflex key («^») first, and s or c afterwards. The circumflex key is called “dead” since it doesn't produce a character until another key is pressed. It's more difficult to produce «ŭ» (u with a breve)—in fact, as far as I know, it's impossible to produce it directly from a Norwegian keyboard.

For me, it makes the most sense to put the dead breve key («˘») together with the dead diaeresis key («"»), the circumflex and the tilde («~»). There is however no definition for the dead diaeresis key in the Norwegian keyboard layout file, so that's not where we have to make our change. In fact, since the basic Norwegian keyboard layout uses latin(type2) as its basis, we'll have to look in the latin file and see whether we can find the definition of the diaeresis key there. In fact, it's right the in the type2 definition, at the following line:

key <AD12> { [dead_diaeresis, dead_circumflex, dead_tilde, dead_caron ] };

Indeed, the dead diaeresis key is on the fourth row (encoded as AD), and the 12th key from the left. Now how can we change this definition to produce a breve instead of a caron («ˇ») when we combine the key with Alt Gr and Shift? In order to do that, we'll have to change the definition as follows:

key <AD12> { [dead_diaeresis, dead_circumflex, dead_tilde, dead_breve ] };

In order to keep the dead caron key, we could also change the definition for the AD11, the key that normally produces the Norwegian letter å, as follows:

key <AD11>{ [ aring, Aring, dead_abovering, dead_caron ] };


Once you've made the changes, save the file, and reboot your computer in order for the changes to take effect. When the system comes back up, you should be able to produce the character «ŭ» using the diaeresis key in combination with Alt Gr and Shift, and typing u afterwards.

zondag 28 maart 2010

The Moment I Realized I Had Become a Senior Developer

The following story dates back from a couple of years ago. A colleague of mine was experiencing a problem with a system we were working on. Most of the time, things were right, but from time to time, the system gave the wrong answer to a query. A quick investigation revealed that the method to calculate the result was right, but sometimes the wrong result seemed to come out anyway. The strange thing was that when the system replied with the wrong answer, it was in fact the correct answer for another query sent to the system. My colleague really didn't understand what was going on, so she called me to investigate the problem.

The little detail that the system returned the correct answer to another query, was in fact a important clue to solve the mystery. After browsing through the code for a few minutes, I found out that one of the attributes in a class was marked static. As a result, the system returned the result for the last query that entered the system, even if you asked for the result of a previous query. And that was the kind of bug I was expecting from the beginning: to me, the problem had the smell of static confusion all over it, even though I couldn't say exactly why.

My colleague was impressed, and literally asked me how I could know such a thing. The only answer I could come up with was that many years of creating many bugs had given me much experience in finding out why something was wrong. I guess that's the essence of being a senior developer too...

vrijdag 5 februari 2010

So Once Again Somebody Is Predicting the Death of Microsoft

Former vice president of the company Dick Brass wrote in an op-ed titled “Microsoft's Creative Destruction” in The New York Times yesterday why he thinks Microsoft hasn't much of a future. His analysis is that the company isn't on the innovating edge anymore, and is therefore failing. He attributes this failure to the internal competition in the company, which kills innovation whenever it comes from another department, and concludes that unless the company changes its internal company culture, it will lead the same faith as G.M.

I don't think Microsoft is going to disappear any time soon, even though I put in some effort in 2009 to get it out of my house and wouldn't shed a tear on its death. Microsoft is just too big to disappear over night – but not in the same sense as how some banks were too big to fail. Just imagine what would happen if Microsoft would shut down all its R&D activities, stop any further development of its Office product, not work on a new version of the Windows operating system to replace Windows 7, etc… Even if something like that would happen, people will still want to buy computers using Windows, because that's what they're used to. Similarly, people will continue to use and buy Office, both at home and in the office, because that's what they're used to. Moreover, they have lots of documents that were created in its formats, and don't want to bother to convert them to another format. And many new software products based on the .Net framework will still be developed for many years to come.

We now know that the Titanic could sink after all. But we also know that the sinking process took almost three hours, not just a few minutes or seconds. Therefore, I expect that Microsoft will still be around by the end of this year, and the next years. Maybe it won't be a monopolist any more, but at the very least it will still be one of the dominant players in the software business, whether you like it or not.