Thursday, May 15, 2008

Only the code is in sync with the code

I’m a huge fan of visualization tools. I remember that I once used a tool (called NDepend: http://www.ndepend.com) to analyze all the subsystems of a previous project in which I worked. The project was mostly in managed code, with some strong database logic in the server side. The visualization of the dependencies was chocking: just in the client side we had already created a big monster. There were good intentions in all the design meetings, design diagrams, etc. It is just that the code didn’t attend those meetings...

Not wanting to create yet another meeting, I just went on with weekly code reviews to improve at least the subsystem in which I worked. Those with a little more focus on “visibility” would prefer to first announce a huge effort to address the problem, acting like the “boy announcing his school homework”. Then, a series of action items would be created, and everybody could proceed and be a “professional super hero”. Keep the good humor coming...

The bottom line is that more effort should be put on tools like FxCop and NDepend, which are more important than tools to design diagrams that won’t ever be in sync with the code. Nowadays, no project is developed in a single language, and most design tools have no support for one to design an application in which server-side code (in Java, C# or Python) dynamically creates client-side HTML with embedded JavaScript, while accessing a database (usually full of SQL stored procedures). Only the code is in sync with the code, and I'm longing for a tool that we can just point to the code the compiled the shipped product, and it will generate all the design documents!

No comments: