I've been seeing a lot of posts lately that make me feel like we're bringing back the old, misguided metric of measuring productivity by the number of lines of code generated.
It took us decades to move away from that shortsighted obsession with quantity and toward quality, yet the AI marketing machine is running at full speed, selling this idea once again to product owners and project/team managers who perhaps weren't around to witness the disaster this mindset creates in the medium and long term.
There are plenty of CEOs out there turning this into a competition over who generates the most lines of code, which is honestly a rather bizarre metric. It's easily "gamifiable," and for that very reason, it fails as a meaningful goal.
In the past, people exaggerated this kind of productivity the slow way (and some even bragged about it!). Now AI can do exactly the same thing in record time.
To be clear, I'm not against AI. I use it regularly in ways that genuinely improve both my productivity and my knowledge. But, as always, regardless of where the code comes from, it still deserves critical analysis. How many of those lines actually add value instead of merely putting out fires? How many of those thousands of lines end up being discarded after a more thoughtful review?
Edsger Dijkstra argued that measuring programmers' productivity by lines of code (LoC) is an extremely costly metric because it encourages the writing of insipid code—monotonous, lacking originality, and devoid of elegance or substance. He believed that lines of code should not be viewed as something "produced," but rather as something "spent," emphasizing that code is a liability: it requires maintenance, increases technical debt, promotes unnecessary complexity, and often leads to poor design, as developers may prioritize quantity over quality.
As always, we have a target: to deliver the functionality necessary for the software to remain viable, fulfill its purpose, achieve its objectives, and generate value for both those who build it and those who use it.
If those thousands of lines help achieve that while adding even more value—not just reaching today's goal but also making it easier to continue achieving future goals—then that's perfectly fine.
But if we start falling back into the old mindset of saying, "We're productive because we delivered the feature," even though we wrote ten or a hundred times more code than necessary, then for software that isn't short-lived—software that will be used, refactored, and evolved over the medium and long term (and perhaps even short-lived software, given how fast things move today)—we'll once again be shooting ourselves in the foot.
I've seen this happen many times before: the situation becomes so unsustainable that nobody can effectively maintain the code anymore, and the whole project eventually falls apart. The true measure of efficiency isn't just what happens while the code is being written. I'd even argue that its greatest value is determined after it's been written.
"But today's landscape is different from what it was all those years ago."
Is it, really?
The foundation is essentially the same. The tools have changed.
But that's for each of us to decide.