←back to thread

Code Is Debt

(tornikeo.com)
118 points tornikeo | 1 comments | | HN request time: 0s | source
Show context
rappatic ◴[] No.45087890[source]
This is a shortsighted way of seeing things. The first issue, though surface-level, is using LOC as a measurement. If Company A’s million lines of code are cleaner, clearer, and better-documented than Company B’s 100k lines, then in that case Company A would be better off. What I’m getting at is that the author means to talk about complexity, and is using lines of code as rough measurement for complexity. Code itself is not debt, the complexity engendered by code is.

Code is an asset. It is the product of software companies. Having more assets certainly increases complexity, but this is almost definitionally true. Imagine saying “the US interstate highway system is debt, because it’s complex and difficult to maintain.” The premise is true, but the conclusion is such a one-dimensional way of seeing things.

The AI stuff aside, in light of the above, what is the author’s thesis here? “For the same code, all else being equal, it’s better to have less complexity than more complexity”? Sure, true, but that’s a pretty easy and obvious point.

It seems this entire article could have been profitably boiled down to “make sure your AI coding tools aren’t adding unnecessary complexity to your finished code.”

replies(9): >>45087961 #>>45088301 #>>45088506 #>>45088509 #>>45089090 #>>45090377 #>>45092979 #>>45093286 #>>45111951 #
1. lukev ◴[] No.45089090[source]
Hmm, I actually think complexity is a red herring here.

Postulate that you have a viable software business, and work backwards from there. Everything else: every purchase and every pay period you pay someone to work for you is a cost, from this point of view, and undesirable unless necessary for the welfare of the business. But every cost is a step away from the platonic ideal of a business, one with arbitrarily high profits and arbitrarily low costs.

I agree that complexity is worse than simplicity, to the extent that complexity really is more expensive. But cost: whether long term or short term, capital or operational, is what really matters.

The question is whether LLM-generated code increases or reduces cost. Size, complexity, and a million other details not considered in the OP or in your comment all matter a lot.