| JezUK Ltd - The Coffee Grounds - October 2005 |
| << September 2005 | November 2005 >> |
Since there were lit candles, there was obviously a birthday going on. As the candles were inside the pumpkin, the birthday in question was clearly the pumpkin's own. If it's someone's birthday, then it is impolite not to wish them a happy birthday. Repeatedly. And often. This all makes perfect sense when you are two.
There is nothing my children have thus far broken that I haven't been able to fix with Araldite. Truly, it is a prince among glues.
Essentially everyone, when they first build a distributed application, makes the following eight assumptions. All prove to be false in the long run and all cause big trouble and painful learning experiences.
The really, really hard part is working out which of these might actually be true in your particular circumstance.
The Bean and I will be taking the knife to a very large pumpkin tomorrow afternoon. Well, he is a small boy and halloween is coming, and all that. When I say very large I mean once we've hollowed it out, we can fit Hal inside and put the top back on (or rather we could, but we'll probably do something more conventional like put a candle in it).
These pumpkin carving shenanighans will inevitably lead to a surfeit of pumpkin flesh. I'm going to roast some of it, to use in soup or risotto, but I'm sure they'll be a quantity left over. If you'd like some, give me a call and you can come and collect it. There are a million yummy things you can do with it - ravioli (if you're keen), soups (Thai or Italian style), risotto, pie, lots of stews - so why not, eh?
I've no idea how it'll taste. My Mum grew it on her allotment in sunny Cardiff, and everything else we've had from there has been top (if slightly smaller) so it should be fine. It'll be a bit bland at worst, I reckon. Anyway, if I haven't put you off, do call.
import org.ccil.cowan.tagsoup.Parser;
import org.xml.sax.XMLReader;
import org.xml.sax.InputSource;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.dom.DOMResult;
import java.net.URL;
...
URL url = new URL(whatever);
XMLReader reader = new Parser();
reader.setFeature(Parser.namespacesFeature, false);
reader.setFeature(Parser.namespacePrefixesFeature, false);
Transformer transformer = TransformerFactory.newInstance().newTransformer();
DOMResult result = new DOMResult();
transformer.transform(new SAXSource(reader, new InputSource(url.openStream())),
result);
// here we go - an DOM built from abitrary HTML
return result.getNode();
See also Screenscraping HTML with TagSoup and XPath for an example using Xalan. It's less portable, but almost certainly has lower memory overhead. However, if memory is a problem, portability probably isn't ...
Oracle alert! If you're using the Oracle XSLT Transformer, you may get bitten by a bug in DOMSource. If this is the case, you'll have to transform to a StreamResult wrapped around a StringWriter, hook the String out, and then feed that into a DocumentBuilder. Still, it keeps Larry Ellison in jetplanes.
Foolishly bought Resurrection of Evil on my way home last Friday. Played it a little bit today. It is just as scary as Doom3. Right now, there's something outside the door making a noise and I don't want to go out there. So I'm going to walk the dog instead :)
Chez Jez has been back on the market for two or three weeks now. People aren't exactly breaking down the door to buy the place, although we have had a few viewings. A couple came earlier in the week and had a good nose round. They seemed to like the place, but the message that eventually came back through the estate agent was that the bathroom was too small.
Victorian semis, by definition, don't have large bathrooms. They didn't have them when they were built, so whatever space the bathroom is in now was created by chopping a bedroom in half. If, by some quirk, the house does have a large bathroom, then it means, like our next-door neighbours, you've given up a bedroom. People like bedrooms more than bathrooms, apparently, so most people go for the smaller bathroom option.
If you knew you wanted a big bathroom, why even bother going to look at a house which clearly isn't go to have one? You've have, a priori, rejected the place anyway, so why not save everyone the bother and not go?
Most of the time I spend in the bathroom, I spend alone. A larger bathroom wouldn't enhance my experience, particularly now they've resized The Guardian. Most of the remaining time is spent with the kids; they in the bath, me not. True, a little more square footage wouldn't go amiss now and again, but it's not something I'd make a special effort to secure. Is there some other bathroom related activity that needs lots of space that I just don't know about?
Thing is, we've been looking at houses too and I can imagine two scenarios.
Maybe they like the look of everything else about the house so give it a look "just in case"
Or, they never intended to look at your house, but they set a viewing up with an estate agent and they decided to shoe horn yours into the deal too. They did this to us on Saturday, "we're seeing this one and Acacia" they say, "Acacia? New to me I say"
Thing is, there is a reason we didn't ask to look at Acacia, we'd seen it on paper and it wastn't us. Still, we played ball.
But actually, I hate this sort of thing. Msybe it explains why we had 20+ viewings and very few of them came to anything - consider yourself lucky they said "the bathroom is too small", usually I had nowt feedback.
And people wonder why estate agents have a bad name.
[added 24th Oct 2005]
Have you had giants coming round looking at your place? [added 24th Oct 2005]
Passed Bom in the street again yesterday. Didn't say hello this time though, as he was on the other side of the Wake Green Road. Practicalities aside, there are, after all, only so many times you can stop someone and say you enjoyed their gig, especially when that gig is some time passed, without appearing to be some kind of nutjob stalker. One time, in fact. Perhaps calling out "Hi, Bom!" would break some sort of kayfabe. Maybe he isn't Bom when he's not on stage?
Anyway its a bit far fetched, nice looking bloke like him would needs a sex toy, plenty of bent nobs out there for the likes of him!! [added 5th Dec 2005]
Can't confess to being overly fussed one way or the other when The Guardian went all new millenium and small. I'm now fully in favour as the new size is much easier to handle while on the throne. Turning pages is child's play in even the most cramped convenience.
Sadly the new format still leaves plenty of room for articles by Zoe Williams. This weeks effort in the magazine about her dog was bloody awful, worse even the her previous piece about her bike or the fawning celebrity oh-I'm-so-in-love-with-them profiles she seems to specialise in. I hestitate to suggest what her next subject might be, for fear of being right. I suspect she has a article on how much she loves her Apple Mac in the works, perhaps followed by one on her love affair with kitchen white goods.
But difference is good. [added 21st Oct 2005]
£11,179.42 plus one car... for us, anyway.
If only ...

... That's Life was still running.
Went to bed rather late yesterday, and so heard Radio4 shut up shop for the evening. I'd forgotton that, rather charmingly, they head off into the night, or hand over to the World Service anyway, with a quick verse of the national anthem.
Our national anthem starts so well. There's a nice introductory drum roll, to let everyone have a bit of cough and a spit, but as soon as the words start it really falls away. It's just too slow. When ordinary untrained people sing slowly, we all tend to drop both volume and tone, which means sooner or later everyone has to jump up an octave or just silently slip off the bottom of their register. If the anthem was a bit perkier we would all stop trying to sound like Bryn Terfel (while actually sounding like a rather ill Lee Marvin) and just get on with job of singing.
The South Africa national anthem always sounds terrific, a fact I attribute largely to its pace. Of secondary importance, it has four verses in four different languages, so most people are singing most of it more or less phonetically. Consequently, people just get on with making a nice noise, without have having to, for example, make the word "our" last two seconds.
New Zealanders, on the other hand, generally seem a pretty cheerful bunch. Stumble on to a group of them singing God Defend New Zealand, though, and you might think you had interrupted the funeral of a not especially well-liked relative. It's no wonder the All Blacks do the haka afterwards, as it's probably the only way they can rouse themselves to play.
Of course, even if our anthem were a little perkier, there's the problem of the words. Now being Queen, or indeed King, isn't a job I would wish on anyone. You don't get to retire, obviously, you have to meet a lot of people you probably rather wouldn't and travel to places you'd rather not go to. It's a small consolation that at important national events people sing a song in your honour, but frankly I think it would be better all round if we let the Queen retire like a normal person. We could bin all the words about what a good egg the Queen is, and instead sing a good rousing song about how top it is being British. If we could leave God out too, that would be marvellous. Dontcha think?
Item: I have been a Telewest/Blueyonder customer for over 5 years, and recommend them to other people because it just works.
Item: NTL are renowned for their crappy quality of service. Everybody I know who is an NTL customer hates them.
Item: NTL announces Telewest takeover.
Item: My Blueyonder connection starts going up and down like a whore's drawers.
However, you have to ask yourself: Do I feel lucky?
- maybe time for zero tolerence?
But then, take the path of lest-resistence, do nothing until it gets bad
Wow - how many cliche's in one comment? [added 5th Oct 2005]
Of course it could all be to do with this bandwidth increase that's supposed to happen soon. If it's still gammy after that then, well, um... [added 5th Oct 2005]
I am with BlueYonder as well and my access has sucked lately. [added 7th Oct 2005]
Slides from my ACCU 2005 presentation on XSLT Unit Testing are available at last.
XSLT is a programming language - so treat it like one. Testing it isn't actually very hard, if you get your tools to do the heavy lifting.
XSLT Unit Testing slides available
XSLT is a programming language - so treat it like one. Testing it isn't actually very hard, if you get your tools to do the heavy lifting.
I'm using a different approach - I have JUnit tests with a bunch of helper methods to do XSLT transforms, to check whether XPaths match, to see whether two XML documents are the same, and to do schema validation.
Before comparing documents, I pass them through a normalizing stylesheet which, for example, puts attributes in order and collapses non-significant whitespace. Most of the time I'm checking that XML can go through a series of transformations and then come back to the original XML again, so I don't need very much in the way of validation rules.
I've also got pseudo-Schematron in my XSLT - template matches with an xsl:message terminate="yes" so the transforms crash out if there's unacceptable content produced by a previous stage. I'm planning to add an explicit Schematron stage, but haven't done so yet.
My tests at the moment test the pipeline of stylesheets as a whole - I haven't got tests for the individual functions within the stylesheets, although I've been thinking about adding them using Jeni Tennison's unit test framework (well, actually I was thinking about writing my own unit test framework, but it looks like Jeni's does everything that I want it to). [added 4th Oct 2005]
Committed several big patches over the last week or so, the end result of which is that the XPath engine, DOM and SAX are (as far as I can tell) fully parameterised on string type. There are a couple of things left to clear up, but it's essentially done.
Up to now, the XPath engine had been confined to std::strings, so this is good news I think. By way of a test, I've been building and testing using this custom string class
class silly_string
Default and copy constructor, equality and assignment operators - I think those are reasonable things to expect from a string class :) Everything else is dealt with by the string adaptor class, which I've also reworked a little. I'll describe that in more detail later.
{
public:
silly_string();
silly_string(const silly_string& rhs);
~silly_string();
bool operator==(const silly_string& rhs) const;
silly_string& operator=(const silly_string& rhs);
private:
...
}; // class silly_string
Passed Bom in the street yesterday evening. I didn't notice his magic drumstick, but he may have had it about his person I suppose. I stopped and said hello, and how much I'd enjoyed his show at the Jug. Show seemed like the right word for what he did - stories, jokes, top-flight one-man-band style multi-instrumental playing. His face passed from initial alarm, through worry to quiet pleasure. Lovely.
| << September 2005 | November 2005 >> |