DLOC
I fully support this metric: A New Code Metric : Destroyed Lines Of Code (DLOC). I suspect that deleting extraneous lines of code is often far, far more enjoyable than actually writing that code in the first place.
We all know that the first dump of code for any feature of any notable size (I’d argue somewhere above six lines of code or so) is almost never perfect. Never as concise as it could be, never as elegant. At least, that’s the case for my code anyhow. At the moment of creation this dross is offset by the acute focus of the mind that created it, juggled it, pure clarity incarnate. But as time passes and the mind drifts further and further from that moment of creation the inelegance of the code percolates to the surface while the clarity clouds and fades until eventually, one fateful day, the mind returns to that block of code and instead of resuming the juggling, it gasps a “Wtf was I doing here? And why did I do it like that?” and then “Six lines? More like three lines jackass – sha-zam!”
And in deleting and refactoring some beauty is regained, and the inelegance to clarity ratio decreases and the code is better, for some personal measure of “better”.
And in that the mind has just undertaken constructive destructive refactoring. And it is good.