Older blog entries for taj (starting at number 26)

The TATA book that zhaoway mentioned looks really interesting, I'm currently tree-walkin' and pattern-matchin' a lot these days and some (more) theory will really come in handy. It certainly ranks higher in my reading queue than the other two dozen or so papers and books I've got to get through somehow.

Since my last entry, I've gotten a hang of the MOF and UML metamodels' abstract syntax and written a MOF-to-python mapper/code generator. As I'm working on other mappers and generators (eg UML to EJB, SQL schema and HTML documentation), I'm trying to abstract out syntax tree searching and walking strategies that are common across the abstract syntaxes of various MOF-based metamodels. This should make it easier to write generators in the future and can be useful when dealing with new metamodels, eg those for domain specific languages.

Found an interesting explanation of the differences between various modelling and ontology-related terms.

I currently support version 1.4 of both MOF and UML, but most tools are using 1.3 at the moment. I have not been able to find the UML 1.3 metamodel in an interchangeable format (MOF+XMI), so I've been wondering whether to worry about compatibility problems for now (some do definitely exist). However, the existing UML metamodel is not a "strict metamodel" and leaves a bit to be desired while building tools, eg many places where the semantics of the language are not adequately reflected by the abstract syntax.

I'd like to jump straight to the proposed 2.0 standard, but I have not been able to find it in a machine-readable format either. If it appears soon there seems to be little point in sticking with MOF and UML 1.4 as 2.0 seems nicer already. New drafts of the proposed standard were posted recently, though the working group itself appears shrouded in OMG Mystery and no machine-readable format was posted.

5 Jul 2002 (updated 5 Jul 2002 at 21:25 UTC) »

I've been trying to get my head around the various papers on metamodeling available on the net. The concepts behind the "precise UML" efforts seem simple enough but the terminology can get quite confusing. There are not many mentors around here in Delhi with whom I can brainstorm about this stuff.

When I started doing real work, ie outside academia, I automatically assumed I would work better by myself than with a team. Now after 6 months of getting my wish and programming solo I miss being able to run ideas past workmates, especially those with different backgrounds. At my last job my teammates were a mathematician, a physicist and a philosopher. O ben, O tom, O channa, where are you now.... here were guys who didn't have half the programming experience I did, but when they told me I was wrong (on any subject ranging from cutting code to politics), I sat up and listened. Now I just have my own nagging doubts to argue with. :P

In the mean time my old friend Greg is telling me that "the key to a good modeler is ontological soundness." I wonder if Aristotle would have approved of UML. Greg is one of those people who has been infected with Hidden Markov Model Syndrome, a curious affliction propogated by one of our EE professors at unimelb. (greg: pls dont hurt me)

I've created a sort of declarative syntax for specifying metamodel association constraints, eg

(uml.Package, uml.Class, Containment),
(uml.Class, dgm.DgClass, dgm.Representation),
(uml.Class, uml.Class, uml.Generalization),

and so on. This is used as the modeler's internal representation of the metamodel, currently these rules are specified in python code but eventually I will build a MOF parser once my XMI load/save routines achieve closer to 100% coverage of the XMI DTD.

Now I have a simple querying engine that allows me to 1) ensure the user only builds models that conform to the metamodel constraints and 2) provide custom views of the model based on configurable subsets of the metamodel constraints (eg for a tree view of Project->Package->Class->Subclass etc, like ArgoUML).

The problem is that I am extremely rusty with logic and constraint programming (having dozed through most of the CS classes :P), and all I have is general knowledge of prolog and some functional languages. This is constraining (no pun intended) my ability to write decent querying routines for the metamodel, and I'm going to have to do some serious tuning to ensure that the existing routines scale to large models.

Adding metamodels to the classic MVC architecture, however, even with my currently quite lame implementation, allows for a quite neat framework for creating a whole range of applications. Python helps with this a great deal of course. more about this later...

also working on generating interaction diagrams using python's builtin trace hook. this is an excellent and underutilized (as far as I can see) feature in the python runtime and I expect to see more of it in the future.

Tomorrow I'm going to help migrate a convent school's computer lab to LTSP+KDE+OpenOffice. Should be fun, but the real fun will be watching the kids actually using it. I expect the kids will pick it up well before their teachers do. I really hope this goes well, it could set a great precendent for more prestigious schools in the country.

recent books: Amristar (Mark Tully), The Wreck (Rabindranath Tagore), a random yoga book, Ender's game (again, for old times' sake), The Honourable Company - History of the British East India Company (John Keay), the autobiography of punjabi playwright Balwant Gargi... I went and raided the family library in our ancestral house in punjab. If I didnt have to come back to Delhi I would have been lost in there for several years, as it contains the collections of three generations of a highly bookish family. The last time I saw it was when I was 17 and a lot of those books didnt really appeal to me back then, but now.... jackpot...

1 Feb 2002 (updated 1 Feb 2002 at 21:44 UTC) »

Still in Delhi, still travelling, still hacking, still bumming around...

Going to be here a few more months, which gives me time to keep hacking on my UML project (still no name, codenamed banana because I was eating one when I named it). I noticed OMG's Model-Driven Architecture proposal for the first time. The theory of this appeals to the same rationale with which I am designing this app.

I believe a good up-to-date object model needs to be available for an OO project at all times (both domain and functional). KDOC generates documentation for the models after the code is already written - this is the common approach (javadoc, other reverse-engineering tools). However the key term there is "reverse"-engineering...

Most designers (me included) who draw these models still use paper and pen to draw up these diagrams and they are rarely kept up to date even in larger projects, unless they are autogenerated. The main reason of course is that pen and paper is still the most flexible and free UI for doodling diagrams of boxes and lines. Most UML diagrammers are diagrammers first and software design tools later. The goal is to create a software design and development tool that makes the object model the central part of the project from which the rest flows, and reduce the amount of fiddling with the program required to create and apply detailed models for the project.

Anyway more rants later. the app is going quite well and will be able for screenshots soon. I luv python

Oh yeah and Goa was pretty good. The one party I went to sucked though.

I attended India's first non-commercial Linux conf last week. It was held down south in Bangalore, arguably one of the nicest cities in the country. I was one of the only two free software developers there, yet the standard of the talks and good nature and behaviour of the crowd (1700 on the first day, almost 2x what they had planned for) was just amazing. I'm happy to see so many people in bangalore turning to linux - some of the smartest IT researches and geeks in the country were there (including the Simputer guys who made news last year) and what is standard practice in bangalore is bound to trickle down into the rest of the country. What was amazing was the number of government and defence dept people who were there - anyone who has interacted with the Indian bureaucrats will know what I mean - and not just present, but with there with eyes and ears open. A lot of these guys were using linux for their servers and some on their desktops.

I gave two one-hour talks this time, one about the KDE development platform, and one about the KDE project, similar to the one I gave at linux.conf.au in Jan.

Other things of note:

  • KDE is absolutely huge here.
  • Will there be a lot of free software users in India? YES! Indians are pragmatic people (if any stereotypes can be drawn), and to pick up Linux will come naturally. The entire user base here was established purely because Linux is extremely practical, this much was clear from the conference.
  • Will there ever be a huge number of free software developers from India? I guess so, as grows the number of middle-class students with access to the internet and decent hardware. Let's not deny how many free software developers come from this demographic. :) But for some time this number is going to be small. Certainly the culture of giving things away is hard for many to understand in a country as poor as India.
  • The technical level of the attendees spanned extremes. One guy came to my KDE development talk, and afterwards came up to me and asked, "Excuse me, but what is Qt and what is KDE?"
  • Bangalore is unquestionably the IT capital of India. Also, Bangalore has the largest number of pubs in any city in the country. Somehow these two facts have to be related.
  • Linux localization doesn't seem to going so well for Indian languages. Seems to me that teams from each country have to really push for localization themselves for it to get anywhere. There are a handful of serious localization projects going on in India and they are all running up against problems in both GNOME and KDE. Most of the cross-language tools that they have developed are java-based because that seems to be the only linux-hosted platform that can do it right so far.
Anyway, coming back to Delhi was a real downer. This city sux and I can't wait to get out. Coming Next Issue:

GOA BEACHSIDE HACKERY
Sirtaj empirically determines how much sand it takes to destroy a Compaq Armada laptop. Also, do Goa's much-hyped raves stack up against the competition? Our travel reporter decides!

At Changi and unfettered by cables. There is geek joy in free 802.11 internet access.

Last week of work at my current job. Hopefully they will accept my offer to remain a remote consultant while I'm travelling. I'm getting quite psyched about going back home now, but I'm already missing Australia.

The free time I'm able to spend hacking is going to drop to nil for a month, until I get to Delhi. Then there will be the problem of locating and procuring hack infrastructure over there, somehow I doubt my brother and father are going to let me wipe their machines and install linux on them. Almost time to purchase a laptop.

Meanwhile finans is going well now that I've overcome my issues with adding/deleting rows in a table-neutral way (lots of primary-key fudging, what fun!) so I should be able to have a preview release available before I go.

Somehow I found the time to read a collection of short stories by Jorge Luis Borges, called Labyrinths. It's a surprisingly good book (translated to english from the spanish) combining bits of sci-fi, metaphysics and ... hmm... hard to put a finger on it. I see elements of Poe and Umberto Eco in there, and perhaps some Kafka. Three years ago I would have laughed at anyone suggesting I would enjoy a book like this but it's a great read.

An example: in one story he imagines a world that is in the form of a great library, arranged in seemingly infinite floors and hexagonal sections, each section containing a number of books of exactly the same dimensions and number of pages. The books are marked and arranged by an unknown (to the library-dwellers) code and seem to contain random text. Over the course of the story the narrator explains that each book in the library is unique and contains one possible permutation of letters in a fixed language (consisting of 23 letters and two punctuation characters). This means that every book that it is possible to write is contained in there, in any language that conforms to that alphabet (eg one contains your entire life story, your entire life story with some details incorrect, your life story as seen by someone else... and so on). The problem is that as nobody knows the code behind the arrangement of the books, searching for a particular book or even verifying its correctness is basically impossible. Of course logically, one of the books in the library explains the cataloguing system for the library... but which one? The person able to find and identify this book is akin to God, as he has the key to all knowledge.

This is one of the stories that grabbed me (is there a meta-catalogue book that explains how to find the catalogue book?), but there are others that are of equal or better inventiveness. I will have to read this one several times over.

Since all but 2 mail monitor bugs are closed, it's back to finans for a bit. There are some serious issues with view redraws required when inserting and deleting rows, not sure how long it will take to fix.

Went to work this evening, ANZACs please forgive me this little disrespectful behaviour. Porting apps from old-style jhtml to JSP is a painful thing, especially when the underlying servlets were never designed to work properly in a JSP environment (ServletOutputStream everywhere instead of Writer).

I can't imagine what I would have done if I didn't have that little 20 line perl script to do the grunt work for me, but I still had to manually review 100+ source files before committing them. argh never again...

I'm seriously considering switching back to debian just to see if the update situation is any better. I like mandrake but the distribution upgrade for both RH and mdk fill me with phear. And both of these dists have serious problems providing non-critical updates to older releases.

The reason I switched away from debian was, apt being wonderful and all, I found the only way to keep up to date on non-critical package updates was by moving to unstable and dealing with packages breaking all over the place (not to mention the daily 20M updates of tetex). It's likely I was doing something wrong but it was very frustrating.

To be honest I grew out of obsessively micro-managing my machines a little while ago, I don't get paid to do it and it gets in the way of the stuff I want to use a computer for in the first place. It's not hard to do but it's annoying, all I want is a computer with up-to-date software.

sorry for ranting dear diary but it's 5am and I'm in a cloudy mood so I deserve a bit of slack.

15 mail monitor bugs/wishes closed, good to be writing C++ instead of parsing it for once. I've been ignoring this little program for way too long. Turned it into a KUniqueApp, which is a handy little class, even though the docs are somewhat confusing.

Started writing an XML editor with PyQt out of frustration, but I won't be able to hack on it properly for a while. Another list of projects to keep me busy while I'm in Delhi.

Hi Bob!

The jBoss project is quite impressive. It's eventually going to be a serious contender in the J2EE app server space and you can't beat the license. This is one of the few projects that gives me hope for large-scale enterprise applications written in free software.

Discovered some IBM JVM issues on Linux 2.2.x SMP boxes. Not really 100% reproducible either so I haven't tracked it down.

Nicole is down from Vancouver for a few weeks so not much free time to do a lot of KDE coding. The only visible thing I've come up with for a while is a patch for am_edit for Q_OBJECT detection. The bug reports for my apps are still coming in at a healthy rate - I wonder if I will have time for all this stuff before I leave. I hope I do, as it doesn't look I'll have the resources to do much programming in India. I need a laptop.

There is news floating around that someone has implemented rudimentary precompiled headers in GCC and it speeds up KDE compiles by a factor of 10 or more. Amazing! Can't wait to get my hands on it.

22 Mar 2001 (updated 22 Mar 2001 at 17:09 UTC) »

kjots is a real shame. The idea of having a Palm-like memopad is a good one but so many limitations! I wrote up a short perl script to try and sync up kjots memos with the palm but kjots behaviour and usage of files to store its memos is just weird, so only download from kjots to palm works right now. It's been abandoned for a long time, so I'll try and have a hack at it next week.

Looks like I've been certed master. I'm not sure what to make of it.

KDOC is getting really, really close. From last night it can correctly document the typedef struct { ... } var,... stuff that C programmers are so used to. I'm annoyed that it's taken this long and so much work to make this program worthy of "near completion" status, but in the process I've learned a few things about myself:

  • I appreciate languages that help me write good-looking code.
  • When writing free software, everything seems to me to be a grave bug or missing feature. Funnily enough I have no problem prioritizing these things when I'm at work.
  • I don't like perl as much as I thought I did two years ago.
.. and a bit about perl:
  • Cute features that make life easier when you're writing a short script won't scale. When you start writing a program and a prototype turns up to be roughly 1.5KLOC, it's time to think about whether or not the program is going to grow. If it is, it's time to start refactoring immediately. I don't find this so much of a problem with other languages as I tend to overdesign even the simplest apps. Perl's temptation to throw caution to the wind snuck up on me.
  • In a larger program with large data structures, more often than not you're going to be dealing with references. That's when you find out how strange-looking perl can get.
  • Sooner or later you're going to use the perl profiler, and that's when you learn how much just that one extra function call can cost. When that function call is just hiding some small but dirty code, the decision about what action to take can be a hard one.
I still like perl a lot, but I'm going to think long and hard before I use it to write a program that I expect to grow in a fairly amorphous way. When using C, Java, C++ or even python (at which I'm still mostly a novice), I factor this in without thinking. But somewhere in the perl<->taj interface this natural bond is not being formed.

It's been a good book month. I really enjoyed Yukio Mishima's Confessions of a Mask, Hannibal was a waste of precious time, Iain M Banks' Look to Windward was good in parts (I loved the ideas and descriptions of the dirigible behemothaurs) but it dragged on a bit.

oh and... test cricket is interesting again! Anyone who has been keeping up with the Australia/India series knows what I mean. :)

17 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!