Live data from Hacker News

How I program with agents

crawshaw.io

201–210 of 308 posts

Re: How I program with agents

#201

Earlier quoted context omitted.

If you keep asking an LLM to generate the same repetitive implementations, why not just have a basic project already set up that you can modify as needed?

Yeah, I don't really get this Most boilerplate I write has a template that I can copy and paste then run a couple of "find and replace" on and get going right away This is not a substantial blocker or time investment that an AI can save me imo

YMMV. No boilerplate is exactly the same, there is usually some level of business logic or customization. With current gen I can point to a couple different files, maybe db models, and write a quick spec in 30 seconds and let it run in the background implementing the backend routes I want. I can do other valuable things in parallel, I can also point it to my FE to implement the api calls to the BE. It’s for me much quicker than a template which I am still customizing.

Is it a substantial blocker? Nope, but it’s like I outsourced all the boilerplate by writing a sentence or two.

Re: How I program with agents

#202
post #23

Earlier quoted context omitted.

Don’t agree with the assessment. At this point most of what I find LLM taking over is all the repetitive crud like implementations. I am still doing what I consider the fun parts, architecting the project and solving what are still the hard parts for the LLM, the non crud parts. This could be gone in a year and maybe I become a glorified product manager but enjoying it for the time being l, I can focus on the real th…

If you keep asking an LLM to generate the same repetitive implementations, why not just have a basic project already set up that you can modify as needed?

The LLM is doing the modifications and specific nuance that I want. Saves me time, ymmv.

Re: How I program with agents

#203

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 b…

Thanks for this comment, i totally agree. Not to say this article isnt good; its great!

Re: How I program with agents

#204
post #14

Earlier quoted context omitted.

I have to flip the question, what is it that people like about it? I certainly don't enjoy writing code for problems that have already been solved a thousand times. We reach for a dictionary, we don't write a hash table from scratch every time, that's only fun the first time you do it. If I could go "give me a working compiler for this language" or "solve this problem using a depth-first search" I wouldn't enjoy prog…

Why do people enjoy going to the gym? Those weights have already been lifted a thousand times. I enjoy writing code because of the satisfaction that comes from solving a problem, from being able to create a working thing out of my own head, and to hopefully see myself getting better at programming. I could augment my programming abilities with an LLM in the same way you could augment your gym experience with a forkli…

I think this is a good analogy! But I draw a different conclusion from it.

You're right that you wouldn't want to use a forklift to lift the weights at a gym. But then why do forklifts exist? Well, because gyms aren't the only place where people lift heavy things. People also lift and move around big pallets of heavy stuff at their jobs. And even if those people are gym rats, they don't forgo the forklift when they're at work, because it's more efficient, and exercising isn't the goal, at work.

In much the same way, it's would be silly to have an LLM write the solutions while working through the exercises in a book or advent of code or whatever. Those are exercises that are akin to going to the gym.

But it would also be silly to refuse to use the available tools to more efficiently solve problems at work. That would be like refusing to use a forklift.

Re: How I program with agents

#205
post #83
post #29

Earlier quoted context omitted.

We are talking past each other here. Once I solved an Advent of Code problem, I felt like the problem wasn't general enough, so I solved the more general version as well. I like programming to the point of doing imaginary homework, then writing myself some extra credit and doing that as well. Way too much for my own good . The point is that solving a new problem is interesting. Solving a problem you already know exac…

> Solving a problem you already know exactly how to solve isn't interesting and isn't even intellectual exercise. That isn't typically what my programming tasks at work consist of. A large part of the work is coming up with what exactly needs to be done, given the existing code and constraints imposed by technical and domain circumstances , and iterating over that. Meaning, this intellectual work isn't detached from…

Yeah but this is exactly why using LLMs doesn't actually preclude problem solving. You still have to do all these things. You just don't have to physically type out as much code.

Re: How I program with agents

#206
post #29

Earlier quoted context omitted.

We are talking past each other here. Once I solved an Advent of Code problem, I felt like the problem wasn't general enough, so I solved the more general version as well. I like programming to the point of doing imaginary homework, then writing myself some extra credit and doing that as well. Way too much for my own good . The point is that solving a new problem is interesting. Solving a problem you already know exac…

If I'm having the same problem over and over, I'll usually copy the solution from somewhere I've already solved it, whether that be my own code, or a place online where I know the solution is

Yeah. LLMs make this a lot easier, is the thing.

Re: How I program with agents

#207
post #55

Earlier quoted context omitted.

Complex argument parsing is something that I'd only generally be doing in python, which is handled by the argparse library. If I was doing it in another language, I'd google if there was a library for it, otherwise write it once and then copy it to use in other projects. Same with loggers. Depends on how I'm extracting input from a config file, what kind of config file, etc. One of my favourite things to do in progra…

> Complex argument parsing is something that I'd only generally be doing in python, which is handled by the argparse library. Yes, I'm referring to argparse. If you had to write a new script every few days, each using argparse, would you enjoy it? argparse was awesome the first few times I used it. After that, it just sucks. I have to look up the docs each time, particularly because I'm fussy about how well the parsi…

ha, very apropos example. One of the things I was ecstatic to let an LLM write for me last week was a click cli.

Nobody finds joy in writing this kind of boilerplate, but there's no way to avoid it. The click API is very succinct, but you still have to say, these are the commands, these are the options, this is the help text, there is just no other way. It's glorious to have tools that can do a pretty good job at a first crack of typing all that boilerplate out.

Re: How I program with agents

#208
post #200

Earlier quoted context omitted.

This applies to AI, too, albeit in different ways: 1. You can iteratively improve the rules and prompts you give to the AI when coding. I do this a lot. My process is constantly improving, and the AI makes fewer mistakes as a result. 2. AI models get smarter. Just in the past few months, the LLMs I use to code are making significantly fewer mistakes than they were.

That you don't know when it will make a mistake and that it is getting harder to find them are not exactly encouraging signs to me.

Do you mean something by "getting harder to find them" that is different from "they are making fewer dumb errors"?

Re: How I program with agents

#209
post #88
post #33

Earlier quoted context omitted.

OK. Be honest. If you had to write an argument parser once a week, would you enjoy it? Or extracting input from a config file? Or setting up a logger?

These are the kinds of things I tend to write a library for over time, that takes care of the details that remain the same between use cases. Designing those is one interesting and fulfilling part of the work.

That's all fine and good, but there is always boilerplate that you can't design away.

Even the most succinct cli command definition and argument parsing library you could devise is going to require a bunch of option name definition.

It's just a fool's errand to think you can stamp out everything that is tedious. It's great that we now have tools that can generate arbitrary code to bridge that gap.

Re: How I program with agents

#210
post #23

Earlier quoted context omitted.

Don’t agree with the assessment. At this point most of what I find LLM taking over is all the repetitive crud like implementations. I am still doing what I consider the fun parts, architecting the project and solving what are still the hard parts for the LLM, the non crud parts. This could be gone in a year and maybe I become a glorified product manager but enjoying it for the time being l, I can focus on the real th…

If you keep asking an LLM to generate the same repetitive implementations, why not just have a basic project already set up that you can modify as needed?

Because they are similar and repetitive, but not identical.
Post reply on HN