Monday, March 29, 2010

GCalctool 5.30

GCalctool 5.30 is now released. Gcalctool is the default GNOME calculator and this is also the default in Ubuntu.

Both GNOME and Ubuntu use a synchronised six month release cycle.

  • The great thing about regular releases is... Predictability!

  • The bad things is... You may not get all the features you wanted done in one cycle...

Here's my summary of what to expect in GCalctool 5.30.

The good:

  • The display now acts like a standard text entry (no obscure shortcut keys)

  • Equations look like correct mathematical syntax (π, |−4|, 6×10⁻², sin⁻¹ x, 2x²y, 3E₁₆)

  • Polynomials can be solved (x²+2x−4, (x+1)(x−2))

  • There is no limit on the number of variables (x=55, value=21)

  • Bases can be mixed in the same calculation and any base between 2 and 16 can be used (120₃+3E₁₆)

  • Units can be converted (3 feet in centimeters, 3.22 EUR in AUD)

  • The help is now topic based (Mallard format)

  • The UI has less visual clutter:

The bad:

  • Hexadecimal numbers are harder to enter (you need to explicitly add the base 16 suffix (Ctrl+H) to them).

  • Variables can't be removed (the workaround is to edit ~/.local/share/gcalctool/registers)

  • There is no support for functions (you should be able to enter f(x)=6x+2, f(3))

  • There is no GUI for non-currency conversions (use the keyboard)

  • Complex numbers weren't working in time for release:

The ugly:

  • Converting between number bases is unintuitive (enter number then press base buttons to change)

  • Programming mode is a mess of buttons (needs complete redesign for GNOME 3.0):

  • Financial mode is crying out for some graphs (it would be better to show financial models and adjust the values)

Saturday, March 06, 2010

Simple Scan 0.9.6 (1.0 Release Candidate)

A few days ago I released simple-scan 0.9.6. This version is the 1.0 release candidate.

There are two things I'd like to fix before 1.0:

  • There may be some issues with scanning from an automatic document feeder (ADF). Please comment on bug 512553 if you are having problems. (I don't have an ADF to test).

  • The generated PDF files do not JPEG compress the images. This is because the Cairo renderer does not support it. If you know of a C accessible library that can do this or even how to hard code this (the PDF files are just a single image per page) then please comment on bug 534122.

Tuesday, March 02, 2010

Friday, February 19, 2010

Jobs at Canonical

If anyone is looking for an open source job at a great company, make sure you check out the available jobs at Canonical. There are 34 open at the time of writing. I found about my job on Planet GNOME a year ago and I'm glad I did!

Mallard Documentation


GCalctool now has a new help document in Mallard format. This is my second Mallard document I've written, the first was the help for Simple Scan.

Wow. Mallard is really, really easy to use!

Mallard documents are topic based which basically means writing a few paragraphs on each activity your readers can do with your application (like how to use trigonometric functions or an automatic document feeder). I wrote the topics over a week with a text editor and marked them up at the end.

Testing is great. Just run yelp with the directory the files are in to browse the documents immediately.

If you want to contribute, take the ten minute tour, pick your favourite GNOME application, ask if they've got documentation that needs updating and get writing!

(I recommend starting by copying an existing document; I used the gbrainy help as a basis for the Simple Scan and GCalctool help).

Thursday, February 18, 2010

AdWords Experiment

Google keeps bugging me to open an AdWords account (via Google Analytics, which is a lot of fun). So with my $75 free* credit I am going to join the advertising game and advertise this blog! It will be interesting to see how powerful advertising is...

So, if you got here via a Google ad. leave a comment!

Maybe I should have advertised a rickrolling site instead... :)

*Free if you include having to spend $20 to set up the account.

Monday, February 15, 2010

gdm2setup

Tired of not being able to configure many settings for GDM in Karmic? Two community members; Garth Johnson and Nick Glynn have developed a great tool called gdm2setup which gives you a lot more control:


Try it out from their PPA!

Saturday, February 13, 2010

Simple Scan 0.9.0

Here it is; feature complete and just some minor bugfixes from 1.0:


If you haven't tried it, it comes by default in Ubuntu 10.04 (Lucid), you can enable the PPA in Ubuntu 9.10 (Karmic) by going to System>Administration>Software Sources>Other Software>Add and adding ppa:robert-ancell/simple-scan then installing the simple-scan package.

Any other GNOME system should be able to build it from source.

From now to 1.0 I wont be adding any new features, just fixing bugs and polishing.

Post 1.0 the major features I'm most interested in are colour management, optical character recognition, integration with gscan/gnomescan, integration with photo management software and storing density information in saved files.

Please help if you can!

Thursday, February 04, 2010

Linux.conf.au 2010

Here is a summary of the interesting things I saw at Linux.conf.au 2010.

Interesting Projects


Weta Digital (i.e. the New Zealand graphics company behind Lord of the Rings, Avatar) about their 35,000 core server farm all running Ubuntu! And if you want to do some rendering with the old server farm Green Button bought it any you can render directly from Blender at 1c US per CPU minute.


Albany Senior High School is a New Zealand school who have successfully implemented an entirely open-source infrastructure running Ubuntu Desktop and Mandriva servers.


The Village Telco project showed off their Linux based VoIP mesh network solution for small villages.


There seemed to be a rocketry/Linux theme going on. The White Label Space project talked about their ambitious space program funded by advertising and the TeleMetrum project talked about using Linux and open hardware to make telemetry for amateur rocketry.


FOSS and Proprietary Software


Jeremy Allison from Samba talked about the elephant in the room (Microsoft) and how we shouldn't forget their threats against open-source, especially in the light of the recent Tom-Tom patent lawsuit. However he also said that the best thing to do was keep making better software as not doing that is the more likely reason for us to fail.


Benjamin Mako-Hill talked about Antifeatures - in where he described how proprietary software often comes with features you don't want (e.g. digital rights management) and how you often have to pay to remove these features (for example paying extra money to Sony to get a computer without crapware).


I sat in on some government and open-source talks and the short answer seemed to be "policy was good but not seeing major uptake".


Technology


Python 3.0 looks really well managed. There are a number of tools now available to transition from Python 2.0 to Python 3.0 and even tools to produce Python 2.0 compatible applications from a Python 3.0 codebase. The improvements by Google in Unladen Swallow are planned to be integrated into the official Python 3.0. There will be no syntax changes until Python 3.3 (a duration of two years) which will encourage Python 3.0 uptake.


The PyPy project talked about what they do. I thought they were a Python interpreter implemented in Python but in fact they are Python interpreter generator. That can generate different types of interpreters (e.g. stackless)... For different targets (e.g. C code, .NET, Java bytecode)... for different dynamic languages (e.g. Perl). So a really interesting technology. They see themselves as more of a research project at the current time.


In graphics the Cairo project talked about accelerating 2D on the GPU. The Clutter project mentioned their release cycle is now synchronised with GNOME/Moblin.


The pandora-build project talked about how they'd made autotools easier to use. A quick survey of the audience showed everyone uses autotools but no-one understands it. By using pandora-build you can write less autotool magic (pandora sets up sane defaults and provides simple macros for common things) and are have a more portable build system (pandora handles multiple versions of autotools).


Distributions


Lucas Nussbaum talked about the Debian QA team and tools (e.g. Ultimate Debian Database, debcheck, piuparts, lintian, DEHS, bapase, MIA team) they have produced to keep track of what is going on in Debian. He also talked about the relationship between Debian and Ubuntu which seems to be in reasonable state. There was some concern that Ubuntu did not provide many resources to help Debian and that Debian did not want to become Ubuntu's "package supermarket".


The vcs-pkg project showed their aims in making moving patches between distributions easier.


The Launchpad developers talked about how they are improving integration with external bug trackers and translations.


And finally; When the videos are available I highly recommend watching Glyn Moody's keynote talk. He talked about how open-source has influence other revolutions of sharing that have occurred in the last 30 years. He skilfully shows how FOSS is more than just about software.

Friday, January 15, 2010

gbrainy in Lucid

Ubuntu Lucid Alpha 2 has just been released and a new addition is the mind puzzle game gbrainy.


You can read more about the latest release in a blog post by Jordi Mas (the author).

gbrainy is a great game and we want to find any problems before final release so please try it out! If you don't already have it installed then you can get it from the Ubuntu Software Centre (search for gbrainy).

If you find a problem the best thing to do is file a bug in GNOME. If you don't have an account on GNOME Bugzilla but do have a Launchpad account you can file a bug against Ubuntu. I am working on getting the "Report a Problem" menu entry into the help menu which will make this even easier!

Have fun!

Monday, December 21, 2009

Translate Simple Scan

One of the great features of Launchpad is how easy it is to translate applications. Make sure you have a Launchpad login and then you can translate Simple Scan from your browser!

Your translations need to be reviewed by the Ubuntu Translators team, if you are a member please review any translations!

Here is the UI for 0.7.6 in Romanian:

Tuesday, December 15, 2009

The demise of the function key


I recently upgrade to a new Dell Studio 15 and retired my old Inspiron. One thing I've noticed is the function keys are now secondary - these keys are now multimedia/system functions by default and you need to use the blue Fn key to activate the old F1-12 behaviour. Other Dell and Apple laptops (at least) seem to be doing the same thing.

Is this the end of the function key? The Litl keyboard got rid of them entirely. The key combination to use them on my laptop is sufficiently difficult that they might as well not exist for me.

So this leads me to the conclusion:
- I can never rely on function key shortcuts in any software I write.
- The existing window management shortcuts (e.g. alt-F4 to close window) don't work anymore. Now I understand when people complain how applications don't consistently bind the same key to close window (Ctrl+Q or Ctrl+W or something else or nothing?).
- At the Lucid UDS we discussed Compiz keybindings - often these were bound to function keys. I notice the macbook uses the old F3 key for "show all windows". I hope some standard could emerge for these functions on PC keyboards.

I can't say I'm going to miss them overly.

Friday, December 11, 2009

Introducing Simple Scan

One of the goals I want to achieve for Ubuntu 10.04 (Lucid Lynx) is to make scanning really easy. So I've been working on Simple Scan:



Please try it and report any problems you have.

To install add the PPA and install the simple-scan package or build from source.

The GUI is a mess

Yes. This is the first functional release. The GUI is being redesigned for 0.8. The 0.7 release should contain all the functionality required for 1.0.

Who is simple scan for?

This application is designed for the 95% of users who just want to connect their scanner and quickly have the image/document in an appropriate format.

How does this relate to GNOME scan?

Simple scan does not use the GNOME scan to get the scan data. This is because Ubuntu 10.04 is a Long Term Support release and bringing the whole GNOME scan stack into main is risky (it was previously proposed for 10.04 but was not found to be stable enough). There is an open bug to change to gnomescan when that is appropriate.

Wednesday, July 29, 2009

format not a string literal and no format arguments

Some time ago GCC started producing warnings like this:

warning: format not a string literal and no format arguments

What does this mean? GCC is saying that a function in printf style has a format string that it cannot check matches the format arguments. Here is some common code GLib code that causes this error:

GError *error = ...;
g_error(error->message);


Why is this a problem? As error->message cannot be checked it may contain a printf flag sequence, e.g. "Invalid data: 'g^y#%s'" (i.e. %s) that would cause run-time to try and access a non-existent argument. It could be worse and the format string could be user-input that is attempting to exploit your program.

So the solution is to always use a string literal for formatting like this:

g_error("%s", error->message);

Wednesday, July 15, 2009

Gran Canaria Desktop Summit 2009

This year I was able to attend the Gran Canaria Desktop Summit which was great as I hadn't been to a GNOME meetup before.

Here are my impressions:

  • The community is very alive and active! There are many companies and individuals working on improving GNOME.
  • The GNOME foundation is well organised and financially sound. Donations are a big part of this success. If you contribute to GNOME in any way then become member (it's easy to join!).
  • Really impressed with the quality of PiTiVi — it's now a very capable basic video editing program. One thing the PiTiVi developers want though is a media manager...
  • ...which may be getting closer. Banshee is splitting it's backend out into Banshee Core which will be a database of music, video and photos on your computer. Hopefully there will be some convergence between this and tracker, zeitgeist and akonadi to provide a seamless user experience to your media.
  • GNOME Shell is still young but is showing some interesting breaks from the traditional desktop.
  • Project Mallard is going to make the GNOME documentation much better.
  • Testing initiatives like Mago and LDTP should see an increase in the quality of software.


The future looks really good!

Friday, March 20, 2009

New Job

So, tomorrow I finish my current job and move onto new things on Monday. I'm joining Canonical as a GNOME Desktop Engineer to work alongside well-known GNOMEers like Martin Pitt and Sebastien Bacher. A few years ago I hadn't seriously considered I could spend my day job working open-source so am very excited to get stuck in. Watch this space...

Tuesday, July 29, 2008

I'm Going To Scale My Foot Up Your Ass

A workmate pointed me to an article on the Register by Ted Dziuba about threads (one of my personal hates) which made me laugh out loud. This guy can really poke some fun at the buzzwords that float around the blogosphere.

So if you're not afraid of some fairly strong languange then check out his abuse against threading, scalability and serialization.

Sunday, May 18, 2008

Gcalctool 5.23.2

The GCalctool team is proud to announce the second release in the
unstable GNOME series.

The following changes have been made from 5.23.1:

  • The cursor now behaves correctly when editing numbers with thousands separators (Bug #527669)

  • Structural changes in preperation for full unicode support (Bug #530532)

  • Updated translations: es (Jorge González), gl (Ignacio Casal
    Quinteiro), nb (Kjartan Maraas), nl (Tino Meinen), pt_BR (Leonardo Ferreira Fontenelle), sl (Matej Urbančič)


The release is available from:
http://ftp.gnome.org/pub/GNOME/sources/gcalctool/5.23/

Wednesday, May 14, 2008

glChess on Win32

After a bit of hacking glChess can run on Windows. The only thing that would take major work is the AIs as they are forked off the main process (fork() is not supported in Windows). But aside from that with a few minor changes and running directly from the source leads to this:



I was very impressed with the quality of the Windows packages for the dependencies. When I tried this about a year ago it didn't appear they were all supported. They are now:

Python
* python-2.5.2.msi

Setuptools
* setuptools-0.6c8.win32-py2.5.exe

GTK
* gtk-2.12.9-win32-2.exe

PyGTK
* gtk-2.12.9-win32-2.exe
* pygobject-2.14.1-1.win32-py2.5.exe
* pycairo-1.4.12-1.win32-py2.5.exe
* pygtk-2.12.1-2.win32-py2.5.exe

Python Imaging Library
* PIL-1.1.6.win32-py2.5.exe

PyOpenGL
* PyOpenGL-3.0.0b1.win32.exe

PyGtkGLExt
* pygtkglext-1.1.0.win32-py2.5.exe

Gnome Games
* gnome-games-2.23.1.tar.bz2

Friday, May 09, 2008

Hello Planet

Since my posts are now being amplified by Planet Gnome I should take this time to introduce myself... Hi, my name is Robert Ancell and I am an open-source developer currently active in Gnome Games (particularly the chess game which I started many years ago and was merged into Gnome in 2.18) and I am the maintainer of GCalctool having taken over from Rich Burridge for the 2.22 release (I swear he sneaked that over to me when I wasn't watching ;) ).

In my more pays-the-rent side of life I am a software engineer having come from an embedded background and now working for a large financial organisation in Sydney, Australia. I get into open-source code when I have some spare time which leads to fairly unpredictable progress on projects (actually I normally find I have time after a release so I get a release worth of duplicates before the change is released - now that's Murphey's law!).

My goals for Gnome currently is to get the code I'm working on simpler and more reliable. This goal will inevitable slip when I find some flashy feature to introduce :).

p.s. I don't actually play chess so fear ye all who left me writing the Gnome version!

Apport/Bug Buddy disabled in Ubuntu 8.04?

After upgrading to Ubuntu 8.04 it appears my automatic bug reporting is disabled. Due to the number of Ubuntu sourced reports coming in for Gnome Games it can't be disabled on everyone's system... So a bit of investigation showed it might be apport. Looking in /etc/init.d/apport showed this was disabled so I enabled that by editing /etc/default/apport and set enabled=1. After /etc/init.d/apport restart I could happily file away a nautilus bug.

But wait a minute... That report went to Launchpad, not Gnome Bugzilla! (Wouldn't it be a nice world in which Ubuntu got the flood of duplicates for the things we fix but they never update </gripe>). It appears apport is only enabled during development so I shouldn't have had to enable it. I figure it is bug-buddy that normally catches bugs and sends to Gnome; is anyone else getting this/know how to tell if the crash catcher is running?

Sunday, April 20, 2008

Gcalctool 5.23.1

The Gcalctool team is proud to annouce the release of Gcalctool 5.23.1.
This release contains a number of bugfixes:
* Fixes a number of compiler warnings (Bugs #526976, #526702, #527318)
* Fixes incorrect negation precedence (Bug #526094)
* Fixes issues with thousands seperators and radix in non-english
locales (Bug #527669)
* Fixes regression in constant and function menus (Bug #527545)
* Fixes problem where display is invisible after solving equation
(Bug #524602)

Get it from:
http://ftp.gnome.org/pub/GNOME/sources/gcalctool/5.23/

Tuesday, April 08, 2008

Gcalctool 5.22.1

I was flicking through the GNOME reminders for the 2.22.1 release not really thinking then I realised for Gcalctool that means me... So on the last day I ran through the release instructions (very well written). Got through all the steps except make distcheck isn't working and I didn't have the permissions to upload (got the outgoing maintainer Rich to do that step).

Anyway; let the announcing begin!

The Gcalctool team is proud to annouce the release of Gcalctool 5.22.1.
This release contains the following changes:

  • Fix for bug where the initial zero in the display was not cleared (bug #520525)

  • Support bracket and multiply keys on non-english keyboards (bugs
    #521620 and #526671)

  • The replacement of sprintf() and strcpy() with the safer snprintf()
    and strncpy() (bug #520769)

  • Remove a .svn directory from the release tarball (bug #524025)

  • Updated translations bg(Yavor Doganov), en_GB(Philip Withnall),
    et(Ivar Smolin), pl(GNOME PL), sk(Marcel Telka).

  • New maintainer; Robert Ancell takes the reins from Rich Burridge.


Get it from:
http://ftp.gnome.org/pub/GNOME/sources/gcalctool/5.22/

Thursday, January 24, 2008

Wednesday, January 23, 2008

Linux is just great

Got this email from my father the other day:

Just to let you know that I think Linux is just great. I plugged in the old Cannon Printer and the HP 3300C Scanjet and they both worked without a hitch.

I think I installed 5.04 on my fathers laptop a few years ago. I upgraded him to 7.10 the other month (he would have been able to do it himself but I had to flash the bios to get rid of a password and enable CD-ROM booting). The only additional application he needs to add is Gramps (Genealogy). From the perspective of someone wanting things to "just work" each release has been definitely been getting better.

Saturday, January 19, 2008

The Gnome Foundation

Well I'm now a member of the Gnome Foundation and I'm about to take over maintainership of gcalctool. Looks like my plans to become more involved in Gnome is coming along nicely...

Wednesday, December 19, 2007

Sharing media with Xbox 360

My flatmate has an Xbox 360 so I thought I should I should work out how to share my media from my Ubuntu laptop...

Turns out to be pretty simple.

  1. Install ushare. There is a ushare and libdlna package to install

  2. Edit the config file in /etc/ushare.conf. Set USHARE_ENABLE_XBOX, USHARE_DIR and USHARE_IFACE

  3. Restart with /etc/init.d/ushare restart



Notes:

You don't need to add any routes that they recommend (as long as your default route is OK and you're only using one network interface). Remember to set the appropriate interface (in my case my wireless is eth1) as the USHARE_IFACE option.

The default config file in 1.1a had invalid config item names. All config items should start with USHARE_. The Xbox one did not in my default config file.

Sunday, December 09, 2007

Ubuntu Python Upgrading

The other day I went to a SyPy. One interesting thing I learnt from a Canonical employee I was talking to there is what caused a much duplicated glChess bug. The symptoms of the bug are basically glChess crashes on startup while upgrading due to not being able to import the glchess module. Unfortunately as an Ubuntu upgrade can take some time users tend to be looking for some small task to amuse themselves; say, playing a game :)

I'm not 100% sure of all the details but essential the following occurs when python files are upgraded in Ubuntu:
At some point in the upgrade the site-packages Python directory (which contains all the python modules to import) is moved/symlinked out of the way. This is done to avoid binary incompatibilities between .pyc files between Python versions. The .pycs are rebuilt and then the directory returns.

What this means for application developers like me... Files installed into bin/ directories remain so a user can launch the application but the libraries have dissappeared so the application will fail with an ImportError exception.

I'm not convinced the upgrade needs to be this dramatic as .pyc files are only a load optimisation but this means that the ImportError should be caught at the top level and the user warned they have an invalid install (a good thing to report anyway) or they are upgrading and must wait for the upgrade to complete.

Monday, November 19, 2007

Confused about sound on Linux?

I know I am... With the arrival of PulseAudio to join OSS, ALSA, GStreamer, aRts, ESOUND, NAS, Phonon etc etc it's a bit hard to see any clarity. A linux.com article clears up things a bit.

I seems to me the "standard" way for Gnome will probably be:
- Applications decode/generate audio using GStreamer
- GStreamer sends the audio to PulseAudio which performs volume control and routing
- ALSA drivers play the routed audio onto physical cards

All three projects have some overlap and do not require any of the others to work. OSS was replaced by ALSA. ESOUND was replaced by PulseAudio.

KDE is also using Phonon as a fourth layer for API stability and to allow applications an easy way to play sounds.

OpenGL 2.0



I noticed that since upgrading to Gutsy I appear to have OpenGL 2.0 support callable from Python... Since I've never done any OpenGL 2.0 and I have the Orange Book sitting beside my I should give it a try.

After hacking the installed libraries I got the early result of the shaders in the picture which shows hemispherical lighting (not possible in OpenGL 1).

It all seems to work quite well. I was working on some cell shading but changing shaders while drawing the scene makes everything go black. I hope it's not a driver/binding issue but something I'm doing wrong (can't work it out yet though). Hopefully sometime in the future there will be fluffy chess pieces too :)

As for putting this into glChess I think this one will have to be handled very carefully. There is enough bugs from differing OpenGL setups (and broken drivers) that the code will have to be very robust. When things start working better I'll add a secret gconf key that turns on the shaders for those in the know...

Tuesday, October 30, 2007

No more glchess.sourceforge.net

Well I finally got around to it and have removes glchess.sourceforge.net and the glChess launchpad account. They were very neglected and no longer appropriate with the work in Gnome. The sourceforge page now points to live.gnome.

That is all; move along.

Is Gnome for the 80%?

I work with Engineers with most of us running Ubuntu for day to day work. I however seem to be the only vocal supporter of Gnome. The loudest bunch of GUI users seem to be the KDE (Kubuntu) camp with the general complaint being "it's too simple/dumbed down" (also heard outside of work). My complaint with KDE is "it's too complex". :) The question is:

Is Gnome for the 80% of users like subversion?

I think that is the direction Gnome has been going in for some time and I think this is the direction Gnome should be going. In saying that I don't think Gnome leaves a power user like me high and dry. I like how Gnome keeps my day to day problems simple and for power tasks I stay in Gnome Terminal and use the odd app like Firefox, Gedit, Gimp, Inkscape, Glade and Meld.

Wednesday, October 17, 2007

Moving gcalctool UI to Glade

The another night the Gnome Calculator (another "core" open-source project without a website) was annoying me in how it has a separate memory register window. I'm a big fan of reducing the number of floating dialogs (unless there is a good reason to have them) so I made a patch to move this window inside the main window (Bug 485398). I blind tested this on Henry and he agreed it was better. Unfortunately it doesn't work when the numbers in the registers are huge (can't think of a good UI workaround) so it hasn't been accepted.

However I was foolishly tempted to convert the ~3500 line gtk.c into using Glade (Bug 485919). Which has been taking up all my glChess/GGZ development time but is nearly finished. But I think it's a useful addition for the future of gcalctool.

Saturday, August 25, 2007

Seam Carving for Content-Aware Image Resizing

This is a very cool algorithm. Makes me a little keen to go back to and do a signal processing post-graduate degree at Uni...



Researchers are Shai Avidan and Ariel Shamir.

Friday, August 03, 2007

Got a spare computer lying around?

Quite a cool idea; load a display driver onto a spare computer and use it as more screen real estate for another. The video showing it in action is quite impressive.

SSL in Java

Got SSL working in Python, and for my next trick the Java end! As you may know I am no fan of Java and so this seemingly simple task took much longer than expected...

The initial program is quite simple:

import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.SSLSocket;

public class JVT
{
    public static void main(final String[] args) throws Throwable
    {
        SSLSocketFactory sslSocketFactory = (SSLSocketFactory)SSLSocketFactory.getDefault();

        SSLSocket sslsocket = (SSLSocket)sslSocketFactory.createSocket("localhost", 12345);

        sslsocket.getOutputStream().write("Hello from the world of Java\n".getBytes());
    }
}


But when I connected I got:

Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Oh, what a readable exception... So it appears it doesn't like the certificate of my Python end and I should probably supply that to Java somehow. keytool is the tool for the job (a very cheap and nasty tool). I tried doing a:

$ keytool -import cert

Which did seem to import it (shows with keytool -list) but still the exception.

Tried some debugging:

-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol -Djavax.net.debug=ssl

It showed the standard signing authority certificates but not my one...

And that's when I give up and copy someone else's solution to the problem. This is how to replace the certificate checking with a null implementation:

import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;

public class JVT
{
    public static void main(final String[] args) throws Throwable
    {
        // Create empty HostnameVerifier
        HostnameVerifier hv = new HostnameVerifier()
        {
            public boolean verify(String urlHostName, SSLSession session)
            {
                System.out.println("Warning: URL Host: " + urlHostName + " vs. " + session.getPeerHost());
                return true;
            }
        };

        // Create a trust manager that does not validate certificate chains
        TrustManager[] trustAllCerts = new TrustManager[]
        {
            new X509TrustManager()
            {
                public java.security.cert.X509Certificate[] getAcceptedIssuers()
                {
                    return null;
                }

                public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType)
                {
                }

                public void checkServerTrusted(java.security.cert.X509Certificate[] certs, String authType)
                {
                }
            }
        };

        SSLContext sc = SSLContext.getInstance("SSL");
        sc.init(null, trustAllCerts, new java.security.SecureRandom());
        SSLSocketFactory sslSocketFactory = sc.getSocketFactory();

        SSLSocket sslsocket = (SSLSocket)sslSocketFactory.createSocket("localhost", 12345);

        sslsocket.getOutputStream().write("Hello from the world of Java\n".getBytes());
    }
}


So now it works (for transport) but I must find out how to do the certificates properly.

Making an SSL connection in Python

For a work project I want to make a secure point-to-point link between a Java application and a Python server. Here is the result of googling/tinkering to get the link working in Python...

The client side is pretty simple. Python comes with built in SSL support for connecting sockets. Basically you just wrap a standard socket with an SSL socket:

import socket

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('localhost', 12345))
sslSocket = socket.ssl(s)
print repr(sslSocket.server())
print repr(sslSocket.issuer())
sslSocket.write('Hello secure socket\n')
s.close()


The server is a bit more tricky, you need to install pyopenssl (apt-get install python-pyopenssl) for more SSL features. The server needs a private key and certificate to identify itself with.

The quick and dirty way to generate a test key+certificate is:

openssl genrsa 1024 > key
openssl req -new -x509 -nodes -sha1 -days 365 -key key > cert


And the server wraps the sockets much like the client does:

import socket
from OpenSSL import SSL

context = SSL.Context(SSL.SSLv23_METHOD)
context.use_privatekey_file('key')
context.use_certificate_file('cert')

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s = SSL.Connection(context, s)
s.bind(('', 12345))
s.listen(5)

(connection, address) = s.accept()
while True:
    print repr(connection.recv(65535))


OpenSSL also provides a test SSL client/server in the style of telnet/netcat, great for debugging:

openssl s_server -accept 12345 -cert cert -key key
openssl s_client -connect localhost:12345

Friday, July 27, 2007

Tool for checking key events with curses

I'm doing a bit of curses programming at the moment. I've made a tool to check the keys entered are as expected. Do what you like with it.


#!/usr/bin/evn python
import curses
import curses.ascii

keys = {}
for name in dir(curses):
    if name.startswith('KEY_'):
        keys[getattr(curses, name)] = name

for name in dir(curses.ascii):
  if name.isupper():
    keys[getattr(curses.ascii, name)] = name

for i in xrange(128):
    if curses.ascii.isprint(i):
        keys[i] = "'%s'" % chr(i)

s = curses.initscr()
s.keypad(1)
curses.noecho()
try:
    while True:
        c = s.getch()
        s.clear()
        try:
            key = keys[c]
        except KeyError:
            key = '%d' % c
        s.addstr("Key = %s" % key)
        s.refresh()
except:
    curses.endwin()

Wednesday, June 13, 2007

Google Analytics = WOW

Wow.

I just went back to Google Analytics for the first time in a while and their new interface is just amazing.

Check it out:

Safari on Windows

So apparently you can get Safari for Windows.

There are two possible reasons I can see Apple doing this:
  1. The want to improve website compatibility with Safari - by having a Windows version hopefully more page designers will check compatibility and thus their core OSX users will get better support.

  2. They want to use this as their iPhone development platform - Safari will have a mode for running iPhone applications in a browser window the same size and behaviour as the iPhone (which will be like Dashboard applications?).

My gut instinct is that this started when the iTunes developers tried to see how easy it would be to port other apps. Apple must have a reasonable number of Windows savvy developers by now...

Wednesday, June 06, 2007

Have you mooed today?

I notice that apt-get is not the only mooer in town. Try ip moo (from iputils).

Sunday, June 03, 2007

The thin Gnome line

I'm finding recently I'm not making any significant progress on glChess. When I get around to some development after I've gone through the flood of incoming bugs there's no time to add new features! I really want to get the GGZ support into 2.20... I stopped spending time on the flood of Sudoku bugs a while ago.

It is interesting as more distributions change to Gnome 2.18 how many 1 in a million (or other appropriate large number) bugs turn up. I can only assume this user has somehow overwritten their gobject install... Weird *. There seem to be a lot of errors in peoples libraries. Hard to know what to do with these bugs as they're outside the scope of glchess but I'd prefer not to close them NOTGNOME too quickly.


* It would be good from a maintainers point of view if the big distributions like Ubuntu had a background process that audited all installed files so corruption could be picked up (and the packages re-installed).

Monday, May 21, 2007

Nouveau + Linux Graphics

One thing the Nouveau project is doing well is to make open-source graphics more accessible. There are links to a bunch of articles which while still young give insights into what does what. Looking at the nouveau source code shows it really isn't overly complicated - that hard work has already been done by Mesa. A DRI 3D driver basically requires a kernel module to do the IO and an X driver that can convert OpenGL to native card protocol. The difficulty is this protocol is not (publically) documented. But looking through the code and googling shows that a lot of the information is out there. It needs to be compiled into a "Missing Manual".

If I had the time I would love to work on a project like this. Once past a critical point the value to the open-source world would be immense.

As Dave Airlie and Ben Skeggs said at LinuxConf.au; "Graphics drivers are not that hard..."

Sunday, May 20, 2007

Gnome Games Icons

Gnome games now has new Tango icons in all resolutions:


These were made some time ago by (mostly) Daniel Derozier but only some of them were in use in 2.18. I found out about these icons from the Tango mailing list and found there was some complications getting these icons used (see bug 354507).

What seemed to happen was an all too common situation in open-source where everyone wanted the change but it wasn't used due to confusion/politics/endless discussion. It seems very common with distributed development (with people you have never met) that feedback can come across as criticism. Without formal management it's very easy for issues like this to be missed and fall through the cracks.

One thing that I think helps is to divide the change into smaller parts. For instance if a bug is opened with a change that is generally good then commit that change and aim to open more bugs to fix details with the change. If all the details must be fixed before committing then the change is in danger of never reaching completion or ending up in a design by committee situation.

(note that this post is feedback and not criticism!)

Sunday, May 13, 2007

Too many parodies...

I've just watched too many Get a Mac parodies... This one was quite good though:



I use Macs a lot a work for point-of-sale and applications and have been generally impressed with them. They can be tricky locking down but I imagine the other OSs are similarly difficult.

Monday, May 07, 2007

GGZ

It got to 3pm today and I decided I just couldn't be bothered battling Java all afternoon when I'd really prefer to be working on glChess. So I just went home and did that (I love being a contractor!).

So glChess is getting closer to having GGZ support...



Oh, and it really is wonderful to work on a well designed protocol like GGZ. ICS is OK if you're a human but a nightmare for a computer!

Wednesday, May 02, 2007

Poisonous People

I finally got around to watching my first Google Tech Talk, How Open Source Projects Survive Poisonous People (And You Can Too). It's a really good watch as it both shows how to spot and avoid trouble makers but also how to give good feedback as a project member (hopefully so you're not poisonous too!).

One point of particular interest was their recommendation not to put your name in files - by doing this you are implicitly claiming "ownership" of the code which will discourage potential developers. From looking at other peoples code I think I agree with this idea and plan to remove my name from code in the future.

Saturday, April 28, 2007

Gnome bug triaging

We're getting a lot of bug reports flowing in for Gnome games. I try and knock off a few each weekend but progress is still slow. Most are coming from the automated reports from Feisty users.

So here's my top 3 bugs that need to be fixed asap:

  • #409172 - Sudoku crashes when loading. Haven't looked into this at all but we probably get a few reports each day

  • #418427 and #412690 - Both Sudoku and chess can't find their libraries on Feisty - I suspect this is an upgrade issue only but none of the many reports have any information on how to reproduce

  • #428560 - Some dubious Sudoku code that extracts an integer from label text. Doesn't work when the label is translated. (I've been bugging Joel to fix this).


We need your help!

Saturday, April 21, 2007

Upgrade complete

I've now completed the Edgy->Feisty upgrade. I went to sleep at 1:30 am and continued this morning. I did an network upgrade and it took and estimated 5-6 hours. And the result is? I think I've gone slightly backwards.


  • The installer failed to complete due to the poor quality of the VMWare packages. They've now been removed.

  • fglrx acceleration still does not work. I've changed to the "radeon" driver which runs but is unreliable. I can get the desktop effects working (wobbly windows got annoying after one minute) but playing video stops working when the window looses focus. I noticed glChess renders both the 2D and 3D at the same time, I'll see if this is a driver or glChess at fault.

  • And most annoyingly the US keyboard layout has stopped working for my second keybord. I can't type '/' or '|' which is very annoying in the shell
  • (the keyboard configuration shows the correct layout though).


For me both the Edgy and Feisty upgrades have been disappointing for me. I have a Dell Inspiron 6000 which I think is fairly common and I hope support gets better if Dell starts distributing Linux!

Friday, April 20, 2007

Sunday, April 15, 2007

I've been running Google Analytics on the glChess homepage. Looking at statistics over this period shows the visitors are dominated by the French and Italian:



Are Europeans big chess players or big open-source users or both?

Friday, April 13, 2007

Xeyes in real life

Xeyes in real life. Cool.

glChess spam poetry

Seems glChess is now a sufficiently well know term to be included in spam poetry.

The Commission has concluded that " safeguards schachclub are imposed by federal skakcomputer law and forensic science is webchess glchess practiced go chessboard schachcomputer far less efficient than openings tim krabe rochade ...


I don't know whether to be flattered or annoyed.

p.s. I found this from a feed from Google Blog Search - this is a great way to keep track on what people are saying about your project. Most people don't write to you, they just write about you...

Monday, April 09, 2007

glChess 1.0.5

So here it is:


Yes, it has (simple) timed play support. It needs some cleaning up in the code but due to limited development time I thought it best to "release early".

Notice the navigation buttons are now on the left. I liked the symmetry of them on either side but as a user pointed out when you are in high resolution it takes too much mouse motion to move between them.

The other notable change is the 2D board now rotates and you can choose (from the menu) which side of the board to view.

These changes will be in the Gnome 2.20 release.

Enjoy!

Sunday, April 08, 2007

Beginners guide to Gnome Python games

In Gnome games we need more help to squash some bugs. I've been bogged down squashing Sudoku bugs which aren't too difficult - just time consuming. It's a great opportunity for you to get involved. I think it's hard to jump into development so here is a step by step entry guide to fixing bugs. Note the following instructions work fine for glChess too.

First install Gnome games. You can install this anywhere but I usually make a subversion directory:

$ mkdir svn
$ cd svn

Check out the development version:

$ svn co http://svn.gnome.org/svn/gnome-games/trunk gnome-games
$ cd gnome-games

Configure the package:

$ ./autogen.sh --prefix=/tmp

This will get the software installed in /tmp, you might want to use ~/build or something similar instead.

For the above you will need the appropriate development tools installed. This will be distribution specific so unfortunately you're on your own here... If I remember which ones I installed on Ubuntu I'll state it here. Oh and on Ubuntu Edgy edit configure.in and change GNOME_PYTHON_DESKTOP_REQUIRED=2.17.3 to 2.16.0 because it works fine with the old (installable) version.

Install Sudoku:

$ cd gnome-sudoku
$ make install

To run:

$ PYTHONPATH=/tmp/lib/python2.4/site-packages/ /tmp/bin/gnome-sudoku

Now here's the cool part - because Sudoku is written in Python you don't need to recompile to make changes... What I do is edit the files in /tmp/lib/python2.4/site-packages/gnome-sudoku and run again. You can add print statements, make radical changes, whatever you like. And if things get too broken overwrite the install with another make install.

When you've fixed the change you need to make a patch to attach to a bug report. To do this you need to update the files in ~/svn/gnome-games. What I use is Meld:

$ meld ~/svn/gnome-games/gnome-sudoku /tmp/lib/python2.4/site-packages/gnome-sudoku

Once you've got the changes merged into the checked out copy make a patch:

$ cd ~/svn/gnome-games/gnome-sudoku
$ svn diff > your_changes_description.patch

And send that in.

Don't worry about the patch being perfect, the developers who know the codebase better will look it over and modify/suggest changes to you. It may take time to get a response because we're all volunteers but we do appreciate the work - We need more help and you're the right person for the job! The first patch is always the hardest too :)

Feedback very welcome.

Friday, March 30, 2007

Working with Java

Or should that be Working against Java...

I've more-or-less come to the end of a project refactoring a large Java GUI application for my company and I now feel I can justifiably have a practical opinion on Java. This was my first commercial work with Java and I'll compare it to C/Python/GTK+ which I have used both commercially and in open-source projects.

Java is far more complicated than it should be. Count the number of methods each class has when browsing the documentation. The complexity of the standard library exceeds the complexity of the problems you solve with it. Compare it to the Python or even C library. Instead of containing the basic tools and tools that you use frequently it's full of cruft. I think the programmer should either build up more complex functions themselves or use higher level functions from a different namespace (compare GL and GLU libraries in OpenGL).

AWT and Swing are just a complete mess. Sure this is for historical reasons but Java needs a serious replacement. Maybe SWT is it but if some leadership is not taken to make a "standard" GUI that works I cannot see vanilla Java surviving compared to something like .NET. Case in point, java.awt.Component has four variations on getting keyboard focus. And reading the documentation on each is just worring... You may not get focus, you should use the requestFocusInWindow() because it is more cross-platform. I used to work with a commercial Java developer and he described the cross-platform support as write once; test n times. I now understand.

Packing in AWT/Swing is just too difficult. The simple packing models are too simple for most cases and the complex ones create too much code. While the GTK+ model is more complex to start with I'm always surprised how my windows "just work" (try shrinking a Java window and see everything get messed up). Java needs a universally accepted equivalent of Glade or XAML.

Connecting signals takes too much code. Using Listeners requires you to write loads of empty methods to catch signals you want to and Adapters can't be inherited if you're already extending another class. I hate inline classes with a passion (so much code for so little behaviour!). Using SwingUtilities.invokeLater() (which is a really practical method that should be more central to Java) to create a runnable class every time you want to access one method later? Overkill. Why not just gobject.idle_add(method)?

Threading... All I can say is threading is an optimisation. I've seen too much excessively threaded code that is very hard to maintain. Java seems to implicitly encourage you to thread which I do not like. I don't like that a lot of the Graphics operations don't seem to have an easy way of doing them synchronously. Threading is an optimisation.

Really it's the library that lets Java down. The language is a huge improvement over C. It lacks a little in low level access (I have not really done this in Java but from a first glance it may be missing something like Pythons struct module). I dislike the lack of flexibility over Java but I do like the compile time checking for catching bugs. I must try a .NET project to see if .NET doesn't have the baggage Java does. I get the impression the dominant members of the Java community have the opinion "Don't change anything, we've got too much code" as opposed to "Keep version X stable as we have lots of code, but make version X+1 fix the big problems in X".

My opinion of Java? Not ready for the enterprise :)

Tuesday, March 20, 2007

Damn broken VMWare

Why are the Ubuntu VMWare packages so flaky? Every time I've upgraded the kernel (i.e. standard updates) VMWare player ceases to work. This has happened in both Dapper and Edgy and I'm surprised it hasn't been fixed as the way to reproduce is:
  1. Install Ubuntu from a CD
  2. Install VMWare player
  3. Use VMWare player. Works (fairly - see below) well
  4. Perform a security update
  5. Pretty much broken from now on...
I was trying to find some bugs in the mess of launchpad.net and there doesn't seem to be any bug collection (?). Googling seems to show others on the forums etc have the same sort of problems...

Some clues:
  • The kernel modules are not loaded on startup. If you try and use modprobe they're not found. If you use insmod they load OK.
  • Running /etc/init.d/vmware-player start says neither vmmon or . I think this is because it is trying to use modprobe
  • If you run the player after insmodding then it runs but networking doesn't seem to work. In general the networking seems very flaky.
And the last time I ran it it didn't want to quit and had to be killed. I wonder what state my image will be in next time I get it working (based on experience the first time I install Feisty!).

And why is the performance of the player so poor? Applications inside the player often pause inexplicably for a minute or more (I think it may be related to networking, for example try ifup with DHCP). Sure it's virtualised so I could understand if there was a resource problem but both CPU and IO are not active. So I just don't know what's going on.

So if anyone is wondering why there aren't any glChess packages from me for non-Ubuntu Dapper systems, now you know.

Saturday, March 17, 2007

Slashdotted!

Seems like glchess.sourceforge.net got slashdotted:


Good to see the quality of the comments were absolutely rubbish. Why actually try/investigate something when you can rush and post about it! :)

Bonus points if anyone can actually confirm the dialog has bad grammar as some of the comments say.

Another sneak peak...



As usual no promises on getting this past the screenshot stage at any particular time...

Friday, March 16, 2007

Sick today...

...but every cloud has a silver lining! I have time for open-source. In an attempt to reduce the millions of Gnome Sudoku bug reports flowing into my inbox I've had a crack at some of the worst offenders. I think I've knocked about five on the head so things should be more stable now.

Unfortunately a lot of the bugs are due to a save file being corrupted. Once this has occurred Sudoku will always crash on startup. So we'll have to wait until a month or so until 2.18.1 is released to get some relief from bugbuddy...

Monday, March 05, 2007

Java + keyboard bindings

= Insanity.

I want to connect all input keys to a single widget. And I don't want to have to use 16 classes in the process. And I want all the Java library developers to get their come-uppance.

*sigh*

Python GtkGLExt

...is now in Debian Unstable. This works for me (I get to be lazy and eventually stop providing anything for Ubuntu) and good for you (it's available in all the architectures that Debian builds for). Big thanks Thierry Randrianiriana for maintaining this.

Sunday, March 04, 2007

Boo's chess engine

I've just packaged Boo's Chess Engine (or BCE, or BACE, or ddlchess as it is known...) for Debian/Ubuntu adding another easily installed AI that works with glChess. I think I have some sort of addiction finding open source chess engines and packaging them :)

p.s. I found it quite funny posting the same article twice!

Saturday, March 03, 2007

ASCII

The other day I happened to look at the ASCII table and was surprised that I had never read and understood the C0 control characters! For something I've used for so long I thought that was pretty funny :) Way, way back when I started programming with QBasic I remember looking at the table but all the non-printable stuff looked "too complicated" so I just ignored them. I suppose I should have looked again when they weren't too complicated any more.

In my previous job there were a number of ASCII/Binary protocols that used STX (02) and ETX (03) for framing transmission. This now makes a whole lot more sense...

Oh and software flow control seems quite simple now. I'd assumed there was some sort of escape sequences to do this but hey, there's the characters right there!

Sunday, February 25, 2007

Secrets of the ASCII table

The other day I actually read the ASCII table. Seems odd as I've dealt with this for probably more that seven years but I've never really looked at the special characters. I remember when I started programming with QBasic/Visual Basic I first looked at the table - I ignored the non-printable characters as they looked too complicated. And for some reason I've never really looked at them again.

In my last job there were a number of ASCII protocols using STX and ETX but even then I never looked at anything outside of tab and carriage return (don't get me started on this character...). So yeah it's a bit of a surprise and now I plan to make better use (or ignore) these characters in my future code.

Tuesday, February 13, 2007

Shake-up in the Glade world?

I recently found a Glade replacement: Gazpacho. It's basically a Glade rewrite in Python (for ease of development and maintenance). My previous experiences with Glade 3 have been a bit variable and Glade 2 has a number of annoyances so it will be good to try Gazpacho.

Also it looks like Nokia has been building a libglade replacement. Interesting times.

Saturday, February 10, 2007

Great strides in usability

Just made some really nice improvements to glChess:



a) The move descriptions now default to a human readable form. You can choose to change these to either SAN or LAN using the menus.
b) Sexy, sexy Gedit/tooltip style message areas instead of pop-ups and many status bars.

Unfortunately none of this will be in the Gnome 2.18 release. I plan on making a sf.net release today (but sneak some other goodies in first) and all this stuff can get merged into Gnome 2.18.1. Oh and I'll have to disable the "Join Game" button for this release - it's still not quite all there.

Wednesday, January 24, 2007

My Bad

A last minute change of mine caused glChess to fail in Gnome Games. Whoops... I must get put some unit tests in for the PGN code.

What would be great in the future is to have these unit tests showing up in Damned Lies about Gnome. Python has such a great test framework and this would be so useful.

Unfortunately my time is currently traded off between new features (FICS support is coming along in the sf.net version and will aim to have it in Gnome 2.18.1), and refactoring and testing.

Click 'N Run for major Linux distributions

Linspires' Click 'N Run service will soon be available for multiple distributions. I think this is going to be really really good for Linux. Ubuntu has already mostly solved this with "Add/remove" in the Gnome menus but this is going to make life simple for the "average" user. Only good things can come of this.

Friday, January 19, 2007

Better Bash Autocomplete

Found a positing on how to stop bash autocompleting all the hidden files. This had been bugging me for a while...

Simply edit ~/.inputrc and add:
set match-hidden-files Off

Hidden files are only matched if you explicitly type in the period.

Tuesday, January 09, 2007

Why is Gmail search so crap?

Why is Gmail search so crap? I can never find anything with it... For example today I was looking for my sisters phone number which is in an email conversation that is fairly unambiguous. So I search for "sarah phone", "sarah number", "sarah phone number" etc. These all come up with a few or no results but not the conversation that actually has the number. Finally I found it with "sarah's phone number".

I really expect Google to be a lot smarter with search - an apostrophe shouldn't stop it from matching a word! And ideally the search would be fuzzy so I could at least look through a list of conversations to find this one (thus training their search algorithm). I would even expect GMail to know/learn that "phone" and "number" should match conversations with long numbers in them. Perhaps the GMail team needs some of the core search guys to really spice things up.

Tuesday, January 02, 2007

#97

glChess has broken the top 100 in sourceforge.net! Looks like it may be another glChess new years?

There's been a lot of polishing progress in the last month. There seems to be enough people using it and generating a constant amount of feedback. Should be a lot more when Gnome 2.18 is released in March.

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.

For glchess.sourceforge.net:

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 sourceforge.net the new Gnome version. I plan to backport changes periodically and not add any hard dependencies on Gnome.

Sourceforge.net subversion change

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


  1. Back up your repository

  2. svn switch --relocate https://svn.sourceforge.net/svnroot/PROJECTNAME/trunk https://PROJECTNAME.svn.sourceforge.net/svnroot/PROJECTNAME/trunk



Works for me.

I'm not sure if I'm not reading the email that gets sent out but sf.net 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 shredderchess.com 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: