Thursday, December 28, 2006

Writing software for maximum system compatibility

For historical sake, here is a link to a program that compiles/runs in five languages. I'm sure it could be modified to also include whitespace.

Wednesday, December 27, 2006

The end of KDE (for me)

For the last two weeks I have been stuck using KDE at work due to a lack of Internet access. This was quite good as it gave me a chance to evaluate it as I haven't properly used it for many years. I'm using Kubuntu Edgy.

What I like about KDE:
  • Tiered menus - The KDE games menu subcategorises so that there are about 10 games in the base menu after installing the Gnome games. In Gnome the menu is huge.
  • KSysguard is great - you are able to monitor all sorts of system signals (CPU, memory, sockets...).
  • Kontact. Clean and simple it was immediately obvious what it did as soon as you opened it.
What I don't:
  • KDE has far too much information. Right click on anything and you get hundreds of options. Each menu entry is a short sentence - it's like reading a page of text for every menu.
  • Annoying use of on-top splashscreens.
  • Excessive, excessive use of 'K'. Either name things imaginatively or descriptively. It's very hard to scan through a menu with everything Kthis and Kthat.
  • KHTML. Not practical for actual WWW use.
  • QT frames - the old fashioned surround everything with lines. Visual clutter that looks terrible against GTK+ frames (bold headings, no lines).
  • Apply buttons. Just unnecessary.
  • Katapult. No idea what this does. It just opened a splashscreen, no obvious information on what it is.
  • The animation effects seem inconsistent.
General problems in both KDE and Gnome:
  • Apps shouldn't automatically quit if they can't be immediately useful, e.g. xsane. I think it creates a bad experience if you can't see inside programs. In this case it should state there are no scanners and just disable the scan button. What if you wanted to connect a scanner while the program was open?
  • Add the example content directory as a shortcut on the file open dialogs. Often when playing with a new app you just want to open something. There is a lot more content that could be added - anything that can be opened should have a default file.
And the final straw for me is printing a test page to the local printer. I incorrectly entered the URL as ipp://host which caused the printer to print out the ipp traffic as text. That's fine, it doesn't speak IPP. However since the printer was not sending back any responses it continued to send out more printing requests. Thirty pages or so I finally stopped it by doing killall ipp. This may be KDE specific or it may be CUPS specific but it's unacceptable. Test pages should only be retried by the user and the GUI should indicate if it's printing multiple pages. This seemed to bypass the CUPS queue so nothing was indicating where these print jobs were coming from. Printing has a long way to go before it works-out-of-the-box.

In summary; I didn't like KDE a few years ago and I don't now. It's got the details but still the basics are annoying. It's too cluttered for new users to find easy and for power users like me it's full of cruft that gets in my way.

Now installing Gnome...

Saturday, December 23, 2006

Google Analytics

I just set up Google Analytics for my web pages the other day. Easy to set up and nice, interesting results.


Looks like I have a Norwegian fan club!

This blog looks like a sub-set of the above.

An interesting thing I noted is a reasonable amount of traffic is coming from GetDeb - a click-n-run style repository for Ubuntu I had not heard of.

Friday, December 22, 2006

What is wrong with computer scientists?

Today I spent pretty much all my time trying to get fricking Java to convert a 1D buffer of 8 bit colors (i.e. RGBRGBRGBRGBRGBRGBRGB...) into a viewable image. But no, Java has to abstract everything to death into Raster, DataBuffer, BufferedImage, ColorSpace, ColorModel, ComponentColorModel ... ad nauseum. There's been more or less no progress since I started. I still have a buffer in a perfectly valid format and it still isn't rendered.

Why can't it be as simple as this?

BufferedImage image = new BufferedImage(TYPE_BYTE, FORMAT_RGB, width, height, data);

Surely for a tool to be useful simple things should be simple and complex things should be possible. *sigh*

Sunday, December 17, 2006

Summary of current open-source chess programs

XBoard is the old classic. Probably quite functional for experienced users but not very friendly and needs to be retired.

eboard is the XBoard replacement (?). I would have assumed it's dead but checking the site it seems a GTK+ 2.0 version is about to be released. It probably has the functionality that I've been aiming for with glChess but not the simplicity.

Scid is a database and analytics tool for hard-core chess players. It hasn't been updated since 2004.

Chessmonk is a modern replacement for Scid. It's still in early development.

Gnome Chess is long dead.

glChess is the new Gnome chess...

Pychess is the other modern chess interface for Gnome. We talked about merging but their goals are more power-user where mine are more simple. They've just release 0.6.0 - will look at "borrowing" any useful code!

Knights is the KDE interface. Looks fine and plan to check compatibility with it.

Slibo is a 3D chess application for KDE. It seems to be dead but the board looks a lot nicer than the glChess one. So should look into salvaging materials, reflections, shadows etc.

Brutal Chess is in the early stages of development. I think they're aiming for mostly graphics.

Dream Chess has very nice full-screen 3D graphics. It's early in development.

So when you list them all the market looks quite busy. I guess I predict that the old hands will fade away and we will be left with chessmonk+pychess, glChess and Knights as the dominant programs. But you never know...

UPDATE: 17 Dec - Added Chessmonk which is the program pychess is working with

Saturday, December 16, 2006

OMG 1.0!

Well it's happened... After 7 years of mucking around glChess has hit 1.0! Many thanks to all those who have contributed patches, artwork, ideas and translations. This release transfers development from the new Gnome version. I plan to backport changes periodically and not add any hard dependencies on Gnome. subversion change

I'd been having trouble committing changes to the glChess subversion repository as I was getting HTTP 403 Forbidden errors when adding/moving/deleting files. After digging on the site status page I found that the subversion access method had changed:

  1. Back up your repository

  2. svn switch --relocate

Works for me.

I'm not sure if I'm not reading the email that gets sent out but keeps changing things and it takes a bit of digging to find what's changed.

Sunday, December 10, 2006

Universal Chess Interface

I think I finally have glChess working with proper Universal Chess Interface (UCI) support. After testing with the Fruit engine I found I'd made an assumption in the specification - UCI engines do not have to keep track of the board state. This section is not clear so I've sent an email to hopefully add some clarification to the document.

What I was doing was reporting each move as it occured, like:

position startpos
position moves g1f3
position moves d7d5
position moves e2e3
position moves c8g4

This worked fine for Glaurung, as by not specifying startpos it must have just appended the moves to the existing ones. However for Fruit it would assume 'startpos' was missing thus every move reported was considered the first move.

So the solution is to send every move before requesting a new one like this:

position startpos
position startpos moves g1f3
position startpos moves g1f3 d7d5
position startpos moves g1f3 d7d5 e2e3
position startpos moves g1f3 d7d5 e2e3 c8g4

Seems a little inefficient? I guess that the engines could do a string compare to check if this position command is just reporting one new move.

I've tested the new changes by letting Fruit and Glaurung fight it out:

It was just painful to watch - Fruit had to twist the knife by slowly promoting two pawns to humiliate Glaurung. No love lost between these two.

UPDATE: Dec 16th
I emailed Stefan Meyer-Kahlen at and he confirmed that UCI engines are completely stateless and thus the correct behaviour is to send all the moves each time.

Wednesday, December 06, 2006

Shamelessly stolen links

Some stuff picked up from Planet Gnome: