<< September 2001 November 2001 >>

Wednesday 31 October, 2001
# Spent a lot of time over the last fortnight closetted away in my attic, scanning JobServe, phoning agents, and working away on my pet project.

The job searching hasn't been going too well. The market's flatter than I've ever seen it, and come last Friday I'd got nothing even vaguely promising going on. The whole business was looking a bit miserable, particularly when it seemed that Chrystal weren't going to pay my last invoice. So I poked away at my code, with the rain splatting on the skylight, drinking coffee and feeling sorry for myself.

Nat's Dad, in his younger days, had been a globetrotting travelling salesman for Max Factor. He's got stories about doing the twist with Miss World, building factories in Vietnam, and fighting off the Mujahideen in the Hindu Kush armed with nothing more than a briefcase full of lippy. No doubt he saw himself working for them until he retired. Unfortunately, corporate something-or-othering saw him made redundant in his mid-forties. I've never spoken to him about it, but Nat and her Mum both describe him as retreating to his study, looking for another job, and working on "projects". This went on for months, seemingly, and ultimately ended in Nat's parents divorcing. I guess he had some kind of breakdown. He never did find another job and has lived off his (obviously pretty shrewd) investments for the last twenty years.

Chewing over the detail of DOM Core Level 3, I became very aware of the shadow of Nat's Dad and how I must look. Unfortunately, my lack of investment prowess doesn't afford me the luxury of a breakdown.

It's all going better this week anyway - I've been put forward for some things, my solicitor friends tell me Chrystal should have to cough up, and I've got a line on a job that's but a 90p bus ride away.
[Add a comment]

Tuesday 30 October, 2001
#[Arabica] Sitting in CVS now - a DOM Level 2 Core implementation. Please be mean with it.
[Add a comment]
#[Arabica] I've been working on a DOM implementation for the last couple of weeks or so. It's hard. The way the recommendation (W3C doesn't do specifications) is written is slanted towards garbage-collected, everything's a reference type languages like Java and ECMAScript. I decided to try and make it doubly hard, by writing a DOM implementation that really can interoperate with other implementations.

Interoperating different DOMs is easy in Java. You just implement the interfaces in the org.w3c.dom package and off you go. I built a DOM on top of the Astoria XML database API, slung it around with the Xerces-J DOM, and it all just worked.

In C++ it's a different story. Because you're more or less forced to implement some form of object reference counting, you can't just define a set of abstract base classes and leave people to derive from that. You have to build a set of classes which know how to reference count, then a parallel set of classes which actually do the work. This is what Xerces-C does for instance. I don't think, though, that I'd be able to build the equivalent of my Astoria DOM in C++ and get it work with Xerces-C. It might, but it would be a load of work and I probably wouldn't be able to benefit from the code that's already there.

My solution is to define a set of concrete classes which do the ref counting, a parallel set of abstract base classes, and then derive a further set of classes which actually do the work. With me so far? An alternative implementation would derive from the set of abstract base classes, but would still use the same set of concrete wrappers. everything should interoperate ok. I think.

Anyway, it's all sitting in CVS. Any comments will be, as ever, gratefully received.
[Add a comment]

Monday 29 October, 2001
#[Arabica] Glenn Maynard emails regarding the problems I'm seeing with libxml2 and entity references -
Just FYI, this is a fairly common problem; the libxml developers' response to this seems to be along the lines of "entities in libxml sax are hard, either don't use entities or use DOM". Yeah, right.

I'm giving up on that library; it's worthless. Hopefully Expat will be better.

Hmmm. I'm sure it did work correctly with an earlier version of libxml. I don't follow the logic behind entities via SAX being hard either. For a SAX interface, I'd say it was acceptable to just report the entity reference and let the SAX client sort out resolving it.
[Add a comment]
# It's been a strange old couple of weeks. The situation at Chrystal, far from becoming clearer, has become more and more murky. Rumour and innuendo fly hither and yon, such that nobody knows anything. Little T, the Xerox exec charged with winding up Chrystal, seems intent on making Xerox look absolutely as bad as he possibly can.

When companies are wound up, it's not uncommon for the company assets to be sold off. Chrystal, unsurprisingly, has a number of computers, and some of the soon to be ex-employees enquired about buying them. One employee, let's call him Mr P, offered 300 quid for the laptop he'd been using. You can buy a brand new Dell luggable for 600, so that sounded pretty generous to me. Bear in mind also, that companies can write-off computer expenses complete in the frist year, rather than over three years like normal assets. Consider also that the laptop in question is not one that the main Xerox corporation will support, so it can't go back there. Essentially, therefore, this is a computer with no value at all to Chrystal. The three hundredd quid being offered is, then, money for nothing. Little T said The sale price on these units to our employees will be one-half of current book value or $1150. This is not a negotiable item. Looks like those computers will finish up in a landfill somewhere.

That's a comparatively minor example of corporate fuckwittedness, especially when you look at the way clients are being treated. Some of them have spent a lot of money having Chrystal write software for them, and now find that they may as well have thrown that money down the toilet for all the good it will do them. The letter I've seen, which I'm told is the one going to the clients, runs to about 140 words and essentially says you're shafted. From what I hear (rumours remember), the only piece of software that the vestigial Chrystal organization will support is the latest release of the Astoria database. Run your website using Chrystal's Eclipse? You're fucked. Build your translation workflow using Lingua? You're fucked. Rely on the bridges to connect your XML editor to Astoria? You're fucked. Done almost any kind of useful work with Chrystal products? You're fucked. Chrystal won't help you. And no, you can't have source code access either, so you can't help yourself either. The letter predictably blames increased competition and a soft economy. Bollocks. Remember Mr. Garnett's strong background of successful leadership and innovative strategies will help lead Chrystal Software's continued growth.

I could go on, but you get the picture. I enjoyed working for Chrystal, but the way the company's acting now is arrogant, wrongheaded, and makes the people running it look like a bunch of cunts. When the client companies I've been dealing with get in touch and ask what's going on, I have to tell them I don't know. They trusted me to help solve their problems, and I've let them down. That makes me look like cunt too. Thanks, Xerox!

stu said I had 7 years there. But with large dollops of depilatory cream and a carefully arranged 'chief, you can just about cover it up. I did tell you before you left our place for them...didn't I? [added 9th Nov 2001]

[Add a comment]
Thursday 18 October, 2001
#[Arabica] Hacked a quick and basic HTTP resolver into InputSourceResolver. This allows the expat and libxml2 wrappers to resolve http:// URLs as well as file:// URLs and plain old filenames. This code is all a bit Win32 specific at the moment, but it'll get sorted out in due course.
[Add a comment]
#[Arabica] Whipped up a quick SAX2 wrapper around libxml2. It's not as complete as the others, because I don't think it's possible to support the Lexical and Decl handler properties. There's also a bit of a funny with entity handling. It insists that entities aren't defined, even when they are. Hmmm, probably needs more work :(.
[Add a comment]
#[Arabica] Moved the MSXML and expat wrappers into the SAX namespace. Also physically moved them into the SAX directory, in a subdirectory called wrappers. You'll need to tweak includes and declarations, but that's all -
#include <wrapper/saxexpat.h>
...
void myFunc() {
...
SAX::expat_wrapper<std::string> parser;
...
}

[Add a comment]
Wednesday 17 October, 2001
#[Arabica] More work on the string adaptor policy stuff. There's now a default_string_adaptor template, suitably specialized for std::string and std::wstring. The specializations automatically convert from UTF-8 to UTF-16 (or vice_versa) as appropriate which means you can do things like
expat_wrapper<std::string> parser_returning_UTF8;
expat_wrapper<std::wstring> parser_returning_UTF16;

or
msxml_wrapper<std::string> validating_parser_returning_UTF8;
msxml_wrapper<std::wstring> validating_parser_returning_UTF16;

expat_wrapper<stringT> is drop in replaceable with msxml_wrapper<stringT> naturally.
[Add a comment]
#[Arabica] Just parameterised the MSXML wrapper on string type and conversion policy too. This renders XMLReaderNarrower redundant, so that's gone from the build. One of the other side effects is that SAXExpat and SAXMSXML are now defined entirely in header files, so there are no libaries to build for those now. I will probably move them into the main SAX directory in due course.
[Add a comment]
#[Arabica] The expat wrapper is now parameterised on string type and string conversion policy, which isn't nearly as frightening as it sounds. Basically, you specify what output string type you want, typically std::string and a supply a second type which knows how to convert const char* (expat's native string type) to std::string. Obviously that's a pretty trivial example.

It get's more interesting if you're using some custom string type, or you want std::wstrings containing UCS-2 Unicode instead of expat's UTF-8 encoded const char*. In cases like this, the string conversion policy class would need to a little more work (although not too much). The big gain is that you can just drop it straight in, and the expat wrapper will hand out what you want. No second conversion layer on top, no further fiddling. Cool.

Andrei Alexandrescu's fantastic book Modern C++ Design describes this design approach in much more, and more illuminating, detail.
[Add a comment]

Tuesday 16 October, 2001
#[Arabica] Experimental change in template parameter - now takes a string type, rather than the char, char_traits and allocator.

I hope this will allow for a number of groovy things to happen, like autowidening/narrowing wrappers which don't need another layer, or the use of basic_string compatible const_strings, etc. It should become clearer in the course of the next week or so.
[Add a comment]

Monday 15 October, 2001
#[Arabica]New release.
There is a new source bundle available. Changes since the previous release include
[Add a comment]
#[Arabica] Completed DeclHandler.elementDeclaration in the SAX2 expat wrapper.
[Add a comment]
# Compare and contrast


[Add a comment]
# Back off from our holiday - had a super-duper week in Cornwall. Trying to go back to work, but I'm not sure I have any to go back to. House still standing and unbroken into when we got back, but the heating isn't working. Among the catalogues and bank statements was a fat tax rebate, so the pressure to find a new job isn't soooo urgent.
Angie 2 said Excellent news about the tax rebate. Glad you had a good time. [added 24th Oct 2001]

[Add a comment]
Thursday 04 October, 2001
#[Arabica] Now that the MSXML wrapper is done, I'm back on the SAX2 wrapper for expat. The DeclHandler interface is 75% (a whooping three out of four functions) done. I just need to do a bit of work converting the entity declaration from expat's structure into a string.
[Add a comment]
Wednesday 03 October, 2001
# Rumours here, rumours there.

Spent the afternoon updating my CV.

angry_john said Ha, you are but a beginner - I spent the last 10 weeks @ Chrystal doing that ! [added 3rd Oct 2001]
Au contraire! A beginner takes 10 weeks to update his CV. I, on the other hand, needed but a few hours [added 3rd Oct 2001]
smellygit said Pah! I didn't even bother updating it :p [added 4th Oct 2001]

[Add a comment]
#[Arabica] Hooked up the MSXML getFeature and setFeature functions. It's done.
[Add a comment]
#[Arabica] Got the Lexical and Decl handlers hooked up and working in the MSXML wrapper. Just need to wire up setFeature and getFeature and it'll be finished.
[Add a comment]
Tuesday 02 October, 2001
# The corporate jiggery-pokery at Chrystal is small beer compared to what's going on in the rest of Xerox - Xerox sells half its plants for $220m - ... plans to reduce the 1,500 workforce at the UK site at Mitcheldean in Gloucestershire by shedding between 920 and 1020 staff ...
[Add a comment]
# Yay! My invoices are safe for the moment, so not sacked yet.
[Add a comment]
#[Arabica] The online class documentation has been updated, as it was very old and bore increasingly little resemblence to reality.
[Add a comment]
#[Arabica] I've changed the licensing for the SAX code. In future, the code will be released under a BSD-style license, rather than put into the public domain.
[Add a comment]
Monday 01 October, 2001
# The office has been ordered not to spend anything. Nobody knows why because you haven't earned the right to speak to [Frazer's bossman].

Erm, does this mean I'm out of a job?
[Add a comment]

# W3C and the Promotion of Fee-based Standards for the Web - This is a substantial shift in the philosophical direction of the W3C and should be of extreme concern to anyone who values being able to implement W3C standards in a royalty-free manner. In particular this has profound implications for the support and implementation of future W3C standards by the free software community. It is likely to extinguish free software development and deployment in the areas where the payment of royalties is required.
A standard you have to pay for the privilege of using cannot be called a standard.

[Add a comment]
<< September 2001 November 2001 >>