News for hackers. Stuff that matters.
Re:AI usage patterns in software teams by nozzlegear on Tuesday August 18, 2026 @11:47PM (#49356486)
> But these days, AI just generates code following the existing patterns of the codebase

Is this sarcasm?

Re:AI usage patterns in software teams by hypfer on Wednesday August 19, 2026 @02:48AM (#49357805)
It does so better the more "standard" the "existing patterns" are. :^)
Re:AI usage patterns in software teams by danggggg on Wednesday August 19, 2026 @06:21AM (#49359485)
I have never found AI code generators to be capable of generating code following existing patterns (and really moreso have been disappointed about AI code generators' capabilities in this regard compared to Emacs/LSP tooling).

I could see it being true in a very regimented design, but I'm still skeptical, I'd like to see details of that design, and I question whether very strict adherence to design patterns limits the ability of the LLM to generate useful features.

Re:AI usage patterns in software teams by lukebitts on Wednesday August 19, 2026 @08:08AM (#49360430)
I read these kinds of comments and wonder what makes reality so different for us. I personally have found AI has the easiest time in the world following existing patterns. At my workplace, our frontend code is so well organized most of the time all the AI has to do is copy and paste an implementation from somewhere else and change the names, and it gets right pretty much 100% of the time
Re:AI usage patterns in software teams by jdw64 on Wednesday August 19, 2026 @08:33AM (#49360698)
Every workflow is highly personal, so there's no real reason to argue about it. Depending on the work, some tasks become patternized and others don't. Most people overestimate themselves as being near average, and some of them are actually unskilled. There's no point in fighting with them.

Even on HN, people don't comment purely out of 'rationality.'

I think AI generates well patterned code. Essentially, it handles a lot of situations with standardized code. But recognizing those patterns and knowing how to implement them are different things.

In programming, there are people who know how to implement something but can't explain the contract or the model behind it. For those people, AI might not be very useful, or they might be one of the rare few who write code far better than AI. Either way, the fact that an AI beat a top competitive programmer is enough to say it performs better than most people on HN. There's no point in arguing with them.

It's not that they're necessarily wrong. It's that they tend to generalize their own personal workflows.

AI can't do software engineering, but it can code well. Software engineering is the problem of transforming a complex open system into a closed one, taking a PM's requirements and building a single system out of them. AI can't do that. Why? Because AI can't adjust emphasis the way humans do. The design for frequently accessed parts and rarely accessed parts should be different, but AI treats everything uniformly, which makes it harder to modify later.

On the other hand, once a problem is closed and well defined, AI does much better than most people. It's logical and doesn't make the kind of leaps humans do, at least with frontier models. So there's no point in arguing with them at all.

Their experiences are based on their own workflows, so their perceptions naturally differ. And it's hard to tell whether they're saying it's bad because they truly understand it well, or because they don't understand it at all.

I'm not saying they should live in an echo chamber, but there's no reason to argue with them. It's better to trust statistical facts.

Re:AI usage patterns in software teams by nozzlegear on Wednesday August 19, 2026 @10:13AM (#49361923)
Could be a symptom of which languages we use and which languages are in their training sets. I primarily write F#, which is a functional language that's compatible with the object-oriented C#. When AI tries to write code in my F# codebases, it almost always ignores the existing patterns/styles and tries to write it like an OO language. It has a weird desire to use mutability instead of the default immutability, for loops instead of pipes/monads, huge if/else blocks instead of pattern matching, etc. This is all very un-idiomatic for F#, not what a human programmer would write unless they were deliberately trying to write it like C#.

Maybe it's better in Fable/Sol, but it was a problem in Opus when I still used Claude, and it's still a problem with the Qwen and Deepseek models I use now. Either way, it seems to me that your code has to already conform to the patterns they want to write, or you're going to end up with new patterns.

Re:AI usage patterns in software teams by lukebitts on Wednesday August 19, 2026 @11:46AM (#49363131)
To be fair, I do have to remind the AI to follow the codebase's conventions regularly and it is the #1 rule in our team's claude.md. And when I generate plans I ask that every new implementation follow a reference implementation. In your F# projects would something like that help or would it make no difference?
Re:AI usage patterns in software teams by nozzlegear on Wednesday August 19, 2026 @11:10PM (#49369946)
Yeah that's what I've ended up doing and it does help. I do have guidelines set up in my agents.md files, but they're hit or miss. It's best to just tell them directly to "write idiomatic F#," which they seem to understand.