MaW’s Blog

Sunday, 13th July 2008

XML is not necessarily the answer

Filed under: Programming — MaW @ 9:45

Joe Shaw wrote about XML and Google’s Protocol Buffers, which I admit I hadn’t heard of before today, but it’s pretty irrelevant what the debate was, XML versus Protocol Buffers or XML versus Pink Fairy Protocol or whatever. The point he makes very well, and the point which is very important and, I feel, not appreciated very much in the wider Internet, is that XML is not suitable for everything.

I’m not going to say much more, because I can’t make the point any better than he did, but the point is a good one. At work I designed a simple prefix-based ASCII protocol for two servers to use to talk to each other. Much more lightweight than XML, much easier to encode and decode, and you only need the first few bytes of a message to figure out if the message is incomplete or not. And you can transmit pretty much anything with it. It’s even human-readable, to a certain extent - you need the protocol spec in hand (or you have to know it) but you can figure out what a message is trying to say.

Estimated bandwidth saving over using XML? I reckon it’s about 30% lighter than a reasonable XML application to do the same job.

XML does of course have its place, and having tools like XSLT and XPath available to play with structured data is great, but sometimes you don’t need it, and sometimes you just can’t take the bandwidth hit, because like it or not XML gets verbose very quickly.

This post brought to you by the thinking about work on a Sunday society.

Saturday, 15th December 2007

Three steps back…

Filed under: Dasher, Maemo — MaW @ 21:20

Okay so maybe not three steps. I got Dasher linking - hurrah! It turns out there was all sorts of fudging in the configure script to get it to work on the original Maemo for the Nokia 770, which is now unnecessary on OS2008. Hurrah for SDK improvements, but boo for not spotting that earlier.

The problem now is that libglade isn’t finding half the widgets in the glade file, and returns null pointers for them instead of the widget pointers. Every single one of the ones it’s failing to find is definitely in the XML, and the file’s definitely in the right place. I’ve checked - lots of times.

This might just be what makes me start to go bald.

Thursday, 13th December 2007

Almostsuccess!

Filed under: Dasher, Maemo, Programming — MaW @ 8:01

After literally half an hour of further effort, I managed to get Dasher to link when built against the Maemo Chinook SDK. Hurrah!

Okay so it took a manual edit to the Makefiles. I think I’m going to have to consult somebody who knows this whole autoconf/automake business a bit better to see how I can get the Glade libraries referenced properly.

Then I need to get it to actually start up as it currently tries to dereference a null pointer and segfaults. This is probably due to my fairly cavalier #ifdefing out to get it to compile. Now I need to go back and figure out which bits are actually needed and how to get them to work.

Ultimately of course the UI under Maemo is going to be a bit different, especially once I get the thing working as an input method, but for now I just want it to work at all!

Wednesday, 16th March 2005

An Inadequate Update

Filed under: Games, Programming — MaW @ 9:21

Just to let you know that yes, I’m still alive and doing the usual things, no nothing massively exciting has come along for me to write about, and yes I have been playing too much City of Heroes. Check out the gallery for a few screenshots from City of Heroes EU.

In other news, I think I finally figured out how to do the positioning system for Growl. It’s not the total solution I originally intended, but it’s probably more practical to do it this way than the way I wanted to do it — which was far beyond my small mind’s ability to cope with.

But before I can engage on that again, time for work.

Thursday, 6th January 2005

GuidePost

Filed under: Programming — MaW @ 21:39

Here’s a blast from the past. I finally dug out a GuidePost installer from years ago because I was being nagged about it, so here you are Z: GuidePost 0.6a.

For the curious, GuidePost is a simple text-based editor for GuideML, the XML application used for h2g2 articles, and other DNA-powered sites on bbc.co.uk. I wrote it many years ago and haven’t touched it since, largely because it’s a Windows app and I don’t do those anymore. I do keep meaning to do a Mac version, but haven’t found the time yet.

Powered by WordPress