5jt
.com
Welcome to invincible summer.
   Click to find out about me. SJT

29 July 2006

Summer with Yoda

our patron
Yoda: small, light and dangerous
Summer with Yoda
Yoda is what we have named our project to rewrite — from scratch — the pension-claim processing application we work on for our ‘real’ jobs. We’ve each promised to put in 2 days a week over the summer, so it’s absorbing much of my time and attention. It’s exhilarating. The production workspace for the target application is a hefty 5Mb+; we’ve got a simple version running from 300Kb of source files after a few weeks part-time work.

The is very much a ‘new technology’ project. Claims are represented by XML files, and accessed through a Claim class that encodes all the business logic. Refactoring the calculations of the policy value, non-trivial in the original, resulted in a compacted table accessed through a key-indexed property; the calculations then become a classic APL 'inner product': +.×.

Some of the refactoring gets scary simple. When claims are represented by XML files, managing and organising claims can be delegated to the OS file system. I’ve redesigned the GUI code to mirror the ASP.NET architecture; converting to use the application through a browser should be easy.

But the scariest so far has been redesigning document production. The RTF markup software I wrote in 2002 gave us agility with document production. That has been a critical success factor in mopping up the work our customer’s own systems people have not been able to address. Over the last month or so I’ve rewritten it from the ground up as a Document class that produces valid RTF and XML markup. It’s the neatest programming I’ve done in a long while: taut, terse and fast. I’m fiercely proud of it.

Doing this has taught me enough about XML to realise (c’mon Stephen, catch up) everyone — including Microsoft — has moved on to XML-based formats. We should produce documents in an XML format, we should use (a subset of) a public standard — almost certainly OpenDocument — and we could probably use markup functions to compose the XML direct from our application’s scripts without the help of the Document class. In other words, no sooner have I achieved my long-contemplated rewrite than I see it can be ditched entirely.

Just how little code can we use to get this application working with?

Posted by SJT at July 29, 2006 12:31 PM

Comments

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?


5jt.com © 2003-7 Stephen Taylor
Permission to use quotes was neither sought nor obtained.