"Measuring programming progress by lines of code is like measuring aircraft building progress by weight."Obviously, you make progress in designing an aircraft by figuring out how to make it lighter weight, not by making it heavier.
The thing is, though, that like any measurement the problem is typically not in making the measurement, but in what you do with it. In particular, though the number of lines of code in a project is certainly not be useful for determining how close to finished it is (given that much of the work is in the debugging and testing stages), it can be used to estimate the total amount of "progress" -- that is, programmer time and effort -- that's required in the project in total. For a given type of project, with a given programming team (or similar teams), the amount of effort is roughly proportional to the number of lines to be written.
You can argue this by handwaving about making estimates and in this case or that case it worked, but there's still the compelling imagery of that quote to contend with. So ... what really happens if you try to measure aircraft by weight that way? I was curious and decided to try it. Just like with software, we can't expect similar results over very different kinds of airplanes, but we can consider similar ones -- for instance, Boeing jetliners. Thus, an experiment: Take the operating empty weight of Boeing's current planes (I pulled the data from Wikipedia), and their cost as a proxy for effort required (Boeing helpfully has a 2010-average-price list on their website), and make a simple linear regression for everything from the 737 to the 777. Then, use that to predict what a new 787 Dreamliner will cost.
Can't possibly work very well, can it?
Here's the chart. The gray line is the linear fit to all the pre-787 planes.
And there you have it. Absolutely spot on (0.02% error) for the 787-8, and not too bad (11.2% error) on the 787-9. If I could estimate the effort in my software projects to within 12% of the actual effort that easily, I'd be absolutely thrilled.