Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.
Jason Gilman edited this page Sep 6, 2013 · 7 revisions

What is Visualization Driven Development?

Visualization Driven Development (VDD) is the practice of using visualizations to provide feedback on code behavior during development. See What is Visualization Driven Development?

How can I visualize my code?

What are the benefits of visualizing my code?

Many of our examples suggest clarity and excellence in thinking is very much like clarity and excellence in the display of data. When principles of design replicate principles of thought, the act of arranging information becomes an act of insight. -- Edward R. Tufte - Visual Explanations

This quote from Visual Explanations helps explain why visualizations are important. Thinking about how to visualize your code and building the visualization leads to insights in how the code behaves. This is similar to how Seymour Papert, author of Mindstorms and creator of the LOGO programming language, described the turtle in LOGO. He called it an "object-to-think-with".

The Turtle serves no other purpose than of being good to program and good to think with. -- Seymour Papert - Mindstorms

The turtle in LOGO is a surrogate for the LOGO interpreter/executor. It gives your mind a hook, a tangible way to think about the problem. Visualizations for our modern programming languages will be our "object-to-think-with". They make it easy to see and understand what's happening.

Other benefits include:

  • Problems that might normally go unnoticed are more easily seen.
  • It's easier to understand problems and how code behaves.
  • Visualizations are faster for information comprehension.
  • Interactive visualizations allow easy testing.
  • Visualizations become interactive documentation for other developers.
  • Interactive visualizations encourage a scientific approach and experimentation. When experimentation is difficult we resist it. Interactive visualizations make it easy to run the code with different input, gather evidence (code execution data), and visualize the results.

Isn't this just a big yak shave?

The biggest criticism I've received for Visualization Driven Development is that it requires work on the programmers part to create the visualization. This is a valid criticism. We should only add additional overhead to our work flow if it's worth the effort. There are many benefits as listed above. Here's some advice on keeping the level of effort down:

  • Keep it simple. - Don't jump to the most complicated visualization at first. Start with just simply organizing the information visually.
  • Build reusable visualizations. - Build visualizations that can be used in multiple places in a single application or on many applications. The work invested will pay off over and over again.
  • Choose appropriate visualization libraries. - Find visualization libraries that are well documented with examples. You should look for visualization libraries that support the style that works well with your data..
  • Practice makes perfect. - Using a new tool and a new approach is difficult at first. You will learn what works well and what doesn't over time. Start simply and with existing examples.

What about visually impaired software developers?

Software development should be tangible and concrete. Sighted developers sometimes overlook the ability to communicate over non-visual channels such as hearing and touch. Expressing information aurally through sonification is an area that could be explored more. vdd-core's goal is to make it easy to deliver information to the browser for visualization. An "auditory display" of data could be used in the browser in place of or alongside a traditional visualization.

What are the differences between Test Driven Development and Visualization Driven Development?

There is some overlap and I would typically recommend doing both in tandem. Visualizations help you find areas where your code may not be working or can help you understand test failures. Visualizations are also often at a different level than unit tests. Visualizations typically help you understand how larger chunks of an application (or a whole application/system) behaves. Unit tests target smaller pieces of code. Visualizations can be interactive to allow testing. This testing is mostly about poking the system to see how it responds. They help answer the question "What happens if I do this?". Problems found while using a visualization should be captured as tests to avoid regressions in the future.