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.