June 13, 2016
MarkBernstein.org
 

Too Many Voices

This summer’s research project is to find new ways to help keep Tinderbox and Storyspace maps organized. This involves some very simple ideas – tool to align notes – to some fairly complicated things I’d like to try.

One of the simple ideas turns out to be complicated. Tinderbox (like Keynote, OmniGraffle, and lots of diagramming programs) offers some dynamic guides which, as you drag notes, try to keep notes lined up. If two notes are nearly aligned, the guides snap the notes so they line up precisely. Easy enough!

Right now, Tinderbox looks all over the place for potential alignments. That’s not elegant: you probably want to align on the nearest note, not a note in the outskirts of Gloucester. Fair enough.

Then, you might want to have more guides. For ages, I've wanted to be able to align the centerlines of two notes. It’s easy to imagine more kinds of guides, and it’s likely that, once we start, Tinderbox users will suggest new guides we hadn’t thought about.

To do this, we add a collection of advisors – we’ll call them kibbitzers. Each kibbitzer looks for one kind of alignment: for example, the "top edge kibbitzer" looks for opportunities to align the top edges of notes. The “top edge touching kibbitzer” looks for top edges that are almost, but not quite, touching the bottom edge of another note.

As we rearrange the map, this crowd of kibbitzers nudges things into place. That could be a mess if two kibbitzers disagree, so the kibbitzers have a pecking order. Kibbitzers can work together: for example, one kibbitzer might handle the vertical placement while another adjusts the horizontal placement.

One problem with this sort of design is that, when things go wrong, it’s like kittens in a basket of yarn. For example, suppose a kibbitzer intends to align left edges, but mistakenly looks at the top edge instead. It sees alignments that don’t exist, it speaks up when it should be silent and is silent when it should speak up, and when it tries to help you, it puts notes in distant and arbitrary places. Worse, the other kibbitzers now see that note in a new place and helpfully try to adjust the note again, based on its crazy new placement. By the time everyone settles down, it’s cake on a rake.

This one actually happened to me this morning. I solved it (eventually) with diagnostic writes. It was not a lot of fun. Unit tests for isolated kibbitzers aren’t that hard, but it’s not hard to imagine problems that only arise when you have several kibbitzers trying to meddle at the same time, and that’s combinatorially explosive.