#[Arabica]XPath: union
For the first time in several months, I've checked in some changes which break the build. I'm working on the union expression again, and I need to implement a comparision function for DOM::Nodes. I haven't done it yet, so the build is broken. Sorry :)
[Add a comment]
# And the winner of Moseley MasterTeam is ... not the same as
last year. Bum
Gevs said Not at all related to the above, but can i jump on a soap box for a second and draw you attention to the following link http://www.actionburma.com/ Buy the single (its bloody good), watch the short film and read about getting involved with the cause.
[added 22nd Jun 2005] brenda [w] said But you tried, but in the end the better team won. It was the taking part that mattered most. And I have more trite cliches where those came from. Didn't you come second? Here are the
happy winnners. More pics
here. :)
[added 2nd Jul 2005] The smugger team you mean ... [added 3rd Jul 2005]
[Add a comment]
#What's happenin' holmes?
GTA: San Andreas is what's goin' on. You down wit' dat?
Fo' sure.
mattb said I think you blogged about MP John Hemming a while back? Did you know the thing has now been reported in the paper? Probably due to your tip off it will turn out...
http://icbirmingham.icnetwork.co.uk/birminghampost/news/tm_objectid=15644474%26method=full%26siteid=50002%26headline=hemming%2dsnared%2din%2dage%2dold%2dtrap-name_page.html
[added 20th Jun 2005]
[Add a comment]
#What's the etiquette?
Chap at a client rings up, asking if I'm interested in a piece of work. While I've worked for the company before, he doesn't know that and has, in fact, been given my name by someone at a third company. I tell him, briefly, about my past history with his company. We discuss some work. We agree that I could do it. He says he'll call back when the spec and sample data is sorted out.
Next day, rather sooner than I'd expected, another chap at the client rings. He's been given my name by the first chap. He talks other bits and bobs of work. Can I start Monday? I say yes, then we have a think about it and he says Tuesday instead. I say yes again. We agree a time to meet.
HR emails. Would the previous contract terms be ok? I reply with my current rate and payment terms, but otherwise yes. She quickly replies saying tough tits on the payment terms. I say nothing.
Sometime later, HR mail again - we checked what we paid you last time, which is less than you want now, which was more than we pay our other contractors. We thought it be that same as before.
Now this strikes me as a bit rude, really. Up to that point, nobody had asked me about how much I cost. The engagement is short, and I'm starting within four working days, at their convenience. I last negotiated terms with them a year ago, and haven't worked for them since the end of October last year. I, frankly, don't give a stuff about their other contractors. That's their business. If they were really worried about the price, they should have said so at the outset.
What's the etiquette here? Is it proper to bring this up now? Or am I get cheesed off for nothing?
Murk [e] [w] said Bottom line:
Do they need you more than you need them?
[added 10th Jun 2005] I was a bit chessed off when I wrote this. I've since had a rather good email from another chap at the client, who'd read it. So now I'm a bit embarrassed. [added 11th Jun 2005]
prashton said A difficult one, Jez. I once worked with two other guys in a loose partnership arrangement. One of the other partners proposed we increase our fees by 60%. He was out-voted and left the partnership to struggle on his own with his new terms. Our logic was simply that 20 days a month at the going rate was still better than 10 days (say) at the proposed rate. Working is good, not working is bad when you consult.
That being said, you should be paid what you're worth, rarely more, hopefully not less.
The other dimension is the length of the project and what you are bringing to it in terms of non-knowledge-based assets - your computer and software, for example. A four day project should be charged at a higher day rate than a 6 month project.
Finally, there is the all-in fee approach. This can only work when you are confident you can pull the project off within reasonably accurate time limits and that the client isn't going to play around with the project definition after you've started (or completed) the work.
I have found that many clients have no idea about etiquette when it comes to negotiating a fee and more and more they leave it up to the hard-nosed guys in HR to deal with. This is convenient for them, tough for us consultants.
[added 25th Jun 2005]
[Add a comment]
#[Arabica]XPath: namespace axis
In CVS now.
I think the only thing left to do is sorting unions into document order.
[Add a comment]
#Outings
Want to come?
planetcutie said I'm available for the cricket (pending holidays going through), though since I'm giving blood the previous day my alcohol tolerance will be reduced :^)
[added 10th Jun 2005] Sort yourself out a ticket then and then we can arrange a rendez-vous. [added 10th Jun 2005]
I should also mention that I'm going to the cricket with The Bean so, depending on how tired or not he is and how exciting or not the cricket is, we may not stay until the end. [added 10th Jun 2005]
Pete Ashton said Poor Bean. You'll be forcing him to drink Bitter and smoke cigars next.
[added 10th Jun 2005] Get stuffed.
Believe it or not, he wanted to go. When I asked him, he immediately went off to find the card we got with a big number 4 on it. We went to the last day of the test last year and had a top time. Twenty20 matches should have lots of boundaries and lots of wickets, hence lots of opportunities to jump around and wave the big number 4. What's not to like?
Actually, I remember you saying you might fancy giving a cricket a go. It's a tenner, starts at 5:30 and is cycling distance. Phone number is 0870 062 1902. Come on. [added 10th Jun 2005]
planetcutie said I'm presuming the above number is the ticket sales number, right? Any idea of price (I should be able to afford it, but I like to have a rough idea of these things) and what stand to be in? Edgbaston's website seems not to be very helpful here.
[added 11th Jun 2005] Pete Ashton said Maaaayyybe.. We'll see.
[added 11th Jun 2005] Edgbaston's website is rubbish if you actually want to buy tickets. That is the box office number, and the tickets are 10 of your English pounds. Seating is unreserved, so you can sit whereever you like. I rather fancy the Priory stand myself - nice view over square leg and rather less rowdy that the Hollies stand :) [added 11th Jun 2005]
planetcutie said Ooh, 10 pounds is no problem, less than no problem in fact. Using the phone is another thing entirely. Why have a 'buy tickets' option on the website if a customer can't actually do that? Are Warwickshire waiting for next year's Sky TV money so they can fix this? Right. After a bottle and a half I may be able to use the phone, but I can't promise being able to give details correctly.
[added 13th Jun 2005] You can do it. You're in charge. There is no confrontation. All you need is the date, and your credit card. I'll see you there. [added 13th Jun 2005]
planetcutie said Oh,I know that. But try telling that to my amygdala.
[added 14th Jun 2005] planetcutie said Right phoned, bought ticket etc. Dealing with the ticket office was no problem (after the queue waiting piping light jazz music - I thought that after recent revelations that reggae would be more appropriate), but pysching myself up to use the phone was agony. Still, I managed it and I'll get many plaudits in group therapy when I tell them this tomorrow.
[added 14th Jun 2005]
[Add a comment]
#[Arabica]XPath: comparison operators
Implemented
<,
<=,
>,
>= for comparisons involving node-sets. Yay.
[Add a comment]
#[Arabica]XPath: variables returning node-sets
Made a minor grammar fix, and reworked location steps slightly so expressions like $doc/step1/step2 or $doc[pred] work (assuming $doc is bound to a node-set obviously).
Everytime I find a problem in the grammar, which actually isn't very often at all, I give thanks to the pragmatic programming Gods that I used Spirit rather than rolling my own parser. In this case, I'd transcribed
FilterExpr ::= PrimaryExpr | FilterExpr Predicate
after eliminiating right-recursion as
FilterExpr = PrimaryExpr >> *(Predicate >> PrimaryExpr);
rather than
FilterExpr = PrimaryExpr >> *Predicate;.
Time to fix - about 30 seconds. Time to fix if I'd hand-rolled - don't even want to think about it :)
[Add a comment]
#Dogger has cancer
In the bit of him the vet chopped out last week anyway. Feel a bit miserable.
mattb said Oh no, that's terrible. Sorry to hear it.
[added 3rd Jun 2005] Pete Ashton said Crap. Poor Badger...
[added 3rd Jun 2005] JohnH [e] said Pissing Arse! Which bit is it?
[added 3rd Jun 2005] Marv said Poor Dogger. Poor you. [added 4th Jun 2005]
We noticed a lump on his back, right on his spine, while we were on holiday. We also thought his gait was a bit off - he was dropping his left shoulder. So we trundle him into the vet, who instantly decided to have it out.
Initial biopsy results show he has a mast cell tumour. I was pretty miserable when we were first told, but I feel pretty optimistic about it now. Having had a bit of a read around, it seems like he's going to get better or he's not. The lump in question has been dispatched off to Cambridge for a further biopsy, so we'll know a bit more later.
In the meantime, I think he seems much cheerier since it was lopped out. He wasn't in pain before, but perhaps he just felt a bit crap. His gait's improved too - he's not dropping his shoulder any more. Maybe the position of the lump right in the middle of his back was a bit uncomfortable when he walked. Anyway, he seems in a pretty good mood now and, since he has no idea what's going on, there's no reason why he shouldn't.
[added 6th Jun 2005]
[Add a comment]
#Revenge of the Sith
Chum Tony: Yeh, it's kinda like the dentists. You know it's gonna be a painful few hours, but you feel obliged to go anyway.
My appointment's at half past eight.
Well, it wasn't terrible, mainly because there wasn't any dialogue during the fighting, and there was lots of fighting. This time round I didn't find Hayden Christiansen's every screen moment a torture, even though Lucas still gives him some of the Galaxy's worst dialogue. The sequence at the end, switching between Padme's labour and Vader being kitted out with his armour was really pretty good. Did get a bit of a thrill when I heard his first breath. Would have liked to see more of Bail Organa - it's would have been nice to know why he's a goodie and not a baddie like all the other senators. And why, in the supposed democracy of the republic, do people keep electing princes and lords.
But, yea, ok really. [added 3rd Jun 2005]
mattb said I concur with Jez. I went in expecting shite, so was able to appreciate what moments of pleasure there were. The last 15 minutes or so was actually kind of dreamlike, just a sequence of shots, mostly wordless, basically setting the stage for Episode IV.
However, I must lodge my protest at the dialogue. It was especially noticeable when put into the mouth of Yoda who has to transpose everything to Yoda-syntax. Somehow this makes the pointlessness of the lines even more striking. For example, after they go to the Jedi temple and change the evil signal to a good signal.
"Hm. The clones a long time to discover the signal, it will take."
Erk! [added 3rd Jun 2005]
[Add a comment]
#[Arabica]XPath: document order
I've also sorted out a document order issue, so that string(ns) returns the right thing. Most functions which operate on a node-set want the node that comes first in document order. However, until now the node-set returned by reverse axes where, unsurprisingly, in reverse order so they gave the wrong result. Node-sets now keep track of whether they are forward or reverse, so they do the right thing at the right time. Several other XPath implementations get this wrong, btw. For instance XPath Explorer have a play with.
Here's what I mean
<document>
<chapter>one</chapter>
<chapter>two</chapter>
<chapter>three</chapter>
<chapter>four</chapter>
<chapter>five</chapter>
</document>
string(/document/*) = "one"
string(/document/*[last()]) = "five"
string(/document/chapter[5]/preceding-sibling::*[1] = "four"
string(/document/chapter[5]/preceding-sibling::*[last()]) = "one"
string(/document/chapter[5]/preceding-sibling::*) = "one"
That last expression is the most interesting. It selects all the chapter elements before the last one in reverse document order (as we can see from the previous two expressions), but the string() function returns the value of the node which comes first in document order.
One remaining issue here - my implementation of the union operator may not (depending on what you're joining together) return the node-set in any kind of order, in which case this all breaks down.
[Add a comment]
#[Arabica]XPath: relational operators
Started work on less than, greater than and chums. Having read the relevant spec paragraphs again, it's actually much easier than I thought.
[Add a comment]
#Fear the badge, I am the Law
A couple of weeks back, I did my XSLT testing talk to the local Linux user group. I coincided with Revenge of the Sith opening so the turn out wasn't enormous, but it went pretty well. As well as could be expected with an audience who didn't know anything about XSLT, unit testing, Java or automated build tools anyway.
One thing I did notice was, as the evening's speaker, everyone treated me as a de facto expert on any subject, computing related or otherwise. In the bar afterwards, as soon as I said anything everyone stopped to listen and nod in mute agreement. I'd have put it down to awe at having an actual programmer in the room, but I noticed the same thing at the conference. Speakers got a shiny yellow name badge, while normal conference goers got a redblue one. As soon as a yellow-badge-toting type piped up, the redblue-badge-plebians shut down. It was really quite weird, but quite good fun once you realised.
Mick [e] [w] said Us plebs got red badges, BTW. Of course, we don't expect you exalted types to notice the colour of our badges...
(Further BTW - It was good to meet you, but I haven't yet gotten round to writing a custom stream...) [added 1st Jun 2005]
Well, when the time is right you'll know what to do ...
When we get a bit nearer to next year's call for papers, I'm going to encourage everyone to submit abstracts so they too can be treated with respect and deference. I will be, because it's something I could get used to :) [added 1st Jun 2005]
anonymous said This respect and deference thing must be a revelation for you, compared to being shouted down with 'You Smell' ;) [added 2nd Jun 2005]
[Add a comment]