Measuring an Interesting Fact

Share/Bookmark

I like numbers, I like measures, I like to rationalize and to optimize. Certainly this passion lead me to create NDepend 6 years ago, that comes with 82 code metrics and several artifacts to measure and visualize coupling, complexity and evolution.

Part of my understanding of agile methodology, is that developer should live in a clean environment to avoid being slown down by unnecessary luring stuff. Hence, sometimes, I use the awesome WinDirStat util (free) to clean the NDepend working environment. Basically WinDirStat analyzes a hierarchy of folders (or even one or several drives) and shows various metrics about files and folders organization. It also comes with a colored treemap that is extremely convenient to pinpoint unnecessary fat files and folders. I have to say that WinDirStat was of great inspiration to originally create the NDepend metrics panel.

Today WinDirStat taught me two things I didn’t know, surprising at first glance, but then understandable afterthought.

  1. The 3,787 C# files that compose the current NDepend version (including tests) weight 19.2MB and represent only 2.9% of the entire NDepend working environment.
  2. Most of the NDepend working environment space (80.9%) is actually consumed by data generated from the code:
  • 39.3%: compiled assemblies (exe+dll), that are somehow duplicated by the matrix Trial/Pro, Debug/Release/ReleaseObfuscated, .\objdir
  • 27.2%: large XML files (produced by obfuscation and code coverage tools)
  • 14.4%: PDB files that correspond to assemblies

Lesson learned: The real asset, the one that consumes most of the energy, I mean code+test code, represents a ridiculously small portion of the whole working environment.

Nota Bene1: Here I only consider a snapshot of the current development. A complete development environment includes also evolution of the code. All this data, typically stored in a Source File Versionning Controller, is of course much larger than a snapshot.

Nota Bene2: The 2.9% reserved for code is even an over-estimation since a third of the code is generated for CQL parsing, compilation and execution.

Share/Bookmark

This entry was posted in Treemap, WinDirStat. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • http://lifeh2o.blogspot.com lifeh2o

    Space Monger is still much better.
    http://www.sixty-five.cc/sm/

  • Mike

    I use HDGraph. It does disk space pie charts. It’s pretty good.

  • http://codebetter.com/members/Patrick-Smacchia/default.aspx Patrick Smacchia

    Dhananjay, no treemap is not our invention although NDepend is certainly one of the very first tool to adapt it to code measurement and browsing.

    According to wikipedia:
    This idea was invented by University of Maryland, College Park professor Ben Shneiderman in the early 1990s. Shneiderman and his collaborators then deepened the idea by introducing a variety of interactive techniques for filtering and adjusting treemaps.

    It is great to see that the industry can practically take advantage of recent/non-trivial and innovation brought from the academic world.

  • http://dgoyani.blogspot.com/ Dhananjay Goyani

    Thanks for introducing this awesome tool. Also, good to know about TreeMapping – I thought the way NDepend renders metrics panel is its original idea.