07 March 2009

Work-Life imbalance

I have picked up some contract XSL programming work (well, mostly XSL programming; some ant and some perl to go with; it's the output generation stack for a DITA XML CMS). This is back where I used to work, but not for that company directly; I'm working for, and being paid by, their CMS vendor.

Two weeks into this job, I am, rather embarrassingly, at least two weeks ahead of my own schedule. I was apparently way too pessimistic when I came up with time estimates. (On the plus side, as evidence that I wasn't just whining when complaining of having my productivity hammered by thrash between the roughly three jobs I had at this place before, this might be described as being at least suggestive.)

Stupid bugs 1 and 2 are dead; a new merge process for PDF output (it's DITA and topic based authoring; if you want PDF, you need to turn everything into one big file; this process is called merging) that supports the DITA 1.1 spec's better/cooler maps (map=hierarchy of topics); the code for top level indexing is done, and I have a two column flow to stick this into, too. Second level indexing, attaching the index to the table of contents, and a bunch of testing to go, but I ought to be able to get that done in a week, even giving up a day to get the existing fixes on the production server, so it looks like I'm going to stay ahead of schedule.

So on the one hand, yay!, productivity; I like getting things done and feeling less incompetent than usual in consequence. On the other hand, observe the nigh-total collapse of blog posting. It's gone along with really minimal photography and a general collapse in the ocaml self-study.

This leads me to conclude that I pretty much suck at maintaining a balance between what I want to do, and what I'm being paid to do. With any luck I can now figure out why this might be so in a way that lets me do something useful about it, and yes, I have noticed that the sense of being less incompetent is probably a significant factor.



Stupid bug 1, as a footnote:
<template match="*[contains(@class,'+ topic/keyword')]">
is the opening tag of an XSL template element that matches all the specialized keywords in the DITA class hiearchy. One wishes to match like this because it's more efficient in a processing speed sense to match "specialized keyword" and then figure out which one and what should be done about it. ("Shorter XPath is faster XPath" being the general rule, along with "simpler XPath is faster XPath").

Once this template has matched, whatever element this is (wintitle, cmdname...) is the context node. Once it's the context node, element matches are tests for its children, not it.

So *[contains(@class,'sw-d/cmdname')] within this template, to find the command name element, doesn't work; cmdname isn't a child of any keyword-derived element, and certainly not cmdname itself!

contains(@class,'sw-d/cmdname') does work, because it's a match on the context node.

The syntactic difference can be damnably hard to see as part of code inspection.

No comments:

Post a Comment

Comment moderation should be understood to be whimsical, erratic, and absolute in its operation.

Note: Only a member of this blog may post a comment.