The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
All of these different methods are simply a volume metric and are roughly correlated. But, consider that for a blank link you have to hit the enter key. For a comment, you actually have to type it. For code you also have to type it. For both code and comments you have to think about it and since the comments are about the code, that is relevant. Documentation outside of code also counts in the same way, but probably stripping off the formatting is reasonable. So, simply take the size in bytes of all of the source files. Perhaps it would be worth while to compress each one and then total the size. That would tend to reduce the effect of spaces / tabs and repeated variable names and the length of variable names. Compressing everything together would result in too much reduction in size due to similarities across programs that don't really reflect much.
I have found that, in practice, a simple volume metric is a very good predictor of performance and and time required to complete a project.
A parallel: Technical writers produce 1 page per working day.
At least when I was working with documentation, that was commonly accepted, both by writers themselves and management. It matched our writing department quite well.
30+ years ago, documentation was 98% text, produced with rather primitive tools. Later, modern tools made it much easier to add graphics and other illustraion, typographical effetcts etc. which made the documentation look more "professional" quality. But in spite of more automated and fancy tools, production as measured in pages per day didn't increase: Making a figure to illustrate a point takes as much time as describing it in text.
I haven't been in documentation for years, and nowadays, I guess most software documentation is written by the programmers themselves (so it makes no sense to the users...), and counting number of pages for online documentation is not as easy.
I guess that you will see much of the same as programming languages evolve: The line count produced by an assembly programmer, a K&R C programmer, a Cobol programmer, or a C# programmer would be roughly the same, even though the functionality provided by those "x" code lines vary greatly. There are some obvious exceptions, such as microcoding or APL, but for the algorithmic class of languages, it seems like the variation in line count is not that great.
I'd like to add the most wonderful blues for developers, from Simon and Garfunkel:
Hello Source code, my old friend...
I've come to talk to you again...
Because a vision softly creeping
Left its seeds while I was sleeping
And the vision that was planted in my brain
Within the code... on servers...
The average app's life is 5 years; if yours go "legacy", is there a bonus?
How about a death march that gets canned? A wash? Or do you go negative?
The Master said, 'Am I indeed possessed of knowledge? I am not knowing. But if a mean person, who appears quite empty-like, ask anything of me, I set it forth from one end to the other, and exhaust it.'
― Confucian Analects
I agree! Young programmers today have it REALLY EASY... when I was in my 20's, it was the late 80's and everything you wrote was original. There was no internet, no github, no codebase we were taught and got in the habbit of writing reusable functions so you could use them in other programs. When you bought the Microsoft C compiler, it came with a library of manuals. We used to hire engineers based on how many they memorized, because the more they had memorized, the less time they would spend function searching.
Today, all the reusable functions are online, the manuals are online, programmers today just patch together the methods we wrote in my generation, put together a UI, debug and they have a program. The only "real" programming comes in those rare cases where the code is not available online.
The outcome, more programs are published...but are they comprised of lines of code written? I would estimate the real number is less than 10% for most applications!