Simplifying code maintenance and understanding program flow

Because there is currently a one-to-one correlation between the code that you see in your editor and the code as it is stored on disk, a developer is severely limited in the ways that she may visualize the structure and program flow of a component. Separating the presentation of the source from its storage allows for a number of time saving enhancements while dramatically increasing a developer’s ability to understand the code.

Attempting to follow the path of execution through a simple two-level hierarchy can be difficult. An example is shown below that utilizes a template (abstract) method. To follow the execution path the developer must switch back and forth between AbstractContainer and NoNestedChildrenContainer.


AbstractContainer with Template Method


NoNestedChildrenContainer implementing the Template Method

Rather than swtich between the two classes, the developer should be able to see all methods (or only the ones that they choose) at once. The developer may choose to edit the superclass’s method in the unified view.


NoNestedChildrenContainer Displaying All Methods

Alpha blending has been used heavily throughout these images. While prototyping these designs it was determined that the WYSIWYG Javadocs, for example, were distracting when attempting to look at the code. When the developer moves her mouse over the dim Javadoc, alpha blending is used to brighten up the image to its full-bright state and when the mouse is moved out, the javadoc becomes dim again. Likewise, when the mouse is brought over methods from a superclass they are made full-bright.

Although it is not immediately obvious, the various blocks can be collapsed as in a conventional source editor. (The visual cues for this functionality are still being worked out.) When all blocks are collapsed the class very closely resembles a UML class digram. This unexpected consequence as lead us to some interesting ideas that will be shown in the upcoming entries.

This entry is continuing the thread on separating the presentation (view) of a programming language from its storage format (model). There are also entries on annotating, internationalizing, adding images and de-textifying source code.



  1. Pingback: Internationalizing source code « Rob's Random Ramblings

  2. Pingback: Annotating source code « Rob's Random Ramblings

  3. Pingback: Picture this « Rob's Random Ramblings

  4. Pingback: De-textifying programming languages « Rob's Random Ramblings

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s