upvote
It’s still a bad metric.

I have worked with code where 1000s of lines are very straightforward and linear.

I’ve worked on code where 100 lines is crucial and very domain specific. It can be exceptionally clean and well-commented and it still takes days to unpack.

The skills and effort required to review and understand those situations are quite different.

One is like distance driving a boring highway in the Midwest: don’t get drowsy, avoid veering into the indistinguishable corn fields, and you’ll get there. The other is like navigating a narrow mountain road in a thunderstorm: you’re 100% engaged and you might still tumble or get hit by lightning.

reply
The number of bugs tends to be linear to lines of code written meaning fewer lines of code for the same functionality will have fewer bugs.

So I’m pretty skeptical that reviewing 2000 lines of code won’t take any more time than reviewing 200 lines of code.

Furthermore how do you know the AI generated lines are the open highway lines of code and not the mountain road ones? There might be hallucinations that pattern match as perfectly reasonable with a hard to spot flaw.

reply
> The number of bugs tends to be linear to lines of code written meaning fewer lines of code for the same functionality will have fewer bugs.

It depends on the code. If you’re comparing code of the same complexity then, sure, 2000 lines will take longer than 200.

I was comparing straight linear code to far more complex code. The bug/line rate will be different and the time to review per line will be different.

> Furthermore how do you know the AI generated lines are the open highway lines of code and not the mountain road ones?

Again, it depends on the code. Which was my point.

Linear code lacks branches, loops, indirection, and recursion. That kind of code is easy to reason about and easy to review. The assumptions are inherently local. You still have to be alert and aware to avoid driving into the cornfields.

It’s a different beast than something like a doubly-nested state machine with callbacks, though. There you have to be alert and aware, and it’s inherently much harder to review per line of code.

reply
There’s still a limit on how far one can drive in a day, no matter the road.
reply
deleted
reply
That's assuming the 200 lines are logical and consistent. Many of my most frustrating LLM bugs are caused by things that look right and are even supported by lengthy comments explaining their (incorrect) reasoning.
reply
Ok? No one is saying that all LOC are equal. Ceteris paribus, 2000 lines is 10x more time consuming to review than 200
reply
deleted
reply
> 2000 lines is 10x more time consuming to review than 200

Very far from the truth in practice, every line of code isn't as difficult/easy to review as the other.

reply
But why would the lines in the 2000 case be easier to review per line?
reply
Which of these programs is easier to review

  {x{x,sum -2#x}/0 1}
or

  def f(n):
      if n <= 1:
          return n
      else:
          return f(n-1) + f(n-2)
They're both the same program
reply
Holy shit, read the words I wrote. Ceteris Paribus. Assume the 200 lines and 2000 lines have a similar distribution of complexity.
reply
Romanes eunt domus
reply
deleted
reply
The point is that LOC is never a good metric for any aspect of determining the quality of code or the coder because it ignores the nuance of reality. It's impossible to generalize because the code can be either deceptively dense or unnecessarily bloated. The only thing that actually matters is whether the business objective is achieved without any unintended side effects.
reply
> The only thing that actually matters is whether the business objective is achieved without any unintended side effects.

Objectives change; timeliness matters. The speed at which you deliver value is incredibly important, which is why it matters to measure your process. Deceptively dense is what I’d call software engineers who can’t accept that the process is actually generalizable to a degree and that lines of code are one of the few tangible things that can be used as a metric. Can you deliver value without lines of code?

reply
> Objectives change; timeliness matters. The speed at which you deliver value is incredibly important, which is why it matters to measure your process.

This assumes that shorter code is faster to write. To quote Blaise Pascal, "I would have written a shorter letter, but I did not have the time."

> Can you deliver value without lines of code?

No, but you can also depreciate value when you stuff a codebase full of bloated, bug-ridden code that no man or machine can hope to understand.

reply
You seem determined to misinterpret. I’m not talking about LOC as a measure of productivity. The ratio of LOC needing review to the capacity of reviewers (using how many LOC can be read/reviewed over the sampling period) is what’s being discussed. Agentic AI/vibe coding has caused that ratio to increase and shows a bottleneck in the SDLC. It’s a proxy metric, get over yourself.

“All models are wrong, some are useful”. What’s not useful is constantly bitching about how there’s no way to measure your work outside of the binary “is it done” every time process efficiency is brought up.

reply
Yes, reading this back, I definitely veered off-topic. I apologize. I still don't think that you can say how much time it will take to review code based on how many lines of code are involved, but my argument was not well crafted. I just hope that others can learn something from our discussion. Thank you for being patient with me, and I hope you have a good day! :)
reply
Its still posssible to run any LLM in a loop and optimize for LoC while preserving the wanted outcome.
reply