May 15, 2024
MarkBernstein.org
 

A New View

A New View

I’ve been hard at work on refactoring some legacy code from the literature. I want to use it, but before using it I want to understand it, and the code as it stands is quite hard to understand.

This code originates in the 1994, and performs some fascinating computations on graphs, using a really nice algorithm. I took a stab at it a couple of years back, but blew it. This time, I was smart enough to realize that help would be a good thing: a doctoral student in mathematics gave me a very fine lesson, and that was almost enough to get unstuck.

The 1994 code has been revised a few times over the years, but it’s still C++ the way we all used C++ in 1994. It’s one big class with zillions of instance variables. Some of its methods run to hundreds of lines. It has lots of comments, but most of the comments describe what the code does, and I can see what the code does, line by line: what I need is a handle on the bigger picture.

It took a week, including one ghastly false start, but it’s slowly beginning to make sense. I’ve got 11 new classes, and the monolith is down about 400 lines.


The bigger goal is to take a fresh look at hypertext maps, one that gets away from boxes and arrows. I want to get way out there, as I argued in last year’s web studies paper, “The Indefinite Idea Plane Artistically Considered.” For example, spatial hypertext has always posited fixedness and stability: you put things where they belong, and they stay where they are until you move them. Nancy Kaplan was the first to get that into a publication: I think maybe should we call that Kaplan’s Rule.

But what happens (for example) if notes in a spatial hypertext constantly jostle each other in a crowd, trying to get close to related or linked notes? It would be like a crowded cocktail party; there would be some geometry, but individual notes would move on their own. That might be bad, because you could find yourself looking for a particular note. But it might be good, because you’d run across other notes in the process.

So here’s today’s screenshot, derived from notes I made while sketching the Web Studies paper.