Hacker News new | ask | show | jobs
by DanielHB 26 days ago
> Lines of code are a liability, not an asset.

I have been saying this for years, I once had a heated argument about a small system of maybe 1000 lines of code that was technically superior and more scalable but was freaking 1000 lines of code to maintain compared to the quick and dirty 10 lines of code it was suppose to abstract and make generic (for future use of course).

That with also countless debates over insignificant features in frontend apps at the cost of extra code. Frontend code is very susceptible to this maintenance cost dilema.

Many developers are too focused on delivery value compared to maintenance cost. It is unfortunate that non-technical management can see value delivered, but not maintenance cost incurred. With LLM-assisted code this has become many times worse.

4 comments

>Many developers are too focused on delivery value compared to maintenance cost.

The way this is worded feels like it leaves the blame on developers. Aren't these developers focused on exactly what they are being judged by? Shouldn't we say it is the management who is too focused on delivery value compared to maintenance cost? Is it the developer's job to guide management or the manager's job to request guidance, assuming such guidance is needed?

We need to make sure the responsibility to resolve this problem falls on those with the power to act on it, and in this, developers tend to be receiving far more responsibility to fix than power to fix.

I don't think so, my experience is that most often falls into two scenarios:

1) The devs pushing for more complex solutions, covering obscure edge case scenarios, feature-creep, "future-architecturing" because they are more interesting to implement. Classic over-engineering problems.

2) The features the managers actually want are usually boring or annoying to implement and the devs just work around any big architectural problems caused by the feature delivery.

1 is 100% on the devs, 2 it varies wildly, the willingness to address architectural problems are often under pressure by time-delivery estimates from managers. But many devs (especially in companies with low morale) will often just work around issues because addressing the underlying problems can be very difficult and/or time consuming.

Meaning either the dev wants to do the right thing but doesn't have the time, or the dev doesn't care enough and just pushes the tech debt down to the future (when hopefully they will be at another job).

LLMs makes both problems significantly worse, although they are also often very helpful with the big restructurings mentioned in 2. The dev can still be lazy and the deadline can still be too tight even with that extra LLM help.

How is covering obscure edge case scenarios overengineering?
I don’t think this is a great argument for such a small amount of LoC. 1000 lines depending on the service it provides could be very small.
> more scalable but was freaking 100000 lines of code to maintain compared to the quick and dirty 1000 lines of code...
I wonder though if, as long as you have LLMs to maintain the extra code, it's worth it to gain the new feature. Less tech debt than your intuition expects.
Why would an LLM be any more capable of maintaining the extra code than I am?
Because it can read and understand the code base far beyond your ability.

You can pretend that's not true, but it is. And it's only going to get better.

Sure man, knock yourself out.
"Lines of code are a liability, not an asset."

wrong framing imo

EXCESS lines of code are a liability.

Code of course is an asset.. what other real asset is producing cash-flows? lol come on.

It's apples and oranges. Lines of code is just a measurement. You can't look at a whole codebase and say "these X lines are essential, those Y lines are excess, delete those" -- the lines interact with each other to create the whole thing.

It would be like saying "Weight in kilograms of course is an asset for an airplane. That's what keeps it in the air. What other real asset is the airplane made of?"