Thursday, September 24, 2009

Random Thoughts: Visas and RaVis

1. Visas

I'm applying for a visa to the Russian Federation. One of the questions they ask on the visa application is to list all of the countries you've visited in the past 10 years and the years you visited them. This is a non-trivial question for me.

2. RaVis

This is a textbook example of everything that's wrong with open source software. And probably a perfect example of Conway's Law. It's mainly developed by the UN (yes, that UN). I have an import line like this:

import org.un.cava.birdeye.ravis.graphLayout.visual.edgeRenderers.BaseEdgeRenderer

Yeah. Right.

3. RaVis, Part II

Because this took me literally all morning to figure out. Here's how you add nodes to an existing RaVis graph:

// I'm using XML-formatted objects, as per the example code.
var o : XML = new XML("");

// What none of the postings tell you is that you need to
// create the new node on the vgraph (view), not the model
// graph. The vgraph will automatically create the model
// nodes for you.

var n1 : IVisualNode = vgraph.createNode(null, o);

// I'm using an existing node as the second part of the link
var n2 : IVisualNode = graph.nodeByStringId("1").vnode;

// Then, again in the view, link the two nodes together.
// The vgraph will create the edge in the model for you
var ive : IVisualEdge = vgraph.linkNodes(n1, n2);

// If you have MXML edgeLabelRenderers, you'll need to add
// data to the model and view Edge object. (Oddly, the model
// linkNodes takes an object parameter. But the view does not.)
o = new XML("") = = o;

// With this code, you don't have to do something like
// vgraph.graph = graph or a vgraph.draw. It just happens

Hopefully this will help someone else...

Wednesday, September 09, 2009

Frequent Flying

One thing I've noticed is that when I've been at one of the high levels of frequent flyer is milage inflation. Basically, if you sneeze on a flight, management will send you 1,000 extra miles.

For instance, I took a recent trip to the Raleigh-Durham area. My routing had me flying 5145 "real" miles (including the 500 mile minimum). But, I ended up getting 22,631 miles for the trip. Or roughly four time more miles than I flew. The bulk of this was a 10,000 mile "loyalty" reward, but there was still 6,486 miles in various "Class" and "Elite" bonuses.

All this is a further reminder that I've never, ever, EVER been able to use frequent flyer miles on myself.