Archive for July, 2009

Avvy

Monday, July 27th, 2009

When I was about fourteen my parents bought a PC to replace our ageing BBC Micro. There was an adventure game called Leisure Suit Larry which I had heard a lot about and was quite anxious to play. Once I had figured out how to win it, I set about cloning it, and in two years, with the help of my brother Mark who drew all the graphics, I produced a vaguely similar game about a Roman trying to escape Pompeii. It was released eighteen years ago next month. I’m not very proud of the code, though if I find a way of reading 5¼” disks I may open-source it. I’m not very proud of the story, either: I based the story around Roman farces, and though I thought it was quite funny when I was fifteen, the humour strikes me as juvenile and sexist now.

When I had done with that game, I wrote something better. This was Avalot, released sixteen years ago, where approximately the same cast of characters found themselves in the Middle Ages. I had no computer science training at the time, and was unaware of the concept of a virtual machine, but Avalot took several steps towards being a game program written on a general-purpose engine (the engine was called Avalanche). If I had had the opportunity to produce the planned third game of the series, it would presumably have been entirely abstracted. Avalot featured actual puzzles worthy of the name: I’m rather proud of the one about the onion. And I made some attempt to patch up the problems with the story which had been introduced in the first game, as well; Avalot’s wife had a little more to her personality than simply the nagging character from farce. It wasn’t perfect in the least, but it was light years ahead of the original game. Of course, by that time the standard of professional games had moved on, and Avalot looked dated even when it was released.

Both games were released as shareware, and neither made any appreciable amount of money. I think we all had dinner out once on the takings from the first game, and the second game didn’t even make that. But occasionally I still get fanmail.

Sometimes I wonder whether I should resurrect the Avvy franchise as Z-machine games, and whether that would give me a chance to finally fix the immaturity of the original code and of the original humour. I’m not sure, really.

Venite prandete

Monday, July 20th, 2009

Rio and I spent a good while today playing with Alice.  We made a table with a button which, if pressed, would cause a yellow chicken to fly over and spin around.  For her bedtime story I read her the first chapter of The Phoenix and the Carpet.

I should reiterate that, as I said at the time, I myself don’t think using WebKit in the window manager sounds like a good idea.  Since someone had raised the idea, I thought it was worth discussing, and now it certainly has been discussed.

I was trying to typeset some of my work the other day (for some reason), and I noticed how odd it looks to set sonnets in a sans-serif font…

Remember all the old familiar faces?
Helvetica’s the nicest of the lot.
Gill Sans and Johnston take the second places;
It seems as though the serif has been shot.
Verdana has its own intrinsic glories;
The fairest text that ever left my desk
Was set in these– for essays or for stories.
But using them for sonnets?  That’s grotesque.
And gravestones are a special case as well:
A mortal lack of serif fonts would be
A certain kind of typographic hell
With Comic Sans for all eternity.
In death, the Roman lettering is best.
May flights of serifs sing thee to thy rest.

WebKit question

Sunday, July 19th, 2009

Further to my earlier post, there has been some more talk over at the Metacity blog about styling windows with CSS.  There seem to be a few possible ways to implement this:

  • use libccss or plain libcroco for parsing, render it ourselves in GTK.  Not as crazy as it sounds because we’re only interested in a fairly small subset of CSS.  We could make this an external library and let other window managers use it as well.
  • use libccss for parsing rendering; this doesn’t yet work entirely
  • use nbtk for rendering; this doesn’t yet work entirely
  • use WebKit for rendering.  This would save work with rendering, but I’m a little wary of embedding a browser into the window manager.

I was also concerned that using WebKit would not allow us to restrict the CSS, which is something we need to do a great deal:

  • reinterpret all URLs to prevent themes from calling home, and to provide pixmap colourisation
  • allow references to theme colours (“GtkForegroundSelected”, etc)
  • not allow dangerous properties to be set at all (it should not be possible for a theme to set min-height on the frame, etc)

Now someone from KDE says that this could be a great opportunity for cross-desktop interoperability: Metacity and Kwin could share theme formats.  But apparently KWin already pulls in a WebKit dependency for other reasons, and the KDE person is planning to implement using WebKit anyway, and thinks that we should too.

I don’t know WebKit very well (and searching isn’t helping), but I thought some of you probably do.  So what I would like to know is:

  1. Am I being over-cautious about the footprint implications of an optional dependency on WebKit?
  2. Is it possible to heavily vet the CSS which WebKit reads?  I know WebKit allows host applications to modify the document in memory, but how easy is it to modify the styles?

The cap of maintenance

Saturday, July 18th, 2009

Cap of MaintenanceDoes a good farmer neglect a crop he has planted?
Does a good teacher overlook even the most humble student?
Does a good father allow a single child to starve?
Does a good programmer refuse to maintain his code?

The Tao of Programming, 5.4

I like to make things. I like it a lot. It’s one of my favourite things in the world. I also like to maintain things: not quite as much, but still a lot. It’s fun as well as being a responsible thing to do.

The problem is this: the one leads inexorably to the other. If you spend thirty hours on a project, and you do it well enough that the project succeeds, you will spend three hundred hours maintaining it. Now, you only have so much time. If you spend a quarter of your time making things and the rest maintaining them, eventually you will have to stop making things in order to have enough time to maintain the things you have already made. You will have to take off the wizard’s hat and spend the rest of your life wearing only the cap of maintenance. And that’s a shame, because while maintaining things is fun, creating new things is more fun, and more like play; it would be a shame for it to vanish completely from your life. Note that I haven’t said I’m talking about software here. I am, partly, but it applies to other endeavours as well: I’m also thinking of fiction and poetry.

This whole line of thinking started the other day because the users of four of my old projects (very reasonably) started asking for certain fixes, at the same time as I had some ideas for new projects: I always have ideas for new projects, probably more ideas than I have years left in my life. I began to realise that not only did I not have time to work on any new projects in themselves, I wouldn’t have time to maintain them if I did.

This is also part of why I’m so excited both about gnome-shell and about the ideas which came up for Metacity at Gran Canaria; I’ve been only fixing bugs in Metacity, rather than adding new features, for over a year now. And perhaps that’s necessary; I like the idea of projects asymptotically approaching perfection. But it doesn’t solve the problem of decreasing creation opportunity over time.

So what are the solutions? There aren’t any good ones.

  • Refuse to maintain old projects. This is silly and irresponsible.
  • Obsolete the project eventually. This is sometimes necessary, but it’s irresponsible to do it because you don’t have enough time to write fun code, rather than for technical reasons.
  • Spend your whole time working on new projects that nobody will use, either because you don’t distribute them or because they are of interest only to a deliberately tiny group of people. I think this was my unconscious strategy in software for years before I got into GNOME and discovered that writing things which were useful to people was actually far more fun. It’s still my strategy for poetry and fiction: I write things and perhaps put them up on my blog and then never even try to do anything with them to share them with the world.
  • Pay someone to look after it. This rather requires that your idea makes money and that you’re willing to found a company to run it. However, you need business and leadership skills, which isn’t true of me, and the thing you’re making needs to be capable of making money, which isn’t true of anything I’ve ever invented for myself.
  • Get someone else to maintain what you make. The first piece of free software I wrote which was actually useful to people was Gnusto, and that was a maintenance nightmare because it used lots of rarely-touched parts of the Mozilla API which kept changing at no notice. Fortunately someone else picked it up and turned it into Parchment, making it something more wonderful than it had ever been. I suppose there must be people out there who enjoy doing maintenance more than making things, but perhaps not: finding people who are willing to take on your stuff is not really a trivial task. Of course, someone else will have to take over maintenance of your projects one day anyway, unless you happen to be immortal.

Is there a sustainable way to balance the desire to make new things with the ongoing responsibility to maintain them?

Photo © Jeff/Godfrey, cc-by-nc.

If I was a Wikipedia vandal

Friday, July 17th, 2009

Most of what I do on Wikipedia is reverting vandalism, so I don’t want to introduce any more of it. But sometimes I daydream:

Or

A meta-post about blogging

Thursday, July 16th, 2009

Part one: There are several interesting discussions currently going on on the Metacity blog, including the development of optional and experimental subsystems for CSS theming and window matching, and whether applications should be able to extend the window menu (so if you have Istanbul installed, you could add Screencast this window to all windows.) Hop over and add your two penn’orth.

Part two: I don’t know any good content management systems. “Good” here means:

  • easy for the end user to use (which is not usually me)
  • without continual security holes
  • not requiring MySQL
  • if possible, not requiring PHP; Perl or Python would be lovely.

Moveable Type goes some way towards being “good”, but my complete blog is so large that it takes three quarters of an hour to publish it in static mode, and the dynamic mode appears to require weird and clunky PHPisms. I have worked around this to some extent by using MT’s rather nice dashboard, but turning off dynamic publishing, and writing a simple but fairly powerful mod_perl system called Plough which produces dynamic content by reading out of the database of a MT installation and running the results through Template Toolkit. Several of the sites I look after now use this system. I rather like it, but it’s not really ideal: MT requires me to keep the static files around anyway, and they waste space.  Maybe there are better answers out there.

Part three: This blog’s syndication is in a bit of a mess. It currently exists in four places:

  • LiveJournal, here, where it started. Archives are here going back to 2001.
  • Dreamwidth, here– but not everything has been imported from LJ.
  • GNOME Blogs, here– generally the same content as LJ, but not entirely. This is what is syndicated to Planet GNOME.
  • marnanel.org, here– again, not exactly the same content, but all public entries from LJ have been imported (although the comments haven’t). This is what is syndicated to Planet Collabora.  It’s powered by Plough, of course.

I update the blog by writing it on Dreamwidth, letting Dreamwidth syndicate the content to LJ, and then copying it manually to GNOME Blogs and marnanel.org.  I’m okay with this as syndication, but I think it would be good if I had fewer things to update.  I’d quite like everything to end up on marnanel.org, for the increased control over styling and the googlejuice; I might perhaps write a script which updates marnanel.org and GNOME Blogs according to what’s new in Dreamwidth’s RSS.

Part four: I am still planning to write up GCDS, but this is not that post.

Part five: It has been mentioned that I don’t blog about GNOME much any more, and that this is possibly not ideal for Planet GNOME.  This happens because almost all my GNOME hacking involves Metacity, and of course that goes on the Metacity blog; I only mention here what I’ve already written there.  If you have suggestions to fix this, please let me know!  (Before you ask, the Metacity blog can’t go on Planet GNOME; it’s not allowed.)

In news unrelated to blogging, my temperature has reached 99.6°F (38°C) and I feel rather awful. I hope I feel better tomorrow.

Metacity blog post you might be interested in

Monday, July 6th, 2009

The future of… the Metacity project, Metacity’s bug list, and the Metacity blog, all with respect to the advent of Mutter. I thought some people who don’t usually read the Metacity blog but read planet might be interested.  Comment there, or if you’re at GUADEC, come and find me in meatspace.

Aquarius

Sunday, July 5th, 2009

First off, I want to thank Google for giving out water bottles.  This morning I forgot my lanyard with the name badge on it, and had to walk for forty minutes in the sun to the hotel and back.  Google, you made it much less unpleasant than it could have been.  Also, Nokia gave us towels and USB keys, and Intel are giving us coffee and ice-cream every day.

The flight to Las Palmas was delayed yesterday, and we missed some of the opening talks– apparently RMS was singing.  But we arrived in time for the lightning talks; I heard one on refactoring, one on KDE’s triage team (which sounds like a great idea), one on improving OCR in Linux, and some others.  Later I went back to the hotel and slept while other people were eating (my choice: I was quite horribly jetlagged) and then we all ended up on the roof talking about tech stuff until about midnight, when we dispersed.

There was a sign up saying “Don’t try to upgrade your system: there are 700 of us here.”  The network has been getting a little overloaded.  I’m now sitting in a talk about Bluetooth.  People keep trying to pair with the speaker’s devices.

I will take some pictures and post them.  I haven’t seen any actual canaries here, but perhaps I haven’t been looking hard enough.

Cascade of attention-deficit teenagers

Thursday, July 2nd, 2009

Life: It’s been a busy few days, and I should have been blogging every evening in order to keep up.  (But I didn’t, because I was busy.)  I’ve been packing and getting ready for GCDS and trying to finish off some things before I leave.  I did find time to go swimming with Rio one evening, and yesterday we all went to the fair.  I won a fluffy penguin playing darts.  (I was playing darts, not the penguin.)  Thanks to Alex for the photo on the right.

The future of Metacity: It is fairly clear that Metacity will be replaced by its fork Mutter in the near future: Mutter is effectively Metacity 3.  Although I have some loose ends to tie up in Metacity, it doesn’t seem worth continuing hacking on Metacity 2 when the life is in the other fork.  In addition, there are over five hundred bugs open against Metacity, more than I (as the only active maintainer) can humanly deal with.  Mutter has far more contributors and the bugs will be far more easily dealt with.

CADT: However, this raises a problem.  I can’t just close the bugs because there’s a new version: that would be repeating the GNOME 2.0 mistake which jwz called “cascade of attention-deficit teenagers“.  Therefore I will have to go through several hundred bugs and decide whether they are reproducible with Mutter, and if so reassign them.  This will be a long and dreary job, and if anyone wants to help out I’d be happy to assign them a block.

Nargery: There is also a discussion about whether windows should be able to indicate to compositing managers that they are still working on drawing a window, to save the compositor diving in and drawing the existing pixmap, which may be uninitialised garbage.  Some people question whether compositor-specific hints belong in the EWMH at all, or whether they belong in some separate spec.

Meme: Someone is asking “What was your first word?” Mine was “gone.” My grandfather used to play a game with me when I was a baby. He would take an object, like a building block, and then hide it and say “Gone”.

Links: