Visual Studio has a feature called Code Map. It parses through the structure of a project and visualize the relationships as a graph. It does a good job handling the layout and performance. However, as the project gets larger, the user’s cognitive capacity fails before the software - the network of nodes and links become too overwhelming to read.
At the time the team was considering using Code Map for visual debugging. At a break point, it can visualize the call stack and its references to the rest of the code. I was brought in to explore how we can make this graph more readable and useful to our users.
The First Try
To reduce the visual complexity of a graph, some nodes need to be collapsed or hidden based on how important they are. In this attempt, I ask that one node of interest be specified - either from user selection or break point - and the importance of other nodes are measured by their degrees of separation from the pivot.
I built a prototype to test this idea. By default, all top-level nodes are collapsed. As the user drills down, the graph morphs while trying to maintain the position of the pivot. The visualization also attempt to group nodes with similar properties, should the canvas become cluttered.
The layout algorithm was pretty naive, but it did show a lot of potential regarding incremental behaviors that we could add to the current product. However, in places where the hierarchies were flat, the visual could still get difficult to follow.
The Second Try
I reached out to MSR and got in touch with some researchers that were tackling the same problem. They were working on a semantic-zoom visualization where nodes were automatically hidden if an area was too crowded.
In the brainstorming I suggested we look at the behavior of Google Maps. When zoomed out to the whole country, a range of factors are used to determine whether a city is still visible, including the size of population, density in the neighborhood, significance etc. We started to work on a new prototype together.
I left DevDiv shortly after but we continued to develop this idea. A paper was published in GD 2015 (Graph Drawing conference, concerned with the geometric representation of graphs and constitutes the algorithmic core of Network Visualization). The following video shows the algorithm in action:
Collaborated with Lev Nachmanson, Nathalie Riche and Bongshin Lee.