Live data from Hacker News

How I program with agents

crawshaw.io

141–150 of 308 posts

Re: How I program with agents

#141
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?

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?

Re: How I program with agents

#142

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…

You’re clinging to an old model of work. Today an LLM converted my docker compose infrastructure to Kubernetes, using operators and helm charts as needed. It did in 10 minutes what would take me several days to learn and cobble together a bad solution. I review every small update and correct it when needed. It is so much more productive. I’m driving a tractor while you are pulling an ox cart.

https://kompose.io/

Re: How I program with agents

#143
post #121

Earlier quoted context omitted.

As a senior developer you already spend a significant amount of time planning new feature implementations and reviewing other people's code (PRs). I find that this skill transitions quite nicely to working with coding agents.

Yeah was going to make the same point. > 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. What they're saying is that they never have coworkers.

They're also saying that they don't understand that writing code costs businesses money.

Re: How I program with agents

#144
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.

Comparing apples to oranges in your response but I’ll address it anyway. I see this take brought up quite a bit and it’s honestly just plain wrong. For starters Junior engineers can be held accountable. What we see currently is people leaving gaping holes in software and then pointing at the LLM which is an unthinking tool. Not the same. Juniors can and should be taught as that is what causes them to progress not onl…

> For starters Junior engineers can be held accountable. What we see currently is people leaving gaping holes in software and then pointing at the LLM which is an unthinking tool. Not the same.

This is no different than, say, the typical anecdote of a junior engineer dropping the database. Should the junior be held accountable? Of course not - it's the senior's fault for allowing that to happen at the first place. If the junior is held accountable, that would more be an indication of poor software engineering practices.

> More closely to the issue at hand this is assuming the “senior” dev isn’t just using an LLM as well and doesn’t know enough to critique the output.

This seems to miss the point of the analogy. A senior delegating to a junior is akin to me delegating to an LLM. Seniors have delegated to juniors long before LLMs were a twinkle in Karpathy's eye.

Re: How I program with agents

#145
post #127

Earlier quoted context omitted.

Are you using the same tools as everyone else here? You absolutely can ask "why" and it does a better job of explaining with the appropriate context than most developers I know. If you realize it's using a design pattern that doesn't fit, add it to your rules file.

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.

Re: How I program with agents

#146
post #93

Earlier quoted context omitted.

> Using apis I am familiar with but don't have memorized I think you have to be careful here even with a typed language. For example, I generated some Go code recently which execed a shell command and got the output. The generated code used CombinedOutput which is easier to used but doesn't do proper error handling. Everything ran fine until I tested a few error cases and then realized the problem. In other times I a…

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.

Re: How I program with agents

#147

Earlier quoted context omitted.

Some people cannot do anything without a tool. These people are early adopters and power users, who then evangelize their latest discovery. GitHub's value proposition was that mediocre coders can appear productive in the maze of PRs, reviews, green squares, todo lists etc. LLMs again give mediocre coders the appearance of being productive by juggling non-essential tools and agents (which their managers also love).

What is an essential tool? IDE? Editor? Pencil? Can I scratch my code into a French cave wall if I want to be a senior developer?

I think it is very simple to draw the line at "something that tries to write for you", you know, an agent by definition. I am beginning to realize people simply would prefer to manage, even if the things they end up managing aren't actually humans. So it creates a nice live action role-play situation.

A better name for vibecoding would be larpcoding, because you are doing a live action role-play of managing a staff of engineers.

Now not only even a junior engineer can become a manager, they will start off their careers managing instead of doing. Terrifying.

Re: How I program with agents

#148
post #141

Earlier quoted context omitted.

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?

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.

Re: How I program with agents

#149
post #74

Earlier quoted context omitted.

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

> 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 And you can't ask "why" about a decision you don't understand (or at least, not with the expectation that the answer holds any particular causal relationship with the actual reason)... so it's like reviewing a PR with no…

>And you can't ask "why" about a decision you don't understand (or at least, not with the expectation that the answer holds any particular causal relationship with the actual reason).

To be fair, humans are also very capable of post-hoc rationalization (particularly when they're in a hurry to churn out working code).

Re: How I program with agents

#150

Earlier quoted context omitted.

The downside for formulaic code kinda makes the whole thing useless from my perspective, I can't imagining a case where that works. Maybe a good case, that i've used a lot, is using "spreadsheet inputs" and teaching the LLM to produce test cases/code based on the spreadsheet data (that I received from elsewhere). The data doesn't change and the tests won't change either so the LLM definitely helps, but this isn't cod…

> Maybe a good case, that i've used a lot, is using "spreadsheet inputs" and teaching the LLM to produce test cases/code based on the spreadsheet data (that I received from elsewhere) This seems weird to me instead of just including the spreadsheet as a test fixture.

The spreadsheet in this case is human made and full of "human-like things" like weird formatting and other fluffiness that makes it hard to use directly. It is also not standardized, so every time we get it it is slightly different.
Post reply on HN