Live data from Hacker News

An AI coding agent, used to write code, needs to reduce your maintenance costs

jamesshore.com

11–20 of 126 posts

Re: An AI coding agent, used to write code, needs to reduce your maintenance costs

#11

The maintenance-cost framing is the useful constraint. I’d rather see agents default to smaller diffs, test scaffolding, and explicit assumptions than maximize lines changed per prompt.

I think this is still the role of human oversight, these tools will forever be imperfect and the instructions we give them as prompts will always been prone to inaccuracies/misinterpretation. I find it useful to evaluate the code and often ask for simpler solutions and so far it has produced slightly more elegant solutions. The tendency to spawn helper functions to solve every problem or doing things in a slightly weird or at least unconvential way when there is an easier/standard way of doing it that would create less code. Your ideas if automated would definitely make things more maintainable but even code produced my machines require a human to be responsible for making sure/verifying it works.

Re: An AI coding agent, used to write code, needs to reduce your maintenance costs

#12
My low value comment. This feels directionally correct to me. The problems I've been struggling with in my dev job for the past 6 months have been 80% maintenance/legacy code interfering with new feature development.

Some of our developers are overly aggressive about using AI and I've started going down that path because I need to keep up and actually enjoy the flow of working with AI in my IDE.

I put a lot of work into keeping my area of the codebase understandable and coherent but I do not see that from the others on our team. I'm not perfect but I and extremely sensitive to incoherent, or un-grok-able at a glance.

Anyway, I like the novel (to me at least) framing of this article!

Re: An AI coding agent, used to write code, needs to reduce your maintenance costs

#13
post #4

Same with code reviews. I wonder if AI could make code reviews more presentable. for example, with human code reviews, developers learn quickly not to visually change code like reflowing code or comments, changing indent (where the tools can't suppress it), moving functions around or removing lines or other spurious changes. And don't refactor code needlessly. also, could break reviews up into two reviews - functiona…

https://github.com/ReviewStage/stage-cli looks like an interesting start on that subject.

Re: An AI coding agent, used to write code, needs to reduce your maintenance costs

#14
post #3

For me, if I can make a kickass testing system that people love so much that they actually build features with it and it’s not an afterthought, then maintenance becomes much easier. It’s often called test driven development but I’ve rarely seen it done in such a way that the dev ex is good enough for it to work. But say you have that. Then you have great profiling. At that point you can measure correctness and perfor…

This will probably be how things will work in future: devs will shift to specifying features which will be validate through tests. The AI will then be middle layer that will iterate until tests pass. Layer 1: Specs (Humans) Layer 2: Code (AI mostly) Layer 3: Tests (AI + human checks).

Yes, that is how I see it too. What I would add is - intent testing - collect user messages, and check them against executed work from time to time. Every ask must be implemented and tested, every code must be justified by a user message.

Re: An AI coding agent, used to write code, needs to reduce your maintenance costs

#15
So what are all of these agentic based strategies going to do once the infinite money spigot of investment into AI ends and they need to start charging prices that actually make a profit?

I get that most of the cost is in training and not inference, but I don’t see how models stay useful once the worlds software updates in a few months post training since the models can’t learn without said training.

Are we just going to have shops do the equivalent of old COBOL shops where everything is built to one years standards and the main language/framework is mostly set in stone?

Re: An AI coding agent, used to write code, needs to reduce your maintenance costs

#17
post #6

In my experience AI reduces maintenance costs. Though, context might matter here, I'm working on a multi decade set of projects, while there is a lot of greenfield feature development, the old code / older projects have suddenly become a lot easier to work with, modernize, and in a bunch of cases, eliminated. Dependency on old libraries, build tools, in some cases updated, in other cases just eliminated, builds are f…

This rings true for me too, but I don't think it counts if your just using AI to aid maintenance. The basic argument in the article is around how many hours of maintenance you have to do for each hour of "value-add" feature development. So A. your only measuring maintenance costs not the ratio and B. The "old code" whp wasn't written with AI in the first place.

Re: An AI coding agent, used to write code, needs to reduce your maintenance costs

#18
post #4

Same with code reviews. I wonder if AI could make code reviews more presentable. for example, with human code reviews, developers learn quickly not to visually change code like reflowing code or comments, changing indent (where the tools can't suppress it), moving functions around or removing lines or other spurious changes. And don't refactor code needlessly. also, could break reviews up into two reviews - functiona…

https://github.com/ReviewStage/stage-cli looks like an interesting start on that subject.

And nwave

https://github.com/nWave-ai/nWave

They have /nw-buddy to point you in the right direction

Very nifty

Re: An AI coding agent, used to write code, needs to reduce your maintenance costs

#19
Yeah, but to be honest, I sometimes just tell Claude to cleanup / refactor stuff; it finds a lot of things, discusses it with me and I approve the plan, and it churns away my tokens for some time. I do this once in a while, and I've been doing this for over 6 months and I don't feel like my development has significantly slowed down. Yeah my token usage is more for sure, but my codebase also is, so I'm not worried about that. To me AI seems to make maintenance very easy, like the rest. You just need to do it.

Edit: I make it sound a bit simple maybe. I do more extensive redactors also, where I'm more involved and opinionated. But I don't feel the need to do that very often very deeply. But yeah sometimes it's definitely necessary to prevent the project from going off rails.

Re: An AI coding agent, used to write code, needs to reduce your maintenance costs

#20
I feel like AI might let us model some of the things that we initially didn't scope that led to these problems (e.g. "Decided not to fix every bug, or upgrade every dependency") - being able to more easily ask a system that can dig into "how much time are we spending on stuff related to foo"

AI tooling can also be a place where we start building our view of what maintainable software practices look like so we don't make decisions that have these same tail effort profiles. That can be things like building out tooling to handle maintenance updates

I think the real thing that comes out of AI tooling is probably that the tooling needs to be trained (or steered) towards activities that enhance human attention management.

Post reply on HN