JAOO conference – Beautiful code by Dr. Michele Lanza

6 October, 2008 (11:08) | Code | By: Torben

I have been at the JAOO conference this week where I attended an interesting talk by Dr. Michele Lanza on the concept of “Beautiful code”. Perhaps a more descriptive name would be “Perceiving code through the human mind” – in short “Code visualization”. Dr. Lanza talked about the human brains limited capabilities to perceive and retain knowledge with regards to actual lines of code and complex diagrams such as UML. The ability to quickly observe and obtain knowledge about a code base is not easily facilitated by either the code itself – in essence text – or a UML diagram crowded by method, attributes and relations. So what can be done to reconcile that?

Dr. Lanza had a unique way of portraying this.

Imagine a bunch of classes in your average overpopulated UML diagram. It’s not an easy thing to read at all with just at quick glance. Dr. Lanza suggested to remove all the text meta information and replace it with color – darker meant more code, wider meant more attributes and length meant number of methods. The effect was stunning. This simple icon overview gave a quick impression of where potential trouble makers were in the code base. Then he applied a city metaphor onto the chart, where classes became houses, parking lots and so forth. He and his team have released a open source package capable of generating city code snapshots. I cant wait to try it on my own work project to check out our own skyscrapers *grin*

He also did a film where a snapshot was taken with 2 weeks interval. Most interesting you could follow a teams efforts to refactor some of the code base and auto generation of test classes.

Slideshow, CodeCity, CodeCrawler, Dr. Lanza

  • Digg
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • Slashdot
  • Twitter

Write a comment

You need to login to post comments!