There's a continuum between "vibe coded by someone with no technical knowledge or inclination" and "hand written domain driven design development". You can absolutely use coding agents AND have maintainable code. But yes, the coding agents will not magically make everything maintainable if you don't tell them to.
"Code maintainability and good architecture don’t have good measurements that we can apply"
Who has no wisdom? There are dozens of ways to measure code maintainability. Cyclomatic complexity is just one.
Nothing stops you from wiring up something like SonarQube metrics to your agentic coding workflow.
Plenty of measurements exist, but the trick, as the article said, is finding good measurements.
Cyclomatic complexity has been pretty solidly discredited within the maintainability research community for decades.
Sonar's cognitive complexity metric is a bit better, but here's a study that found that it still only has about a 0.5 correlation with how much difficulty programmers actually had reading code as measured by multiple methods.
They found that the most accurate way to measure code complexity that didn't involve something like an eye tracker or EEG is still basically just vibes - asking programmers if they thought it was hard to understand.
Halstead Effort came in second, and scored pretty well, but here's another one where it doesn't do so well, either. And it scores the SonarQube metrics even worse, with only a 0.35 correlation: <a href="https://www.sciencedirect.com/science/article/abs/pii/S0164121225003486" rel="nofollow">https://www.sciencedirect.com/science/article/abs/pii/S01641...
Yeah, we have this rule in our SQ and I absolutely hate it because of the number of times I'm forced to break something up. Complexity that matters is usually at a higher, more architectural level.
Yeah. Looking at the code samples in that first page was pretty interesting. They're cherry-picked, of course, but still it's a little galling to see which ones SQ gave a lower score.
I definitely wouldn't want AI to be autonomously using that as a guide without doing some fairly serious internal A/B testing first. Kind of like for cyclomatic complexity, it's just too easy to find ways to maliciously comply. And if that's what you ask AI to do then that's likely what you're going to get.
davedx · · focus · HN ↗
"Code maintainability and good architecture don’t have good measurements that we can apply"
Who has no wisdom? There are dozens of ways to measure code maintainability. Cyclomatic complexity is just one.
Nothing stops you from wiring up something like SonarQube metrics to your agentic coding workflow.
bunderbunder · · focus · HN ↗
Cyclomatic complexity has been pretty solidly discredited within the maintainability research community for decades.
Sonar's cognitive complexity metric is a bit better, but here's a study that found that it still only has about a 0.5 correlation with how much difficulty programmers actually had reading code as measured by multiple methods.
They found that the most accurate way to measure code complexity that didn't involve something like an eye tracker or EEG is still basically just vibes - asking programmers if they thought it was hard to understand.
<a href="https://www.frontiersin.org/journals/neuroscience/articles/10.3389/fnins.2022.1065366/full" rel="nofollow">https://www.frontiersin.org/journals/neuroscience/articles/1...
Halstead Effort came in second, and scored pretty well, but here's another one where it doesn't do so well, either. And it scores the SonarQube metrics even worse, with only a 0.35 correlation: <a href="https://www.sciencedirect.com/science/article/abs/pii/S0164121225003486" rel="nofollow">https://www.sciencedirect.com/science/article/abs/pii/S01641...
pjc50 · · focus · HN ↗
bunderbunder · · focus · HN ↗
I definitely wouldn't want AI to be autonomously using that as a guide without doing some fairly serious internal A/B testing first. Kind of like for cyclomatic complexity, it's just too easy to find ways to maliciously comply. And if that's what you ask AI to do then that's likely what you're going to get.