Data structures education is a total pain for both sides of the student/teacher education barrier. They are tough to explain, programming them is not trivial, and visualizing them is difficult. I argue that the first two are a function of the last one. The community seems to agree, but nobody has actually DONE anything about it. There are lots of “visialize this algorithm” or “visualize this data structure” one-off programs, but no simple libraries.

I propose that someone (maybe me) write a very basic visualization library that has 2 classes: Nodes and Edges. Perhaps there should be two subtypes of edges – parent edges and peer edges. Then, every node in the data structure inherits from Node, and instead of having pointers from Node to Node, they are linked via Edges. Then, every time a new Node gets created, we can drop it on the canvas, and use sexy graph layout routines based on the Edge type to draw it. Then, the data structures folks can work on implementing harder and grosser and nastier data structures, and the visualization people can work on implmenting more and more readable and understandable visualizations, and the graph layout people can work on better and better layout algorithms, and ALL of these lines of research can proceed independently, while still sharing benefits.

All it takes is a clean API, and about a month of programmer time for someone who is pretty good. Perhaps I’ll blow everyone off and do it myself, but I’d prefer it if I could just use someone else’s library and code. Anyhow, I think that a nice visualization suite would obviate much of the difficulty in explaining a lot of data structures and a lot of algorithms. It’s only our internal sense of pride that “subject A was hard for me to learn, it must actually be hard” keeping us from doing it right.