| JezUK Ltd - The Coffee Grounds - May 2004 |
| << April 2004 | June 2004 >> |
Jez Higgins Jez spends his working day closeted in his attic garrett contracting to his handful of happy clients. Largely by accident, that work usually involves some combination of C++, Java, XSLT and piles of XML documents.
Out of the attic, he practices swimming, yoga, walking the dog and watching Dora the Explorer with his kids. He hopes to be good at at least one of them one day.
Having been invited to put myself up for the ACCU committee, my first "action" was to supply a little biographical paragraph for the new handbook. I hate writing stuff like this - it's very difficult to strike the right tone, difficult to use the space available effectively, silly to write about yourself in the third person when everybody knows that's what you've done. I dislike the whole own-trumpet-blowing aspect of it, even though it can be important. Becoming a school governor rests almost entirely on your ability, or lack of ability, to write a good statement, for instance.
Because the ACCU is a programmers' organization, the obvious thing to do is talk about how long you've been programming or how aged the first computer you used was -
... wrote his first program in assembler for a Honeywell 124 24 bit computer in 1967 ...and then to compare that with what you do now
... started off his programming life maintaining a Cobol interpreter written in 6800 assembler ...
... first started programming an Acorn Electron in BBC Basic when he was 8 years old ...
... runs his own business writing mainly database software for companies ...
... now a founding director of a startup company specialising in Internet Broadcasting ...
... the majority of his work is COM and C++ Standard Library based ...
Interestingly, the two committee members who had spent time working out in Silicon Valley were very direct, in a this-is-what-I-do-and-I'm-good-at-it way. Here's a snip from one
... a successful engineer, architect, and leader within technology companies both in the UK and USA. His prior experience includes working on projects at Microsoft, Lucent, Netscape, AOL, and Sun. He has worked within various standards bodies, filed many patent applications, and provided technical editing for many publishers ... mentors budding entrepreneurs and welcomes any opportunity to help fledgling businesses.No pissing around there. The second is slightly less strident but equally to the point
... With over 10 years industrial experience in London and Silicon Valley he took himself off to business school - where he claims to have discovered that you learn an awful lot about software development on an MBA course ... Since 1999 he has been regular contributor to ACCU Overload. He is also a member of Hillside Europe and contributes patterns to EuroPLoP conferences. Sharp-eyed readers will occasionally find his rambling in other publications too.
I had the luxury of seeing all the other bios before I wrote mine. I could avoid the cliches, get a good idea of the proper length, and so on. Still came up short and weak, I think.
Seriously(ish) - any thought about integrating with Jakarta Commons Collections ? The two libraries share some common concepts and it would be nice to be able to use them together... [added 1st Jun 2004]
Commons Collections and Mango have similar iterators and unary predicates, so perhaps the algorithms part would fit with them.
I'll have another go at their mailing list perhaps. [added 2nd Jun 2004]
I'm not at all clear if they've become less verbose, one of the main reasons for Functors etc.
Hope all is well,
Owen [added 6th Sep 2006]
The grammer is complete now though, I think. Whitespace is skipped in the right places, and everything parses out into a nice abstract syntax tree. From here on, it's a simple matter of programming (ha, ha, just serious) to walk the tree and build a little executable XPath object. Really, I do think the difficult part is done now.
[added 28th Jun 2004]
[Add a comment]
Working on an XMLBaseSupport class. As you might surmise from the name, it's to help when building applications that need to support XML Base.
If you're not familiar with XML Base, give the spec a quick browse. It's both clear and very short, and what it describes is very useful. Here's an extract that catches it in a nutshell
An example of xml:base in a simple document containing XLinks follows. XLink normatively references XML Base for interpretation of relative URI references in xlink:href attributes.<?xml version="1.0"?> <doc xml:base="http://example.org/today/" xmlns:xlink="http://www.w3.org/1999/xlink"> <head> <title>Virtual Library</title> </head> <body> <paragraph>See <link xlink:type="simple" xlink:href="new.xml">what's new</link>!</paragraph> <paragraph>Check out the hot picks of the day!</paragraph> <olist xml:base="/hotpicks/"> <item> <link xlink:type="simple" xlink:href="pick1.xml">Hot Pick #1</link> </item> <item> <link xlink:type="simple" xlink:href="pick2.xml">Hot Pick #2</link> </item> <item> <link xlink:type="simple" xlink:href="pick3.xml">Hot Pick #3</link> </item> </olist> </body> </doc>The URIs in this example resolve to full URIs as follows:
- "what's new" resolves to the URI "http://example.org/today/new.xml"
- "Hot Pick #1" resolves to the URI "http://example.org/hotpicks/pick1.xml"
- "Hot Pick #2" resolves to the URI "http://example.org/hotpicks/pick2.xml"
- "Hot Pick #3" resolves to the URI "http://example.org/hotpicks/pick3.xml"
I've not tested properly yet, but once it's done I'm going to do a filter to implement XInclude. After that, I'll probably go back to the XPath work.
http://www.clydebirds.com/files/Coot.ad.feeding.chick_Kilmardinny_040603.web.jpg
http://www.lanius.co.uk/images/own/coot.jpg
[added 25th May 2004]
Test match cricket is like a very slow roller-coaster. You spend a long time gently going nowhere in particular - reading the paper, eating sandwiches, getting sunburnt and so on - the all of sudden you tip over the top and hurtle into excitement.
62.1 Giles to Richardson, one run, fullish ball, bit straight, gets half forward and worked behind square on the leg side
62.2 Giles to Styris, two runs, leg stump line, fullish, turned gently to deep forward square leg, long leg has a bit to do at him
62.3 Giles to Styris, no run, well forward, pad bats it just wide of silly point/mid on
62.4 Giles to Styris, OUT: flighted up on the legs, gets forward, looks to work it to the on side, leading edge pops up to Hussain at silly point
New Zealand 187/3, Partnership of 7
SB Styris c Hussain b Giles 4 (20b 0x4 0x6)
MH Richardson 67* (184b 8x4) AF Giles 12.4-1-40-1
Styris was never happy with Giles who kept the leg side line going
62.5 Giles to McMillan, no run, first ball up, charges down the pitch, then stroked the drive to mid off
62.6 Giles to McMillan, OUT: gets forward, on the sweep, under edge, into the pad, loops high over Hussain who turns around to take the catch
New Zealand 187/4, Partnership of 0
CD McMillan c Hussain b Giles 0 (2b 0x4 0x6)
End of over 63 (3 runs) New Zealand 187/4 (lead by 132 runs)
AF Giles 13-1-40-2 - Nursery End
MH Richardson 67* (184b 8x4)
Goes well with your new cyan background too. [added 20th May 2004]
There's also coot and a goose sitting on nests, which must be due to hatch any day now. Down the road at Cannon Hill Park, there are three seperate clutches of coot chicks already several days old, as well as a large family of great crested grebes which are almost as large as their parents. [added 20th May 2004]
[Add a comment]
To: Jez Subject: Mango Status? Greetings: I came across your website some time ago. I am the author of a similar libary, jga, found at http://jga.sf.net/ I'll be speaking at the next JavaOne on applying functors to desktop programming, and one of my slides lists the available functor-based libraries that I have been able to find. I thought I'd touch base with you to find out what the status of Mango is at this point. Is this still an on-going project? David HallI replied
To: David Subject: Re: Mango Status? Hello David, > > I came across your website some time ago. I am the author of a > similar libary, jga, found at > > http://jga.sf.net/ > We certainly seem to have been be working along similar lines. I knew somebody had to be somewhere :) > I'll be speaking at the next JavaOne on applying functors to desktop > programming, and one of my slides lists the available functor-based > libraries that I have been able to find. I thought I'd touch base with > you to find out what the status of Mango is at this point. > > Is this still an on-going project? > It's still on-going in as much as I haven't stopped working on it. I just haven't been working on it, if you see what I mean. The library started as a result of some other work I was doing at the time, and I've added to it in dribs and drabs over time. Checking now, it has been some time. Over the last year or so, I've done much less work in Java and rather more in C++, so the motivation to work on it hasn't been there. I'll no doubt come back to it at some point. Simply receiving this mail may prod me a bit. Best, Jez
Nattle's birthday today. We got her a new phone - a Sendo m550. I'm not really a phone geek (my mobile must be 6 or 7 years old now), but it really is a rather funky little gadget.
First ducklings of the summer at the park yesterday. Always very exciting, although sad too because inevitably most of them won't make it through to the autumn. The Bean had come with me and was beside himself with joy.
Out this morning I counted six, when there were seven last night. Also saw a pair of yellow wagtails (at least I'm pretty sure they weren't greys) newly arrived from Africa. Cheering, but still sad about the lost duckling.
At least it would be if we didn't have domesticated cats messing it all up .... [added 12th May 2004]
Doubt cats are the culprits at the park though. More likely to be rats, foxes or the other birds. Some of the geese get downright uppity. [added 12th May 2004]
Oracle, one of software's 800 pound gorillas seems to be employing monkeys, at least as far as their Java XML parser development is concerned. I've been using it for about two hours and have turned up two seperate bugs. Actually, not bugs, they're misfeatures - things which have not been implemented correctly simply because spec text was ignored.
I recently delivered a Java jar file packaging up the XSP portion of the Apache Cocoon XML Web Development Framework. Part of that brief included ensuring that the finished package did not, as Cocoon as whole appeared to, rely on specific versions of the Xerces XML parser. Actually, that turned out to be a requirement to run with Oracle's XML parser under the OC4J application server. Tests which passed using Xerces failed with the Oracle parser, because the Oracle parser failed to add the one line that would implement the SAX spec correcly.
From the SAX website
public final class XMLReaderFactory
extends java.lang.Object
Factory for creating an XML reader.
... snip ...
Note to Distributions bundled with parsers: You should modify the implementation of the no-arguments createXMLReader to handle cases where the external configuration mechanisms aren't set up. That method should do its best to return a parser when one is in the class path, even when nothing bound its class name toorg.xml.sax.driverso those configuration mechanisms would see it.
XMLReaderFactory can be implemented in about 20 lines of code. Unfortunately Oracle has the 19 line version because it doesn't modify createXMLReader. One of the goals of SAX is to allow one parser to be transparently swapped for another, without having to change anything. Wrongly implementing XMLReaderFactory breaks that.
Having determined this was my problem, I was able to make the necessary configuration change (a minor change granted, but still one I shouldn't have had to make). The tests passed, bar one. The test reported a stray processing instruction.
Where could that be coming from?
Dumping the output revealed no processing instruction, although the document did start with <?xml version="1.0" encoding="UTF-8"?>, a perfectly reasonable and correct XML declaration. Oracle's XML parser incorrectly reports this as a processing instruction. In case anyone is still reading at this point, the relevant spec text is
XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
PI ::= '<?' PITarget (S (Char* - (Char* '?*>' Char*)))? '?>' PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
I'll have a hunt around to see if these are known bugs at Oracle, and if not report them, although I'm certain any reply would be upgrade to version XXXX. Sadly that's not an option my client can entertain at the moment. The next time someone tells you that proprietary software means that someone is accountable, then recall this little rant. If I'd found a similar bug in an open source library, I could have fixed it myself in less time than I've taken to write this.
Oracle, one of software's 800 pound gorilla seems to be employing monkeys, at least as far as their Java XML parser development is concerned. I've been using it for about two hours and have turned up two seperate bugs. Actually, not bugs, they're misfeatures - things which have not been implemented correctly simply because spec text was ignored.
I recently delivered a Java jar file packaging up the XSP portion of the Apache Cocoon XML Web Development Framework. Part of that brief included ensuring that the finished package did not, as Cocoon as whole appeared to, rely on specific versions of the Xerces XML parser. Actually, that turned out to be a requirement to run with Oracle's XML parser under the OC4J application server. Tests which passed using Xerces failed with the Oracle parser, because the Oracle parser failed to add the one line that would implement the SAX spec correcly.
From the SAX website
public final class XMLReaderFactory
extends java.lang.Object
Factory for creating an XML reader.
... snip ...
Note to Distributions bundled with parsers: You should modify the implementation of the no-arguments createXMLReader to handle cases where the external configuration mechanisms aren't set up. That method should do its best to return a parser when one is in the class path, even when nothing bound its class name toorg.xml.sax.driverso those configuration mechanisms would see it.
XMLReaderFactory can be implemented in about 20 lines of code. Unfortunately Oracle has the 19 line version because it doesn't modify createXMLReader. One of the goals of SAX is to allow one parser to be transparently swapped for another, without having to change anything. Wrongly implementing XMLReaderFactory breaks that.
Having determined this was my problem, I was able to make the necessary configuration change (a minor change granted, but still one I shouldn't have had to make). The tests passed, bar one. The test reported a stray processing instruction.
Where could that be coming from?
Dumping the output revealed no processing instruction, although the document did start with <?xml version="1.0" encoding="UTF-8"?>, a perfectly reasonable and correct XML declaration. Oracle's XML parser incorrectly reports this as a processing inspection. In case anyone is still reading at this point, the relevant spec text is
XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
PI ::= '<?' PITarget (S (Char* - (Char* '?*>' Char*)))? '?>' PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
I'll have a hunt around to see if these are known bugs at Oracle, and if not reported them, although I'm certain any reply would be upgrade to version XXXX. Sadly that's not an option my client can entertain at the moment. The next time someone tells you that proprietary software means that someone is accountable, then recall this little rant. If I'd found a similar bug in an open source library, I could have fixed it myself in less time than I've taken to write this.
-D org.xml.sax.driver=oracle.xml.parser.v2.SAXParser
in the Java command line.
Both Xalan and Cocoon use the SAX XMLReaderFactory interface, so were bitten by the problem I describe.
Oracle's javax.xml.parsers.SAXParserFactory interface is correct though, so if you can use that instead you're problem goes away. It looks to me like OC4J uses that in preference to XMLReaderFactory.
Note that the testsuite I was working with runs outside OC4J, although the application itself is deployed using the Oracle appserver.
[added 14th May 2004]
Perhaps Oracle should stick to making databases and abusing MS :) [added 14th May 2004]
Jez, you live in the beating heart of the Balti Triangle. What are you doing cooking up your own balti sauce? It's easy? It's yummy? While baltis are cheap, adding on the cost of a babysitter makes the home cooking option attrative? Doesn't matter - here's the recipe. It's taken originally from one on, and since removed from, BBC Birmingham. As I recall it was provided by a Balti house chef, but I forget who.
Get your favourite big sharp knife and chopping board, hook out your wok (or other large deep pan) and gather up
Once you have your sauce, making a balti is child's play. Quickly fry round some veg, add the sauce, heat it through and serve. Try it with potato, chick peas, mushrooms, spinach, kale, okra, peppers, cauliflower or pretty much anything else. Chick peas and kale is a favourite of mine.
As ever, I've been a bit loose with the quantities. If you don't like hot and spicy, then use only one or two chillis and a smaller piece of ginger. If you like things a bit perkier, you presumably won't need my encouragement to lob in more. Don't be too worried about over-spicing though. The relatively long cooking time rounds everything out and takes the edges off. You won't take a mouthful and suddenly be assaulted by a rogue piece of chilli. The same applies to coriander. This sauce can manage anywhere between a scant handful and half a carrier bagful without becoming unbalanced. Go with what you feel, and don't forget to taste as you cook.
Been out of sight again for a while. Sigh ...
There have been various SAX moves recently that Arabica should catch up on. David Megginson released SAX 2.0.2.
This mini-release is intended mainly to add support for XML 1.1 and Namespaces 1.1, including Unicode normalization. The changes are all in features, properties, and JavaDoc, not in the actual class and method signatures; since the new features and properties are optional, existing libraries should continue to work with the new release.
At about the same time, and of especial interest is Elliotte Rusty Harold's SAX Test Suite. I've needed something like this for some time, to be honest, but haven't had the time and motivation simultaneously to ever do anything about it. Now the legwork has been done for the Java version, it should provide strong pointers for an Arabica version.
Finally, Daniel Veillard has dropped a new release of libxml.
Nattle seems to have had some kind of shopping malfunction[1]. Right now, there are fifteen lemons in the veg cupboard and none of them are old and shrivelldy.
Yea, yea, I know it's all horribly tradional-gender-roles of us for her to do the shopping. I do the cooking though, and today I took the Bean to his dance class which must qualify us for some kind of two-for-one new-men type deal.
Wrestled Cocoon to the ground. The client's test suite all passes. I'm going to bed *and* I'm going to take Monday off. Yay.
240 classes in the end, btw. 234 unaltered Cocoon classes and six new ones of my own devising. I should probably write this up properly sometime for Google to read.
| << April 2004 | June 2004 >> |