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.
- 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.
- 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.