También disponible en Español


The digital magazine of InfoVis.net

Software Visualization
by Juan C. Dürsteler [message nº 25]

Nowadays people programming computers use almost completely textual environments. The Software Visualization promises to complement them.

Traditionally programming has consisted basically of writing the instructions in a programming language using a text editor, compiling the program and executing it with the help of a debugger to find errors, and then restarting the cycle again until a satisfactory result is obtained.

Nowadays things haven't changed much. Even the programming languages that carry the word "Visual" use a textual interface. Where more visual elements have been introduced is in the user interface programming, for example with Microsoft's Visual Basic  

Nevertheless the many experiences and developments that have been taking place in the research centres, like the animated visualization of the execution of programs or the representation of instructions by 3D elements haven't yet arrived to the daily practice. See for example an interesting list of online articles in the University of Geneva or the interesting page of the GVU Centre of the Georgia Tech.

On the other hand, many systems have millions of lines of code written by dozens of different programmers. Such systems are very difficult to comprehend in their entirety, what makes them excellent candidates for visualization, as in them it's interesting to find patterns of complexity, or of error occurrence, for example, that allow you to take decisions on what parts to modify or which ones present more trouble.

An example of this is the Seesoft developed by the Bell Labs to visualise software. It stands on four basic ideas:

  1. Reduced representation: each program file is represented by a rectangle of fixed base and height proportional to the number of lines that it contains. The lines of code are represented by horizontal lines inside the rectangle with length proportional to that of the actual line and indented as in the code.
  2. Colouring by statistics: each line of code exhibits a certain colour determined by the statistics associated to the line. For example if the line has changed recently or has produced errors in the past or has been executed n times, it will have a different colour. Just by selecting a particular statistics all the associated lines will be highlighted.
  3. Direct manipulation: moving the cursor on portions of the screen you can query the database that contains the code and the lines that solve the query are illuminated with the proper colour.
  4. Ability to read the actual code: in order to see the code you just need to open a reading window and position a magnifying rectangle over the representation of the code.

These types of systems allow you to identify patterns in the programs and to have a global overview of the statistics of our interest. For example you can easily see which files are older, which ones are the most problematic or what lines are the most executed.

For several years the programming environments have included visualizers of the data structures and editors that identify the keywords of the language presenting them in specific colours. These techniques will continue to be introduced slowly in the programming tools of the future, making this complex task more user friendly.

Links of this issue:

© Copyright InfoVis.net 2000-2014