Hacker News new | ask | show | jobs
by FarProfessor 1912 days ago
"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - yup!
4 comments

Reminds me of another quote:

"Software ended up saving the Defense Aerospace industry. It was the only way of adding cost that didn't also add weight."

I don't see how this misses anything, weight as progress criteria isn't wrong because of assembly time but due to the effect of added weight
This misses something, though. The problem with lines of code isn't that it discounts assembly time, it's that it rewards complexity.
The point of the analogy is that both metrics are, fundamentally, useless. A 787 (unloaded) weighs about 175 tons. Does this mean that putting 175 tons of material at the end of the assembly line corresponds to the complete and proper assembly of a 787? Nope. There are other far more useful measures: does it look right, is it fitted correctly, does it pass QA (testing), is it composed of the correct pieces or just things that resemble them?

In software, LOC is, itself, a useless measure for progress for the same reason: It indicates nothing of value. I have inherited programs in the 10s and 100s of thousands of lines of code that I was able to reduce to less than 20% of their initial size without loss of capability, and generally with improved performance, stability, and maintainability. The right measures are around functionality and the other meaningful qualities (stability, security, testability, etc.).

My interoperation was always that both lines of code and airplane weight was harmful to the end product.
I'm stealing this one.