r/AskProgramming • • 12m ago

Problems with AI coding agents...

Hello everyone, I have a question. I am a developer with 5 years of experience, and I’ve been using Claude Code for about a year now. While AI models have improved significantly, I still encounter many issues. For instance, the AI ​​often creates multiple nearly identical functions—instead of defining a single function that accepts parameters, it might generate three separate ones. Furthermore, function names often fail to accurately describe what the functions actually do. There are many such problems, and I simply don’t trust the AI ​​to work in an "agentic" mode—writing code on its own—without me constantly monitoring it. Ultimately, I find this process quite exhausting; it feels like I spend more time configuring the AI—setting up the coding rules it should follow—than actually writing code myself. I’m not sure if this is just my personal experience or a more widespread sentiment. Given that Anthropic’s models are capable of solving complex mathematical problems (even if those are specialized, lab-based versions rather than the ones we use), I find my own results rather underwhelming compared to what I see online—even though I’ve gone to great lengths to configure the environment, such as defining business logic, establishing coding standards, and providing documentation. What are your thoughts on this? Thanks!

3 Upvotes

7 comments sorted by

•

u/mxldevs 9m ago

Have Claude review the code and tell you what is poorly designed and how it should be fixed

•

u/Besmaah 4m ago

I end up doing this all the time, even for small tasks that’s what’s so annoying. For even a minor task, I have to set up one agent to write the code, another to review it, and a third to simplify it

I’ve even implemented rules, such as a 30-line limit per function, to force it to think about how the code is structured.

•

u/PianoConcertoNo2 7m ago

Are you saying you prefer a single function that performs differently based on a param., and Claude is preferring them to be distinct functions?

That sounds more like just a preference issue rather than a "issue" with Claude itself.

•

u/mxldevs 1m ago

Less duplicate code is my preference, for sure.

•

u/insta 3m ago

agentic coding was marketed to be "Claude, build X. no mistakes". it's not.

the agents were trained on all code, even crappy code. gradient descent has them choose the most likely answer, which is code that answers the current problem.

agents don't really consider the code itself to be a deliverable, unless you specifically say it is. they're most like Meesigs in they are compelled to solve the problem directly in front of them

•

u/Unusual_Age_1618 1m ago

Depending on the type of code it executes it might be preferable to have different simpler functions over a single complex one. One day you will have to change something on the function depending on one of the params. Next day another change because of another param. And you will end up with a big complex function that grew too much.