AI is making us write more code. That's the problem.

I analyzed research papers on AI-generated code quality. The findings:

→ 1.7x more issues than human-written code
→ 30-41% increase in technical debt
→ 39% increase in cognitive complexity
→ Initial speed gains disappear within a few months

We're building the wrong thing faster and calling it productivity.

@mlevison I use LLMs to help me with basic code writing tasks, generating the structural frameworks, saving me a lot of typing time. However, I never rely on that code out of the box, I always review it thoroughly and often just snip and prune. I would never attempt to give an LLM a complicated set of instructions, it's going to fail every time.

@crackhappy @mlevison

Couldn't human made deterministic tools (or changes to programming languages) help with boilerplate work instead of indeterministic intransparent generative AI?

@crackhappy @mlevison

IIRC for some languages there also have been deterministic refactoring tools too that take over the tedious parts of refactorings (like "rename method" which exactly identified callers to adapt them).

@project1enigma these might help

The bigger issue is that GenAI has no judgment. No understanding of correctness; readability etc.

Better refactoring is great, but not enough.

Curious what languages are you referring to?

@mlevison

I personally work with C++ and am old fashioned and code with a text editor.

But the first time I read about refactoring tools, it was about the so called "refactoring browser" for Smalltalk.

https://wiki.c2.com/?RefactoringBrowser

@mlevison

IIRC nowadays there are tools for at least some of the usual refactoring steps in many IDEs for common programming languages. I'd be surprised if there were none for Java for example.

@mlevison

I'm personally also somewhat in favor of code generation for example for data marshalling/unmarshalling, parsing etc.

But that's deterministic specific generators then, either existing (lex, yacc and successors, for example), or in house/ad hoc.

@mlevison

Or using higher level languages where this can be done as libraries supporting domain specific languages instead.

(There is stuff like Boost.Spirit for C++, though that still feels less natural than say parser combinators for Haskell)