Live data from Hacker News

How I program with agents

crawshaw.io

151–160 of 308 posts

Re: How I program with agents

#151
post #82

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 think there are 2 types of software engineering jobs: the ones where you work on a single large product for a long time, maintaining it and adding features, and the ones that spit out small projects that they never care for again. The latter category is totally enamored with LLMs, and I can see the appeal: they don't care at all about the quality or maintainability of the project after it's signed off on. As long a…

Give it more than the minimal context so it can emulate the project's style. The recent async agents should be good at this.

Re: How I program with agents

#152
post #129

Earlier quoted context omitted.

“ It did in 10 minutes what would take me several days to learn and cobble together a bad solution.” Another way to look at this is you’re outsourcing your understanding to something that ultimately doesn’t think. This means 2 things: your solution could be severely suboptimal in multiple areas such as security and two because you didn’t bother understanding it yourself you’ll never be able to identify that. You migh…

Senior engineers delegate to junior engineers, which have all the same downsides you described, all the time. This pattern seems to work fine for virtually every software company in existence.

> Another way to look at this is you’re outsourcing your understanding to something that ultimately doesn’t think.

You read this quote wrong. Senior devs outsource _work_ to junior engineers, not _understanding_. The way they became senior in the first place is by not outsourcing work so they could develop their understanding.

Re: How I program with agents

#153

I wonder how many people that use agents actually like "programming", as in coming up with a solution to the problem and then being able to express that in code. It seems like a lot of the work that the agents are doing is removing that and instead making you have to explain what you want in natural language and hope the LLM doesn't introduce bugs

Author here. I like programming and I like agents.

Re: How I program with agents

#154
post #127

Earlier quoted context omitted.

You can ask it "why", and it gives a probable English string that could reasonably explain why, had a developer written that code, they made certain choices; but there's no causal link between that and the actual code generation process that was previously used, is there? As a corollary, if Model A generates code, Model A is no better able to explain it than Model B.

I think that's right, and not a problem in practice. It's like asking a human why: "because it avoids an allocation" is a more useful response than "because Bob told me I should", even if the latter is the actual cause.

> I think that's right, and not a problem in practice. It's like asking a human why: "because it avoids an allocation" is a more useful response than "because Bob told me I should", even if the latter is the actual cause.

Maybe this is the source of the confusion between us? If I see someone writing overly convoluted code to avoid an allocation, and I ask why, I will take different actions based on those two answers! If I get the answer "because it avoids an allocation," then my role as a reviewer is to educate the code author about the trade-off space, make sure that the trade-offs they're choosing are aligned with the team's value assessments, and help them make more-aligned choices in the future. If I get the answer "because Bob told me I should," then I need to both address the command chain issues here, and educate /Bob/. An answer is "useful" in that it allows me to take the correct action to get the PR to the point that it can be submitted, and prevents me from having to make the same repeated effort on future PRs... and truth actually /matters/ for that.

Similarly, if an LLM gives an answer about "why" it made a decision that I don't want in my code base that has no causal link to the actual process of generating the code, it doesn't give me anything to work with to prevent it happening next time. I can spend as much effort as I want explaining (and adding to future prompts) the amount of code complexity we're willing to trade off to avoid an allocation in different cases (on the main event loop, etc)... but if that's not part of what fed in to actually making that trade-off, it's a waste of my time, no?

Re: How I program with agents

#155
post #129

Earlier quoted context omitted.

Senior engineers delegate to junior engineers, which have all the same downsides you described, all the time. This pattern seems to work fine for virtually every software company in existence.

> Another way to look at this is you’re outsourcing your understanding to something that ultimately doesn’t think. You read this quote wrong. Senior devs outsource _work_ to junior engineers, not _understanding_. The way they became senior in the first place is by not outsourcing work so they could develop their understanding.

I read the quote just fine. I don't understand 100% of what my junior engineers do. I understand a good chunk, like 90-95% of it, but am I really going to spend 30 minutes trying to understand why that particular CSS hack only works with `rem` and not `px`? Of course not - if I did that for every line of code, I'd never get anything done.

Re: How I program with agents

#156

Earlier quoted context omitted.

You always have to be careful. But worth calling out that using CombinedOutput() like that is also a common flaw in human code.

The difference is that humans learn. I got bit by this behavior of CombinedOutput once ten years ago, and no longer make this mistake.

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.

Re: How I program with agents

#157
post #141

Earlier quoted context omitted.

It's a monorepo with backend/frontend/database migrations/protobufs. Could you suggest how exactly should I refactor it so I don't need to make changes in all these parts of the codebase?

I wouldn't try to automate the DB part, but much like the protobufs code is generated from a spec, you can generate other parts from a spec. My current company has a schema repo used for both API and kafka type generation. This is a case where a monorepo should be a big advantage, as you can update everything with a single change.

It's funny, but originally I had written a codegenerator that just reads protobuf and generates/modifies code in other parts. It's been ok experience until you hit another corner case (especially in UI part) and need to spend another hours improving codegenerator. But since after AI coding tools became better I started delegating this part to AI increasingly more, and now with agentic AI tools it became way more efficient than keeping maintaining codegenerator. And you're right about DB part - again, now with task description it's a no brainer to tell it which parts shouldn't be touched.

Re: How I program with agents

#158
post #47

Okay, so how do I set up the sort of agent / feedback loop he is describing? Can someone point me in the direction to do that? So far all I've done is just open up the windsurf IDE. Do I have to set this up from scratch?

I wrote a minimal implementation of this feedback loop here:

https://github.com/Ichigo-Labs/p90-cli

But if you’re looking for something robust and production ready, I think installing Claude Code with npm is your best bet. It’s one line to install it and then you plug in your login creds.

Re: How I program with agents

#159

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

It seems like an excellent name, given that people understand it so readily, but what else would you suggest? LoopGPT?

A state machine, or more specifically a Moore Machine.

Re: How I program with agents

#160

I tried code gen for the first time recently. The generated code look great, was commented and ran perfectly. The results were completely wrong. The code was to calculate the cpu temperature from the Raspberry Pi RP2350 in python. The initial value look about right, then I put my finger on the chip and the temp went down! I assume the model had been trained on broken code. This lead me to think how do they validate c…

Nobody is saying that you don't have to read and check the code. Especially for things like numerical constants. Those are very frequently hallucinated (unless it's something super common like pi).
Post reply on HN