Wednesday, November 20, 2002


Trick Rules

The thing about rules is, they're pretty hard to debug.  You know what you want, but there are a lot of gotchas on the path.  I think I'm getting better at writing them...but I've got a long way to go before I'd consider myself to be an expert.  Jess is pretty cool; I especially like the view command, which lets me see the network of nodes that my rules are generating.  Now if that was annotated with sizing information, I'd be even better off...I could see the weight of each node, understand its system impact better.

What matters in expert systems is what you don't know.  But sometimes you know that you don't know something, and that lets you reason about it.  And maybe later on you can prove that it's the same as something else.  I have a little set of techniques that do these things now.


10:57:02 PM    

Automatic Layout

Is there anything cooler?  I've been examining the various viz systems out there for Java: Tom Sawyer, JLoox, JGraph, ILog, YFiles.  The commercial ones all have one main thing in common: They're expensive.  Not in the "how much would it cost you to develop this yourself sense", but in the "damn that's quite a bit of money" sense.  So far I like YFiles the best -- looks like good engineering, very fine results in the layout.  Poor documentation is a major minus for it, though.  Tom Sawyer has amazing documentation, but the price!  Ouch!  JLoox falls somewhere in the middle.

Most of these kits do a variety of things.  They take a graphical presentation layer, add dynamic capability to it, then blend in automatic layout.  YFiles seems to be more oriented around the layout task than the others.  I just like how its code hangs together -- it just looks good.  Very fast response from the author when I ask dumb questions, too.  I hope to send him a screenshot or two soon, so he can see what I've done with it.

Things I'm thinking about: Network discovery, layouts, service views, and inferencing.


10:09:19 AM    

I did math.

I just did some math.  Not complicated math.  Really simple stuff.  Like rearranging equations and trig and things like that.  It took me three tries to get it right; my equation-handling skills are pretty atrophied at this point.  Still, I got the job done.  The problem was simple: If you want to put n circles of radius r inside another larger circle of radius R, and have them touching each other, what is the value of r given R and n?

Like I said, it took me a while.  I'm glad to see that the laws of mathematics still apply in the Bush era.  At least, they do on paper.

So I have my pretty rings all displayed in a pretty form, nice hit-testing, and TreeModel compatibility.  Over the next few days I'll refine the algorithm for display, try to do some LOD, and figure out a good mechanism for showing what's under the cursor. 

The idea is to produce a nice circular layout that's plug-compatible with JTree.  I don't know if I'll get the whole way there because in a circular layout you can't retain the desired order if you want to use more than one ring to represent a level of a tree.  Otherwise, you can.  What I'll probably do is retain as much of the order as I can.

Time to sleep -- much work to get done tomorrow. 

Automatic layout and visualization is interesting!


1:22:45 AM