Frederik, All,
I just had a great idea for a feature that could apply to the whole NodeBox family (NodeBox 3, Nodebox Live, etc.). I want to mention it for the record before I forget...
Sometimes NodeBox bogs down, sometimes so bad that it freezes or crashes. Often this is due to a simple mistake, causing one node to fire a million times instead of a thousand times. But which node?
Here's the idea: instead of coloring nodes based on node type, provide an option to color them by how long each node took to fire. Nodes not connected to the currently rendered node would be gray or otherwise dimmed. Most nodes, which fire almost instantaneously, would be a soft color. But nodes which took a full second to fire would turn orange, and those which took more than ten seconds would burn bright red.
You could then see two things at a glance: which nodes are unconnected, and which are a possible source of trouble.
Both would be a huge help during debugging. If a whole branch of your network goes dark because of a missing connection you would see that instantly. If one ordinary node (or subnetwork) suddenly turned red you could probably catch your mistake almost immediately.
Even when your network is working correctly, this timing feedback could help you make it more efficient. You could see not only where bottlenecks are located, but also the chain reaction of slowness in one node spreading to other nodes downstream.
What I find exciting about this idea is that it takes full advantage of the visual nature of Nodebox code. In an ordinary text-based language this kind of feedback would be almost impossible to provide. But Nodebox already shows where each nugget of code lies and how it connects to the code around it. All we have to do is light it up!
This would require embedding timing calls before and after each node firing, which could, paradoxically, slow things down (though probably not by very much). And the current coloring scheme does provide some value. So I would probably want this as an option I could switch on or off.
We think of the network pane as the place we enter our code. But it's also a dynamic visualization of that code. I think we could make it a much more powerful visualization. (Another related idea is showing a visual difference between value links and list links - using dotted lines for value links would instantly reveal the true nature of the choreography that happens at each node juncture. Even more exciting: you could animate it to actually see data flowing through your network.)
What do you guys think?
John