Monday, February 11, 2008

A little bit of history...

Back in summer 2006, Oliver and I started to think about creating a tool that would measure some metrics, detect design tangles and dump out a report. We wanted to use these reports to serve as quick indicators for the code/design quality and as a base for discussing quality issues with our customers. We then searched for open source projects that would assist us in doing the hard work, providing us the code dependencies and metrics. To make it short, there was none. Next, we checked for commercial products. Again, without luck.

However, as we evaluated and used these tools we got some idea of what we consider to be useful from the developer's point of view. We learned that those "architecture first" solutions tend to fail and that we took the most benfits from tools that really helped us to understand the structure of the code base: now, dependency analysis became a hot topic. Anyway, at that point we had no plans for implementing our own solution in this area.

During fall 2006, we started coding to get what we initially wanted. We decided to analyze Java bytecode, not source. Parsing bytecode is much faster and allows to analyze code bases where we do not have access to the sources. All went fine and within a couple of weeks we ended with a command line tool which produced lots of numbers, formatted as HTML.

In November 2006, we both got involved in a project with one of our customers, so the quality stuff was pending then. By the end of the year, I left the project. Oliver stayed a little longer and I spent some time creating the basic framework for STAN.

I am a Java developer since 1.0. But after years of J2EE I had to realize that I didn't know how to create a Java-based desktop application in these times. I didn't want to come out with one of those home-grown Swing applications, so I played around with the Eclipse Rich Client Platform. Not only that RCP provided me what I was looking for, it was also attractive because it left room for the idea of moving STAN into my favorite IDE one day.

Still early 2007, we went back to dependency analysis. We knew that STAN wouldn't be worth all the effort without having neat graphs. The most intuitive way for drawing dependency graphs uses a hierarchical, layered layout, which ensures that a maximum number of dependencies have a common direction (e.g. top-down or left-to-right). Only a minimum set of "feedback" dependencies point into the opposite direction. We were pretty sure that we wouldn't be able to get this done, but we had no choice. We read some papers on layered graph layout, understood a few, implemented some algorithms, played, improved... About a month or so (I can't remember) later we got a basic implementation. Another month to utilize GEF, yet another to tweak the implementation, yet another to add nifty features like expand/collapse, partitioning, etc.

We began to issue monthly STAN previews to friends, hoping to get some feedback and help. Well, due to continuous annoyance, we got some! In summer 2007, Andreas and Markus joined our team. Andreas took over the IDE integration part. We agreed that it would be really cool to have a "Run As... Structure Analysis" in the Package Explorer's context menu. After a month or so, it was there. Markus had the idea to support other languages and started working on a parser for - damned, I forgot the name... Due to his rare time, he wasn't able to finish it, but it works as a prototype and serves as a proof of concept. I hope we can come back to this soon! Markus also helped to setup our build management.

During fall 2007, we started another feature offensive: the Pollution Chart, the Couplings View and the Dependency Landscape were added. In late November, we felt ready to share a public beta with a wider audience. Finally, STAN 1.0 will be launched within the next weeks...

No comments: