This assumes all things can be usefully viewed through the prism and language of economics (though my gut feel is few things can or should be).
Making progress in the world is fighting against entropy. Just because it is hard to fight the disorganizing efforts of the universe doesn’t mean that your output is a liability.
> liability: a thing for which someone is responsible, especially a debt or financial obligation.
According to the balance sheet equation,
> Assets = Liabilities + Owners Equity
Certainly all code is a liability - it must be at least understood and maintained from time to time (80% of lifetime cost is in the maintenance).
And while an accountant might also mark it an asset - not all code is an asset - and we recognize that fact when we delete for badness or disuse - or rewrite it to make extending and maintaining it easier.
I'd accept that debts are a subset of liabilities, but not that 'liabilities are debts'.
A debt implies an externality, while a liability implies some generic exposure -- it's that which I focus on when considering (all) code as a risk to an organisation.
I suspect, however, that we agree on the fundamentals. There's some cost and risk to developing and trying to maintain any code base, and accepting that can usefully inform development and operations work better than thinking of code as a (near-)risk-free asset.
I used to program COBOL on IBM 370 DOS/VSE systems they later went to Visual BASIC on Window 3.1 PCs. The conversion took a long time and most code had to be rewritten because COBOL is not BASIC. Management didn't care about that, they just wanted a working project. We all did our best going overtime without pay and working weekends to meet deadlines.
COBOL was a liability when they wanted to convert to Visual BASIC. There was liability to convert the code, convert from DB2 to SQL Server on the database end.
Technical debt is configuration and plugins. You are able to deliver something now with the benefit of changing behaviour later but at the cost of having an enormously increased test surface and invasion into your type system with possibly hostile parameters.
You're betting that the maintenance foregone in the present is paid back with interest in the future.
This "pay back" could be the success of the company which allows you to pay for more developers and tools.
Is it worth it? Time will tell.
If that were the case, the company would have a negative value.
Code is asset that requires maintenance.
But yes, it's definitely worth reminding ourselves of the ongoing cost of maintaining code.
I reconcile the concept that code is a debt with your statement in the following way:
The feature produced by a piece of code can be an asset, but the code itself is a debt.
Thus, for a new feature to be valuable, you want the value added of the feature (or asset) to out-weight the cost of the code (or debt).
As a general rule, the complexity that comes along with a piece of code grows as the code-base and feature set grows, thus, for a young codebase, the value of a feature more easily out-weights the cost of the code.
'Technical debt' is just not debt, it's just an interesting way to think about it, and a neat use of lingo.
There are any number of other business practices for which one could try to apply the same analogy, but it wouldn't work because very quickly the term wouldn't seem right.
For example 'training employees' for a situation, knowing they might need to be trained differently in the future, is not going to be regarded as debt.
Same thing for processes, investment in equipment, parts, materials etc..
Although, you could say that a lot of profitable companies have negative value codebases where the cost to rebuild them is less than the cost to maintain.
This probably explains why some companies get replaced by small nimble startups.