January 27, 2003

More Spooky-ness

I did some more hacking on Spooky last night and ended up splitting the implementation up into a core stylesheet and individual implementations that further refine the project creation. There's only support for simple Java projects at present, but I'll add some more.

This'll make life easier for me, if no-one else. I tend to start hacking away at stuff and then, if the idea looks fruitful, go in and tidy up afterwards adding a project structure, build files, etc.

Now I've either got the option of automating the project creation so I work in a tidier way from the start. Or can tidy up after a hacking session by creating a spooky description of my in-progress project.

There's now a project page.

Little languages are fun.

Posted by ldodds at 02:08 PM | Feedback? | TrackBack

January 26, 2003

FTrain to use Cocoon?

Whilst dropping in on the recently revamped Cocoon Wiki, I noticed that Paul Ford has added a page there, noting that he's going to try, "over the next year, to implement Ftrain.com in Cocoon".

Should be interesting to watch. Ftrain is one of my favourite sites.

Having implemented a (very) little language for working with project structures (Spooky), I'd considered producing another abstract language for describing simple Cocoon applications. That would hopefully help people, like Paul, who are approaching Cocoon for the first time.

Because they provide higher-level abstractions than the implementation (host) language, little languages can also be used as learning aids to introduce at least some of the features (if not all the syntactic details) of the host language.

Posted by ldodds at 05:38 PM | Feedback? | TrackBack

January 24, 2003

Spooky

This is spooky. Matt Biddulph has just posted a template for Java projects which is basically a tar ball of a standard project directory structure and an Ant build script to go with it.

In my last couple of lunch hours, after updating eclectic I've been tinkering with something very similar which I'd nicknamed "project maker". Basically its a little language for describing project structures. The language is implemented using XSLT.

This stylesheet generates an Ant project that (currently) contains two targets: makeDirectories which builds the directory structure and makeFiles which creates some basic files for the project. Both the directory structure, file location and default contents are described using an XML vocabulary.

Here's an example "project maker" file, and the generated output.

You can arbitrarily nest the dir elements to describe the directory structure, and can include fileelements anywhere to trigger the creation of a file.

If the file element is empty then its contents will just be the file name (the ant concat task needs some default content to trigger the file creation), otherwise it'll be the provided content of the element. This is currently, and for no good reason, limited to plain-text (other elements are stripped).

My next steps were to allow the specification of a default license (I was thinking that the generated Ant script would grab a copy of the license using a provided URL), and construct a default Ant script for working with the newly created project.

I was motivated to do this for similar reasons to Matt: I got fed up with manually creating new directory structures for projects and wanted something quicker. However I'm also tinkering with "little languages" like this, exploring the use of XSLT as a code generation tool. "Project maker" currently generates an Ant script, but could easily be adapted to create a shell script for example.

I'll maybe do some more work on this in the background (it's one of a few different little languages that I'd like to try out), and may liberally some ideas from Matt's Ant script: his pause target is particularly nice. The only changes I'd make would be to extend the "project maker" language so that the user can specify some extra details about the project, e.g. Is it just java? Are there any EJB tasks to do? XDoclet? Documentation generation, e.g. from JSP tag libraries, Docbook, etc also seems important.

I've quoted the name of the tool all the way through this piece because I was never entirely happy with calling it "project maker". It's a dull name. Now I'm just going to call it Spooky.

Update I've continued work on this, and Spooky now has its own project page.

Posted by ldodds at 09:00 PM | Feedback? | TrackBack

It Ain't Just RSS, or even HTML

There's been a lot of discussion about Mark Pilgrims latest article on XML.com. See, to pick a few examples, Dorothea, Marks follow-up comments and those of Dare Obasanjo.

I thought I'd comment briefly on Marks' suggestion that "the ability to parse ill-formed feeds becomes a competitive advantage". In short, he's right. And it doesn't only happen with RSS, or even just XML: I've seen it happen with SGML too.

Imagine you're a company that accepts metadata from multiple sources, process that metadata using off-the-shelf SGML and XML tools. Of course you strictly validate the incoming material and push back on the producers when things go wrong. This causes much back-and-forth because sometimes the production of this data is also outsourced, meaning there's some disconnects involved: the publisher doesn't create the markup, and doesn't have the technical facilities to check what the typesetters produce.

This scenario isn't all that far from someone using a blogging tool which generates their RSS feeds for them: they have no idea how the hard work is done, and often don't care.

Now, imagine that you're muddling along, but another consumer of that material decides not to use markup tools and that everything is hack parsed with perl and regexps. Gets kind of hard to start pushing back on the publisher when you get responses like "well DataConsumer B managed to process this OK, what's wrong with your system?". In other words your inability to consume that data can be seen as a failing. And if DataConsumer X is a competitor then you can probably see how things can degrade.

So, possibly, there's a dynamic involved here which isn't limited to "DataConsumer A leans on Publisher B" to get them to fix up their act, but more like DataConsumer A co-operates with DataConsumer B to fix up their act to the benefit of both. The consumers need to work together and evangelise to each other, not at the publishers who are arguably following the path of least resistance (which unfortunately leads ever downwards).

Why is it to the benefit of both? Because then both DataConsumers A and B can benefit from using off-the-shelf commodity tools to do the heavy-lifting of processing the data. They're effectively outsourcing that grunt work, which is arguably not what their core competency is anyway: it's more likely they're competing on doing something interesting with that data. And with a higher quality data feed underneath they can start to build more interesting features on that data. In RSS terms that means doing cool thinds with UIs (which can definitely be improved) and all of the RSS modules that are appearing.

The above is something I've actually dealt with in none RSS circles. That particular problem was eventually (largely) solved when DataConsumer A bought DataConsumer B. But that's not an option for most RSS consumers!

Posted by ldodds at 05:30 PM | Feedback? | TrackBack

January 23, 2003

Quick Hack: W3C List Sidebar

I've added another sidebar to my Tools for XML-Deviants. This one just provides quick access to the archives and search function of all of the public W3C mailing lists.

It's just a quick hack using an XSLT stylesheet to process the W3C archive homepage which happily is XHTML.

Personally I find this preferable to keeping lots of bookmarks, although admittedly the list of archives is rather long. Hope you find it useful too.

Posted by ldodds at 10:08 AM | Feedback? | TrackBack

January 22, 2003

Old Scribblings

During some of our more recent house re-shufflings I unearthed several boxes of my old role-playing materials. Most of it is a box full of games, supplements and magazines.

Most interestingly (to me at any rate) is all my game preparation materials. I used to take part in several campaigns and ran my own Call of Cthulhu campaign for several years -- firstly with a gaming group at university and then, after we'd scattered to the four winds, as a play-by-mail.

It was the latter material that was the most interesting as I did literally reams of research. I had the luxury of time at that point because I was rapidly discovering that a degree in Biology, with a specialisation in Ethology (animal behaviour) wasn't exactly marketable. Deeply interesting but definitely not marketable.

When writing scenarios I was really in to having lots of hand-outs so, for example, I used to write extracts from various "forbidden texts" for CoC campaigns. I also liked tying the campaign into real events or research. I can remember that I once managed to dig up an anthropology text book concerning some tribes living on a remote island, that the group were actually visiting during the campaign. The text book was written in the 1930s (the period during which the events took place) so added some nice authenticity and realism. There were even some cool photos.

Digging around in my treasure trove further, I also found the board game I wrote based on Brian Lumley's Necroscope series. I'd also had aspirations to turning it into either a play-by-mail, a computer game, or perhaps even an actual product. Lumley's setting is nothing if not colourful.

I think I got as far as writing a Commodore 64 application in BASIC to handle the turn mechanics but not much further. I think we actually managed to play the game just the once, so I've still no idea if it's really playable.

My next discovery was an issue of Valkyrie magazine containing my first ever published article. Actually, I seem to remember them accepting 2-3 articles, but I think that they only published one in the end. The magazines life-span seems to have been particularly troubled so publication schedules were a bit infrequent to say the least.

The published article was called "The Twilight People" (the title is mentioned
here). The description they give it "Generic Dark Fantasy" isn't particularly illuminating so, briefly: it was an adaptation of an idea from the P.D.James book, The Children of Men for a fantasy setting.

In the book (the only P. D. James novel I've read), the human race has become sterile and the last generation of children term themselves the Twilight People. I just made the not hugely innovative leap to altering the sterility idea to apply to elves instead: they're often cast as a dying race in fantasy settings and I thought this was an interesting twist.

I also found some copies of Interactive Fantasy which was an excellent magazine and one that I'd aspired to write for. Judging from the website its been equally troubled. I've got issues 2-4 in case anyone wants more information on the articles they contain.

So...I've got a box full of material in limbo until I decide what to do with it. Perhaps I'll stick it all online, who knows, perhaps someone might be interested in it?

Update: Myself and some friends also once put together a fanzine, some of which is online here. Our big coup at the time was getting an "interview" (actually more an exchange of letters) with Robert Rankin. Amazingly people actually bought copies. It still makes me chuckle anyway. Which was good enough for us!

Posted by ldodds at 11:32 PM | Feedback? | TrackBack

The Unproductive Web

The more I use the web the less productive I become.

I don't mean this in a "slacking off work, reading Slashdot and Dilbert" kind of way, but something a little more complex. I was thinking about this on my walk home from work this evening trying to nail down exactly what is bothering me. These 15 minute walks (yes, I'm lucky enough to work that close to home) are where I typically get to think through thorny problems (Rio turned up, Rest of world turned down). Usually, but not always, ones of a technical nature.

I've concluded that there are several contributing factors:

The Weight of Ideas -- there are so many interesting things happening, some many interesting discussions taking place that its hard not to spend time aimlessly searching and browsing. I've always been of an academic bent, so I'm naturally drawn towards picking up new bits of information, figuring out how things work, problem solving, etc, etc. I used to spend hours wandering though the library at university, digging through old journals this is just the more in yer face digital equivalent.

It's kind of hard to ignore everything that's going on around you, and focus on any given task or idea. Even then there are so many different viewpoints to a discussion, or ways of solving a problem that simply researching and contributing saps away time.

In short I tend to find myself reading one more site, one more posting, one more technical specification before I get started that I use up my enthusiasm before I do anything.

This is worsened by Final Mile Syndrome, something I've suffered from for a long time. FMS is a bipolar complaint. At the one extreme I never start anything until just before it has to be completed: I don't start running the race until I've walked to the Final Mile. At the other end of the spectrum is the rush of enthusiasm following a new idea that drags you headlong towards the finishing line. Until the Final Mile that is. Then the enthusiasm wanes and all forward progress ceases.

The first manifestation of FMS is usually triggered by any deadline that isn't actually today or tomorrow. The second manifestation of FMS is often triggered by hitting a difficult problem, which I mull over for several days and then my Knee-Jerk Enthusiasm kicks in.

Knee-Jerk Enthusiasm describes my typical reaction to a really cool idea: "This is fantastic! I must plumb its depths and read absolutely everything on this topic immediately...".

I'm guessing you're starting to get the picture now right?

The sum of all this leads to Web Angst: that guilty feeling you get when you realise that you've not updated your blog/website/open source project. This is often brought on when faced with the sheer volume of creative output typically encountered when scanning even a moderate list of favourite sites.

Hope I don't sound like I'm whinging. I'd just thought I'd write this down both to get it off my chest (the main reason) and to see whether anyone who happens to wander by has suffered from a similar malaise. Actually the latter would be good because then I can ignore this nagging sensation that's telling me I'm a "work-shy fop".

The solution is probably to get off my arse and get some work done. After all I've managed to train myself out of making bloody TODO lists (the most depressing time management tool ever invented). So there may be hope for the old dog yet.

Now, what's on Slashdot at the moment...

Posted by ldodds at 10:20 PM | Feedback? | TrackBack

January 13, 2003

Tools for XML Deviants

I'm unearthing bits and pieces of code that I've got lying around my hard drives at home, so I can finally finish them off and post them to the net.

The first bit out the door is actually nothing new: these tools have just been languishing, somewhat abandoned, on some free web space I was using for a while.

Anyway my Tools for XML Deviants are now back online. These are two Netscape sidebars (plain HTML rather than XUL currently) that provide quick access to the search functions of various XML news sites and, most usefully to me at least, the XML-DEV toolbar which provides easy access to the XML-DEV archives.

Today I started tinkering with a sidebar for the W3C mailing list archives, as I occasionally surf through the recent postings of several of them.

Posted by ldodds at 09:39 PM | Feedback?

Golf

Is it a sign of impending old age if you wake up one morning to discover that the latest Playstation game you're addicted to is Tiger Woods PGA Tour 2003?

Surely there's some mistake here? Shouldn't I be rampaging the streets with GTA3, or stealthy infiltrating with Metal Gear Solid 2? Why has the fact that I can get up and make a cup of tea mid-game and not be either arrested or shot, become an influencing factor in my choice of game?!

And its not just me. Everyone I've played it with has gotten addicted too, even my wife. She's on it as I type. I'll stop now so I can go and wrestle the controls off her. St. Andrews beckons...

Posted by ldodds at 09:09 PM | Feedback?

eclectic, wordtin, and this blog

Here's the relationship between the three websites I'm maintaining at the moment.

  • eclectic -- freshly invigorated for the new year, this is where I blog discussion on XML-DEV and, when there's a slow day or something catches my eye, happenings elsewhere in XML-land
  • .
  • wordtin -- my online notebook. Just for me to jot down notes, ideas, etc. in fairly rough form. Reasons for name described here.
  • Lost Boy -- this blog. A more personal blog which is highly likely to contain lots of geekery, but is also somewhere to put random links, rants, opinion pieces, etc. Depends on how much time I get really. Name derived from the nickname awarded me by friends for the out-of-focus "lost boy" expression I acquire after one too many ales, and the jittery nature of my attention span.
Posted by ldodds at 08:54 PM | Feedback?

RDF Graphs, XPath and the Jena API

Currently wondering whether this work might be usable for manipulating simple FOAF graphs, or whether I should just stick with the RDF query language built into Jena, plus the hooks provided in the API to add custom Selectors.

I find myself thinking about a FOAF document as a graph: the foaf:Person being edited is the root, with properties (e.g. foaf:mbox, foaf:knows) as descendents.

So using something like XPath is a good fit to my mental model, even if its not necessarily entirely snug with the RDF model. I was also surprised to find what I would consider to be a few holes in the Jena API. Others might disagree, and I'm perfectly willing to admit that these gripes are likely to be a result of my limited grasp of Jena, and are really minor niggles with what has so far proven to be a very easy to use API.

Last night I wanted to just remove a set of Resources, in this case the list of current friends. This would allow me to delete friends from the internal model built up by the FOAF-a-Matic before it exports RDF data. But I found that there was no way to remove just a Resource from the model, and that the ResIterator doesn't support removal either.

Casting about a bit I found that I could remove a Statement But, as you might expect, this results in just the relationship being removed. The Resource that is the object of the Statement remains intact.

In the end I discovered that if I removed all properties then it would be removed from the model, which seems slightly counter-intuitive.

This all seems quite a round-about way to handle something which should be fairly simple. The equivalent in database terms would be a DELETE CASCADE ("Delete this statement and all objects"). Leads me to wonder whether there are further layers required in RDF APIs for handling less fine grained manipulations of RDF graphs. I don't have enough experience yet to be sure.

Another example that springs to is that there's no way to create a typed Resource in a single step. You have to manually create a resource, then assign it an rdf:type property. An API should handle some of these routine tasks for you.

I'm likely to accumulate a set of Jena based utility classes as a result of this. I should make sure that they're independent of the main code base. I should probably digest this ramble into some suggestions for the jena-dev mailing list as well. I'm avoiding this at the moment as another source of distraction.

Posted by ldodds at 08:37 PM | Feedback?

January 09, 2003

Movable Type

I'm quite impressed with Movable Type, and have still only barely scratched the surface.

The built in styles are all fairly inoffensive so I've selected "Plain Jane" for now. At some point I'm going to have to face up to the fact that when it comes to web design I'm crap. (Look ma, I changed the title colour!)

I either need to spend more time tinkering with and learning CSS, or just give up the ghost and live on the generosity of people who produce styles for complete no-hopers like myself!

Posted by ldodds at 05:20 PM | Feedback?

FOAF-a-Matic in the Guardian

I was quite chuffed to see the FOAF-a-Matic mentioned in this Guardian Online article by Ben Hammersley today, although it was slightly alarming to see him mention Mark 2 which is still in very early beta.

I'll probably spend this evening hacking on it some more.

This is one of the few pieces of code that I've released into the wild so its nice to see it getting widely used. I'd intended it as a tool to introduce people to FOAF, so its good to see it fulfilling its purpose.

Out of interest I've dug out the number of hits to the FOAF-a-Matic page over the last few months

  • December: 1317
  • November: 768
  • October: 1192
  • September: 1834
  • August: 461
  • July: 904

Of course after playing with the tool for a short while its pretty obvious how easy it is to hand-author FOAF files, except when you want to add in some of the more weird and wonderful things like geographic locations, assurance, etc. Then you need a better understanding of RDF (or copy-and-paste anyway!). The aim of FOAF-a-Matic Mark 2 is to provide a prettier interface, but also track new additions to FOAF as they come about.

I've also added a mini-HTTP server (only responds to HTTP GET from local machine) to the development version of FOAF-a-Matic Mark 2 so that I can respond to requests from bookmarklets. This will allow me to do auto-discovery of FOAF data from a page, RSS files, find friends in common with a person whose weblog you're reading, etc, etc.

At some point I should probably de-couple this from the user interface so that you can run this in the background without having an extra window cluttering the place up.

Switching to using Jena to hold the internal data model and deal with loading and saving of data was a sound move, and I'm kicking myself I didn't just do this from the start. The tutorial is very good if, like me, you need a leg-up to begin with.

Posted by ldodds at 04:51 PM | Feedback?

First Post

This is just a test post to try out my shiny new Movable Type powered blog.

I need to spend some time looking at how I can refine the templates to something I like.

Posted by ldodds at 01:21 PM | Feedback?