Top
Best
New

Posted by bucket2015 2 days ago

If AI coding is lowering your code quality, you're not managing quality right(www.i-kh.net)
127 points | 169 commentspage 2
qarl 2 days ago|
I'm quite happy with the process I've stumbled into:

1) Plan the hell out of everything. Aggressively have multiple agents weigh-in on that plan, in sequential waves. Don't skimp here.

2) Have subagents review every code commit.

3) Create tests for EVERYTHING. If something breaks you want it discovered immediately. Not just unit tests - use golden masters to ensure your UI doesn't break, etc, etc.

Nothing magical, but it gets me to a very stable dev system. And all I have to do is paste those three rules into my agent, and he does it all for me. It's not difficult.

perrygeo 1 day ago||
I wonder if the definition of "code quality" needs to be updated? Consider DRY: There's a lot of cases where, if I was writing by hand, I'd prefer a succinct abstraction that's easier to type and reduces repetition - all good things right? Most developers, myself included, would gladly accept the complexity and runtime cost of a good abstraction if it saved them thousands of lines of boilerplate.

What about when repetitive typing is no longer a constraint? Do we need to pay for those abstractions? An LLM can scour the codebase and repeat patterns without getting tired. A simple-but-repetitive codebase might be ideal for an LLM.

This is one place I see AI coding changing the definition of code quality itself. I'm sure there are more...

zahlman 1 day ago||
> So the best planning and implementation skills I’ve seen usually follow this pattern:

> Instruct the agent to think through the test scenarios and test cases based on the requirements, Write the test cases, Write the implementation, Test the implementation against the test cases and fix any issues that come up, Maybe backfill any remaining coverage gaps—but again, keeping the requirements in mind.

It's too easy, in general, to write tests that simply mirror the implementation. I wonder if it would be better to spin up two sub-agents to attempt test cases and implementation in parallel, so that neither poisons the other's context.

altern8 2 days ago||
Of course, it's your fault, not LLMs not being able to write good code and destroying whole codebases in a matter of weeks.
NietTim 2 days ago|
Is your llm force pushing to main? If so, why are you allowing that?

No LLM will destroy any code base in any time frame without permission from an human operator. That person is responsible for allowing the code base being destroyed.

altern8 2 days ago||
It's not.

My manager expects stuff to be done 10 times quicker than 2 years ago, and that can't happen if I spend time understanding and fixing all code being pushed. At that point I might as well write it myself.

voakbasda 2 days ago||
That’s a you problem, not the AI. Stand up to your manager and explain to them how the situation is their fault. Or take responsibility for your complicity from not quitting. But don’t blame the AI for process failures that it did not impose on you.
zwaps 2 days ago||
You are holding it wrong!
deterministic 2 days ago||
I completely agree. It 100% matches my experience. The C++ code I maintain now is higher quality, more maintainable, higher performance, less buggy, and faster to modify now using Claude Code.

However it doesn't happen automatically. I spent a lot of time experimenting with Claude Code to figure out the right way to use it.

It's a tool. Learn how to use it well.

sippeangelo 2 days ago||
If AI coding isn't lowering your code quality, you're not using it enough
FabCH 1 day ago||
This entire discussion can be summarized as:

LLMs have speed development up so much, the difference between engineers and programmers is becoming too obvious to ignore.

mococa 2 days ago||
AI writes unmaintainable code - you can see that many projects don't accept it.
aleph_minus_one 2 days ago||
> AI writes unmaintainable code - you can see that many projects don't accept it.

There also exist other good reasons why projects don't want AI-generated code, in particular

- because of unclarity of copyright status and consequences of AI-generated code

- because the project leader simply made the observation than many programmers who hand in AI-generated code care more about "getting things done" and "pushing through their changes" (possibly to boost their CV) instead of deeply caring about code quality

MikeNotThePope 2 days ago||
To be fair, so do humans.
sarchertech 2 days ago|||
Yeah but in my experience AI boosts output of those humans 10x and only boosts output of programmers who do write maintainable code 50-100%.
goalieca 2 days ago||
The issue I’ve observed is that good humans brainrot and let the AI do the thinking for them. Too many say LGTM and then push a PR.
bigstrat2003 1 day ago|||
Some humans, yes. Most humans write much better code than an LLM.
gedy 2 days ago|
Maybe it’s addressed here, but LLMS will not produce better quality new code/systems/products than the persons prompting are capable of. Either by specing out in detail up front, or by a lot of interactive back and forth steering as it's built, or by having it copy some reference system.

I don't mind this, but this is not how this is being sold at all, and many folks use these tools to be lazy.

More comments...