Live data from Hacker News

How I program with agents

crawshaw.io

261–270 of 308 posts

Re: How I program with agents

#261

Earlier quoted context omitted.

I have always found this idea of not being smarter somewhat baffling. Education makes people smarter does it not? At least that is one of the claims it makes. Do you mean that a baby hunter gatherer from 25000 years ago would be on average just as capable of learning stuff when integrated into society compared to someone born nowadays? For human beings 25.000 years is something like 1000 generations. There will be su…

there's intelligence and there's wisdom. I may know how, eg Docker works and an ancient Greek man may not, but I can't remember a 12 digit number I've only seen once, or multiply two three digit numbers in my head without difficulty.

I mean, how docker works (which is mostly a human construct with its own peculiarities) is not what I would use as an example - this is more like a board game that has its own rules and you just learnt them. Ancient people had their own "games" with rulesets. It's not a "fundamental truth".

Societal smartness might be something like an average student knowing that we are made from cells, some germ theory over bodily fluid inbalances causing diseases, etc, very crude understanding of more elements of physics (electronics). Though unfortunately intellectualism is on a fall, and people come out dumber and dumber from schools all over the world.

Re: How I program with agents

#262

Earlier quoted context omitted.

I don't disagree but... wouldn't you rather be working with actual people? Spending the whole day chatting with AI agents sounds like a worst-of-both-worlds scenarios. I have to bring all of my complex, subtle soft skills into play which are difficult and tiring to use, and in the end none of that went towards actually fostering real relationships with real people. At the end of the day, are you gonna have a beer wit…

It's a double-edged sword. AI agents don't have a long-term context window that gets better over time. People who employ AI agents today instead of juniors are going to find themselves in another local maximum: yes, the AI agent will make you more productive today compared to a junior, but (as the tech stands today) you will never be able to promote an AI agent to senior or staff, and you will not get to hire out an…

Unless the underlying AI agent models continue to improve over time. Isn’t that the mantra of all AI CEOs, that we are simply riding the wave of technological progress.

Re: How I program with agents

#263
post #85

Earlier quoted context omitted.

Isn't that the point of agents? Assume we have excellent test coverage -- the AI can write the code and ensure get the feedback for it being secure / fast / etc. And the AI can help us write the damn tests!

No, it can’t. Partially stems from the garbage the models were trained on. Example anecdata but since we started having our devs heavily use agents we’ve had a resurgence of mostly dead vulnerabilities such as RCEs (CVE in 2019 for example) as well as a plethora of injection issues. When asked how these made it in devs are responding with “I asked the LLM and it said it was secure. I even typed MAKE IT SECURE!” If yo…

To add to this: I’ve never been gaslighted more convincingly than by an LLM, ever. The arguments they make look so convincing. They can even naturally address specific questions and counter-arguments, while being completely wrong. This is particularly bad with security and crypto, which generally isn’t verified through testing (which only proves the presence of function, not the absence).

Re: How I program with agents

#264
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…

Amusingly, cursor took 5 minutes trying to figure out how to do what a simple global find/replace did for me in 30 seconds after I got tired of waiting for it's attempt just last night on a simple predictable lots-of-files change. A 60x speedup is way more than I've seen even in its best case for things like that.

In my experience, two things makes a big difference for AI agents: quality of code (naming and structure mostly) and AI-friendly documentation and tasks planning. For example, in some repos I have legacy naming that evolved after some refactoring, and while devs know that "X means Y", it's not easy for AI to figure it out unless explicitly documented. I'm still learning how to organize AI-oriented codebase documentation and planning tools (like claude task master), but they do make a big difference indeed.

Re: How I program with agents

#265
post #256

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.

But my gripe with your first point is that by the time I write an exact detailed step-by-step prompt for them, I could have written the code by hand. Like there is a reason we are not using fuzzy human language in math/coding, it is ambiguous. I always feel like doing those funny videos where you have to write exact instructions on how to make a peanut butter sandwich, getting deliberately misinterpreted. Except it i…

> Like there is a reason we are not using fuzzy human language in math/coding, it is ambiguous

On the foolishness of "natural language programming"

https://www.cs.utexas.edu/~EWD/transcriptions/EWD06xx/EWD667...

Re: How I program with agents

#266

I completely agree with the author's comment that code review is half-hearted and mostly broken. With agents, the bottleneck is really in reading code, not writing it. If everyone is just half-heartedly reviewing code, or using it as a soapbox for their individual preferences, using agents will completely fall apart as they can easily introduce serious security issues or performance hits. Let's be honest, many of tho…

What’s not clear to me is how agents/AI written code solves the “half hearted review” problem. People don’t like to do code reviews because it sucks. It’s tedious and boring. I genuinely hope that we’re not giving up the fun parts of software, writing code, and in exchange getting a mountain of code to read and review instead.

Yes, this is what I'm fearing as well.

That we will end up just trying to review code, writing tests and some kind of specifications in natural language (which is very imprecise)

However, I can't see how this approach would ever scale to a larger project.

Re: How I program with agents

#267
post #85

I completely agree with the author's comment that code review is half-hearted and mostly broken. With agents, the bottleneck is really in reading code, not writing it. If everyone is just half-heartedly reviewing code, or using it as a soapbox for their individual preferences, using agents will completely fall apart as they can easily introduce serious security issues or performance hits. Let's be honest, many of tho…

Isn't that the point of agents? Assume we have excellent test coverage -- the AI can write the code and ensure get the feedback for it being secure / fast / etc. And the AI can help us write the damn tests!

Saw Rich Hickey say this, that it is a known fact that tested code never has bugs.

On a more serious note: how could anyone possibly ever write meaningful tests without a deep understanding of the code that is being written?

Re: How I program with agents

#268

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…

It is just faster and less effort. I can't write code as quickly as the LLM can. It is all in my head, but I can't spit it out as quickly. I just see LLMs as getting what is in my head quickly out there. I have learned to prompt it in such a way that I know what to expect, I know its weakspots and strengths. I could predict what it is going output, so it is not that difficult to understand.

Yes, the eureka moment with LLMs is when they started outputting the things I was beginning to type. Not just words but sentences, whole functions and even unit tests. The result is the same as I would have typed it, just a lot faster.

Re: How I program with agents

#269

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.

I see it as basically Cunningham's Law. It's easier to see the LLM's attempt a solution and how it's wrong than to write a perfectly correct solution first time.

Re: How I program with agents

#270
post #256

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.

But my gripe with your first point is that by the time I write an exact detailed step-by-step prompt for them, I could have written the code by hand. Like there is a reason we are not using fuzzy human language in math/coding, it is ambiguous. I always feel like doing those funny videos where you have to write exact instructions on how to make a peanut butter sandwich, getting deliberately misinterpreted. Except it i…

> by the time I write an exact detailed step-by-step prompt for them, I could have written the code by hand

The improved prompt or project documentation guides every future line of code written, whether by a human or an AI. It pays dividends for any long term project.

> Like there is a reason we are not using fuzzy human language in math/coding

Math proofs are mostly in English.

Post reply on HN