programming

Tools for visualizing code

January 26th, 2009  |  Published in programming

When looking through some particularly convoluted code last week I started to wonder if the code was always that complex or if it was a gradual change as several developers attempted to implement the necessary features.

Perforce, which VMware uses for SCM, as well as other SCM systems let you view or check out prior revisions of a file which is helpful, but isn’t all that interesting because you can’t easily compare the files; you end up looking at them one at a time.

Is anyone aware of a tool that will automatically create slideshows or videos of versioned files?  I think it’d be neat to generate a series of snapshots of a file and be able to flip through them and watch the code itself evolve.

This idea was inspired by the code_swarm experiment conducted by Michael Ogawa at UC Davis.  Be sure to follow the link for some cool visualizations of popular open source projects.

Tags: ,

Three steps to follow when dealing with code

January 12th, 2009  |  Published in programming

I was reading Massimo Banzi’s Getting Started with Arduino over the weekend and came across a wonderful, page-long explanation in the Troubleshooting section that all software developers should take to heart when reading, writing, and using code as it explains the general approach for each quite well.

I won’t reproduce the explanation here due to copyright restrictions, but you can read the page on Google Book Search.  It boils down to this:

  1. Try to understand how the parts of the system work and what each component is supposed to contribute to the overall system
  2. Determine the component boundaries and what their responsibilities are
  3. Test each component individually and gradually build up the system, testing it as you go

I like his explanation so much I think it should be one of the first things drilled into software engineers.  It also seems quite applicable to test driven development as well.

Tags: , ,