Semi-Structured Data and the Web – Day 5.5

Two weeks later, on deadline day…

I think I defeated the XQuery assignment. It took the best part of a week, guessing at around 18 hours,  but my 485 lines of code handle everything I can think of that was within the spec of the assignment. It was loads of fun handling transformations from various combinations of sequences, choices, star-expressions, minOccurs and maxOccurs in an element to a XML description of regular expressions, as well as implementing a combinations generator and a function to filter out unique elements in a sequence of elements.

I’m sure all that stuff with a functional lean is pretty old hat to someone who’s a Python, Erlang, F# or Haskell guru, but for little ol’ me with my OO background, it was pretty painful to swap my thinking over to immutable variables (which I’m sure is a contradiction in terms!), a complete inability to track state and just plain indulgence in recursion.

In short, it was brilliant. Exactly what I’m here for, to get out of my ‘comfort zone’ and learn new ways of thinking.

Transforming XML documents using XSLT seems to be a bit of a breeze. I have used XSLT before the course and I generally like it for doing transformations. It has a flexible template-based structure which makes reuse quite attractive and works in quite a straightforward way, once you’ve got the idea behind it. As a friend commented over lunch the other day, it’s a very declarative way of doing things. If you try and write procedural code in XSLT, you’ll probably have a hard time of it. As will the next guy, who has to maintain your templates.

The manual run of a tree against a tree grammar was a little painful. There were some tedious aspects to it, but it did show up a couple of things in the algorithm that I hadn’t quite understood properly, so it was a very worthwhile exercise.

Still no sign of any marks for any of the assessments, and things went kind of quiet on the email and discussion forums front too. Turns out to be due to the issues with the Blackboard product I mentioned in the last post, and illness in the teaching staff. In fairness, the deadlines have been slightly extended further to compensate. I’m told we’ll get some marks back later today…

…and that’s the end of my first MSc module’s taught component. Now, there is a big gap, barring the exam for this module in May, before the next year begins in October…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s