by SonicSoul · 11y ago · 0 comments
So it's odd to say that value doesn't lie in code but in the functionality that code provides, without also saying that of everything else, and, to say it at all -- of code or more generally -- is just to use language in an atypical way (and,if its just of code, an inconsistent way as well.)
So, while those are all valid observations about code, they don't make it a liability, they make it a fairly bog-standard productive asset.
If code truly was an asset, it wouldn't really matter if it was 1000 lines or a 1,000,000 lines as they're functionally equivalent right? Or perhaps the million line program would be worth more, wouldn't it? Code is an asset.
But the amount of code directly influences the maintenance cost, doesn't it? And maintenance cost is a liability, no? It's something that you're obligated to pay if you want to keep the asset productive. And an obligation to pay is a debt, isn't it?
Yes this is all stretching a bit, but it's not entirely wrong either.
Functionality only exists because of code. The two cannot be fully separated from each other in the way that some in this thread are implying.
It's the same for code: a running program can certainly be a huge asset, but the less code you have the lower the maintenance cost. The concept is just harder to grasp than paying a kerosene bill each time a plane takes off...
The most valuable kind of software IMO is the kind you don't think about because it never fails, and at that point your LOC measurements are irrelevant.
Conversely, adding lines of code but NOT adding functionality isn't worth a cent.
The "code as liability" argument seems, unless I'm mistaken, to be based on the idea that less code for the same level of functionality means less cruft, and therefore better support for the NFRs that I mentioned above.
That's often true, but not always.
If you're including those NFRs in what you mean by same functionality, then the number of lines of code is utterly irrelevant.
The market value for code without valuable functionality is negative.
[1] Value as determined by how much anyone is willing to pay to use the software.
Tests can provide a number of things: they can serve as API examples, assure functionality, speed up implementing new functionality and debugging.
If you tests don't do these things, they are not worth keeping, either.