Saturday, January 16, 2010

Help Haiti or Apalachia?

A friend of mine on Facebook opined

wonders hwo throwing money at Haiti will fix anything? How about we send that money and that Red Cross aid to the people in Appalachia? They're our own citizens starving and living in hovels. But no, we go to Haiti.....*looks around....steps off soapbox*

I responded:

although it seems as though a lot of people have died in haiti, the real risk is what happens next. if there is no significant help sent right away, then there will likely be more deaths due to shortages of food and water and from epidemics (cholera, typhoid, dysentry, hepatitis) due to lack of sanitation facilities. in 2004, in the aftermath of the indian ocean earthquake, "only" about 200,000 to 300,000 people died because the international response was relatively good. (the usa sent about $2.8bn - which works out to around $9.81 per person).

and it isn't a one way street. in the aftermath of katrina, countries all around the world offered to send aid to the usa in their hour of need.

finally, it isn't a case of either or, is it? most of us could probably afford to send $9.81 to haiti and $9.81 to help people in the slow motion crisis of apalachia.

Tuesday, January 12, 2010

CQL - A Web Friendly Query Language with Metadata Support?

I've been thinking about query languages recently.

As part of my experimentation with MarkLogic, I've been playing with XQUERY, the query language for XML. I find it to be able to do everything I need it to do. I haven't invested enough time and effort to fully grok it (in the way that I did with XSLT last year). However, the fact that XQUERY and XSLT share a common addressing model (XPATH) is a huge win for me. At least I can start *somewhere* with XQUERY. But I can't find an XQUERY equivalent to dpawson's excellent XSL Frequently Asked Questions. I suppose I need to go Old Skool and actually read one of the two books on XQUERY that I bought years ago.

Another query language that I have looked at but have done little more than think about is SPARQL, the query language for RDF. Just like XQUERY (and clearly modeled on the query language category killer SQL) you essentially compose a query document that you post to a service and get back a results document in return (XQUERY lets you construct results in XML, SPARQL lets you construct results as RDF or as variable bindings, as I understand it). There are increasing opportunities to play with SPARQL endpoints, so I suspect that I will have the opportunity to actually work with SPARQL at some point.

However, it is difficult to discuss search without mentioning Google. One of the nice things about Google is that you can compose your searches as URI's. And you can supply additional fields to modify your search parameters using standard URI conventions. I was looking for something that might work in this appealingly simple way but give you access to the full power of searching metadata fields. I didn't want to have to invent my own query syntax.

I looked first at A9's Open Search. This is an attempt to allow search engines to publish a profile of search syntax and formats that they support. Initially very focused on keyword search, there is now a set of draft extensions that are mainly aimed at extended the *results* of a query with additional namespaced information. Although there is some limited support to allow a search to indicate which parameters it supports. So, the Open Search approach seems quite nice, but it doesn't quite hit the sweet spot I was looking for of being able to mix free text search with fielded search, all wrapped up in a RESTful interface.

Then, I came across SRU (Search/Retrieval via URL) and specifically CQL (now the "Contextual Query Language", but formerly known as the "Common Query Language"). It seems that SRU and CQL grew out of efforts to create a fully "of the web" successor to the pre-web Z39.50 library search and retrieve protocol. The SRU part makes it all RESTful (there's an SRW protocol for those of you who prefer to be SOAPy). And the CQL syntax lets you specify fielded search using a nice, extensible mechanism. For the cherry on top, you can return different types of XML (my favourite meta language).

The only thing I am struggling to find is much evidence of widespread adoption or even open source implementation. The Library of Congress are hosting the SRU/CQL pages, so I assume they have adopted it, at least in part. Some other library type organizations (such as COPAC) have SRU/SRW services, alongside their Z39.50 interfaces. And there is some evidence of attempts to somehow bring OpenSearch and SRU/CQL together, apparently by Nature.

Anyone suggestions as to where else I should look?

Monday, January 11, 2010

Writing Use Cases

I thought I would re-familiarize myself with the art of writing "use cases". (A snappy definition is "A use case is a prose description of a system’s behavior when interacting with the outside world.") After a little bit of research, I quickly concluded that Alistair Cockburn's Writing Effective Use Cases, first published in 2000, is still the bible for this topic.

I thought I would see if he has any more recent publications. I found his website and immediately liked it, as he describes himself as "an internationally renowned project witchdoctor". It seems he is still teaching a course based on his book as well as courses based on the Crystal and SCRUM agile methodologies.

Browsing the site, I noticed that Alistair seems to have evolved his thinking a bit on use cases. Reading the pages tagged "use cases" it appears that he has been moving towards a mature and nuanced view of where they work and the exact form(s) the use cases should take. His reflections on the occasion of the tenth anniversary of publishing his book are particularly illuminating. He still uses use cases, but seems to favour "ultra light" use cases in some situations .

My take away is that use cases and stories make sense as a way to structure requirements documents. And that there is value in delivering even just sketches of use cases, particularly when combined with "agile" methods.

Monday, January 4, 2010

Thinking in 3D

I was hoping to see Avatar over the holiday break - I hear it is best to see in 3D. In the meantime, this got me thinking a little about the potential for 3d printing.

When I first heard mention of this technology, it sounded like a sci-fi dream: the ability to create physical objects on demand via printing. But it turns out it is not some far-off future state - 3d printing is used today in manufacturing, mainly for rapid prototyping. And it is started to spread elsewhere. Artists are using 3d printing to create sculpture. RepRap is an open source / open hardware project to create self-replicating machines (3d printers to create more 3d printers).

Current trends include escalating fuel costs and a substitution of the virtual world for physical objects. Could 3d printers be used to create a network of hyper-local micro factories that manufacture the few physical items we want? On demand creation right next door, rather than transporting boxes of things long distances?

Friday, January 1, 2010

Fun, but it didn't work

I think it is safe to admit that my experiment didn't work.

Oh, well. I'm still glad I tried.