Kopete saga

I have spent a good part of today trying to configure Kopete to my likings. Kopete is an instant messaging client that supports a number of protocols – ICQ, IRC, Yahoo, MSN, Jabber, and others. It is also integrated into KDE, which I am using for a few years now.

Out of all the IM protocols I mainly use only two – ICQ and IRC, and have a registered account in another one – Yahoo. Before my today’s saga with Kopete I was using Licq for ICQ and XChat for IRC. Both of these programs work fine, but lack any serious integration with KDE. So I decided to try Kopete 0.9.1, the one that was shipped with updates for my distribution – Fedora Linux Core 3.

So, I fired up Kopete and configured my ICQ, Yahoo, and IRC accounts. Account configuration dialog is pretty straight forward so this part was fast and easy. The moment I asked Kopete to change status of all accounts to ‘Online’ I found the first problem. IRC account couldn’t connect to the server. It was repeating that I was ‘marked as Offline’. Fortunately, I knew about this problem which was related to small socket timeouts settings. To fix this problem, start kcontrol, select Internet & Network menu and click on Preferences. There you will find four timeout settings: Socket read, Proxy connect, Server connect, and Server response. Probably you need only the Server connect option, but I went as far as increased all four of them to the value of 1800 seconds. After that my IRC account started working just fine.

Now I was ‘Online’ with all three accounts. It was time to look closer at what I get. Immideately I found the second problem. My ICQ contact list wasn’t syncronized with the server. I searched the web for a bit and browsed through all the menu items, but for no avail. I have about 30 people in my contact list and I almost thought of importing them manually. Not with my hands, of course, but with a script which could read Licq format (a bunch of plain text files) and write Kopete format (XML file). But the problem is that I also use ICQ from my mobile sometimes and there is no way I can syncronize the ICQ contacts with that device. Also, why should I do it when it is supported by the protocl itself? Anyway, I decided to deal with this later and imported about 5 contacts by hand just to play with Kopete.

I sent a few messages in Englinsh to the friend of mine who was online and it was working just fine. Than I tried to use Russian with another friend of mine. Somehow, he could read my messages fine, but I was recceiving garbage when he was writing to me. I played with fonts and encodings a bit, but nothing helped. I decided to leave this out for some time and continued with other things.

While playing with encodings, I was also going online and offline back and forth. I also closed Kopete a few times. And there I go with another misbehavior. Kopete couldn’t determine the status of my ICQ contacts correctly, showing a small error icon near all of them and marking all of them as ‘Not Available’. That was bad. I messaged one of the contacts asking if he was available and he said that he was Online. I double checked it with Licq and indeed he was. A bug. A really bad one, driving the whole ICQ support to unusable.

Fine. I proceeded with IRC. IRC worked good, but I wanted to configure it to look and behave like I wanted it too. Basically, I wanted something very similar to what XChat offers. The XChat theme was shipped together with Kopete so I tried it. It was good but not perfect. I tried to play with colors, but it wasn’t enough. So I copied the XChat theme to Leonid and tried to Edit

At this time I was pretty disappointed with Kopete and there was only a small chance that I would continue to use it. The last thing that I tried to configure was notification management. What I tried to do is not to have any notifications for IRC, but have immidate focus switch and raised window for ICQ. That proved to be impossible. The best I could do is no notifications for IRC and a ‘New message’ ballon from the taskbar for ICQ.

That was enough. I closed Kopete, fired up Licq and XChat back again and decided that I will not touch Kopete for another couple of years, until it will get much better. Sad but true.

How To Write Unmaintainable Code

In many places Perl is called an unmaintainable language. People with brains know that you can write unmaintainable code in any programming language what-so-ever. People who are familiar with Perl know that it can be used to write the uglies code ever, or the most beautiful code ever.

Aside from Perl discussion, here is an excellent document that shows how to write totally unmaintainable code in Java. Most of the rules are generic enough to be applied to any language.

I just hope you will never, for the sake of the humanity, follow any of the rules described.

mplayerplug-in

By the way, if you are still using an old way of watching movies from the web, which involves downloading a film and than playing it or associating the file extensions with some programs, than you should try the mplayerplug-in. After you install it, your Mozilla browser (yes, that includes Firefox) will play all sorts of movies in a small part of your browser. You will also be able to control it with usual slow motion, pause, rewind, fast forward, and stop buttons, as well as toggle fullscreen mode. Download either a compressed TAR archive, or an RPM for your version of the Fedora Linux. Screenshots are also available from the site.