Live data from Hacker News

How I program with agents

crawshaw.io

61–70 of 308 posts

Re: How I program with agents

#61
post #15

Earlier quoted context omitted.

On one codebase I work with, there are often tasks that involve changing multiple files in a relatively predictable way. Like there is little creativity/challenge, but a lot of typing in multiple parts/files. Tasks like these used to take 3-4 hours complete before just because I had to physically open all these files, find right places to modify, type the code etc. With AI agent I just describe the task, and it does…

Did you ever consider refactoring the code so that you don't have to do shotgun surgery every time you make this kind of change?

At this point why spend 5 hours refactoring when I can spend 5 minutes shot gunning the changes in?

At the same time refactoring probably takes 10 minutes with AI.

Re: How I program with agents

#62

Finally some serious writing about LLMs that doesn’t follow the hype and it faces reality of what can and can’t be useful with these tools. Really interesting read, although I can’t stand the word “agent” for a for-loop that call recursively an LLM, but this industry is not famous for being sharp with naming things, so here we are. edit: grammar

I actually take some minor issue with OP's definition of an agent. IMO an agent isn't just a LLM on a loop.

IMO the defining feature of an agent is that the LLM's behavior is being constrained or steered by some other logical component. Some of these things are deterministic while others are also ML-powered (including LLMs).

Which is to say, the LLM is being programmed in some way.

For example, prompting the LLM to build and run tests after code edits is a great way to get better performance out of it. But the idea is that you're designing a system where a deterministic layer (your tests) is nudging the LLM to do more useful things.

Likewise many "agentic reasoning" systems deliberately force the LLM to write out a plan before execution. Sometimes these plans can even be validated deterministically, and the LLM forced to re-gen if plan is no good.

The idea that the LLM is feeding itself isn't inaccurate, but misses IMO the defining way these systems are useful: they're being intentionally guided along the way by various other components that oversee the LLM's behavior.

Re: How I program with agents

#64

Earlier quoted context omitted.

Why isn't this spoken more about? Not a developer but work very closely with many - they are all on a spectrum from zero interest in this technology to actively using it to write code (correlates inversely seniority from my sample set) - very little talk on using it for reviews/checks - perhaps that needs to be done passively on commit.

The main issue with LLMs is that they can't "judge" contributions correctly. Their review is very nitpicky on things that don't matter and often misses big issues that a human familiar with the codebase would recognise. It's almost just noise at the end. That's why everyone is moving to the agent thing. Even if the LLM makes a bunch of mistakes, you still have a human doing the decision making and get some determinis…

[deleted]

Re: How I program with agents

#65
The "assets" and "debt" discussion near the middle is interesting, but I can't say that I agree.

Yes, many programs are not used my many users, but many programs that have a lot of users now and have existed for a long time started with a small audience and were only intended to be used for a short time. I cannot tell you how many times I have encountered scientific code that was haphazardly written for one purpose years ago that has expanded well beyond its scope and well beyond its initial intended lifetime. Based on those experiences, I write my code well aware that it may be used for longer than I anticipated and in a broader scope than I anticipated. I do this as both a courtesy for myself and for others. If you have had to work on a codebase that started out as somebody's personal project and then got elevated by a manager to a group project, you would understand.

Re: How I program with agents

#66

Earlier quoted context omitted.

> Why do people enjoy going to the gym? Do they? I would assume that the overwhelming majority of people would be very happy to be able to get 50% of the results for twice the membership cost if they could avoid going.

If you pay twice the membership, they provide you a forklift so you can lift twice the weight. I prefer to lift the weight myself and only spend half as much

Obviously I was referring to a hypothetical option where it's still your body that get stronger. Sticking with this metaphor - I don't care about the weights going up, but rather about my muscles getting stronger, and if there were an easier and less accident-prone way to do that without the weights, then I would take it in a heartbeat.

And going back to programming, while I sometimes enjoy the occasional problem-solving challenge, in the vast majority of time I just want the problem solved. Whenever I can delegate it to someone else capable, I do so, rather than taking it on as a personal challenge. And whenever I have sufficiently clear goals and sufficiently good tests, I delegate to AI.

Re: How I program with agents

#67

Earlier quoted context omitted.

I’m no better at naming things! Shall we propose LLM feedback loop systems? It’s more grounded in reality. Agent is like Retina Display to my ears, at least at this stage!

A downward spiral

Call it Reznor to imply it’s a downward spiral?

Re: How I program with agents

#68

Maybe it's because I only code for my own tools, but I still don't understand the benefit of relying on someone/something else to write your code and then reading it, understand it, fixing it, etc. Although asking an LLM to extract and find the thing I'm looking for in an API Doc is super useful and time saving. To me, it's not even about how good these LLMs get in the future. I just don't like reading other people's…

if you work on a team most code you see isn’t yours.. ai code review is really no different than reviewing a pr… except you can edit the output easier and maybe get the author to fix it immediately

Re: How I program with agents

#69

The "assets" and "debt" discussion near the middle is interesting, but I can't say that I agree. Yes, many programs are not used my many users, but many programs that have a lot of users now and have existed for a long time started with a small audience and were only intended to be used for a short time. I cannot tell you how many times I have encountered scientific code that was haphazardly written for one purpose y…

The issue is, whats the alternative? People are generally bad at predicting what work will get broad adoption. Carefully elegantly constructing a project that goes nowhere also seems to be a common failure mode; there is a sort of evolutionary pressure towards sloppy projects succeeding because they are cheaper to produce.

This reminds me of classics like "worse is better," for today's age (https://www.dreamsongs.com/RiseOfWorseIsBetter.html)

Re: How I program with agents

#70

Maybe it's because I only code for my own tools, but I still don't understand the benefit of relying on someone/something else to write your code and then reading it, understand it, fixing it, etc. Although asking an LLM to extract and find the thing I'm looking for in an API Doc is super useful and time saving. To me, it's not even about how good these LLMs get in the future. I just don't like reading other people's…

I kinda consider it a P!=nP type thing. If I need to write a simple function, it will almost always take me more time to implement it than it will to verify if an implementation of it suits my needs. There are exceptions, but overall when coding with LLMs this seems to hold true. Asking the LLM to write the function then checking it's work is a time saver.
Post reply on HN