Live data from Hacker News

The hidden cost of AI coding

terriblesoftware.org

61–70 of 475 posts

Re: The hidden cost of AI coding

#61
post #43

Earlier quoted context omitted.

I see this "prompting is an art" stuff a lot. I gave Claude a list of 10 objects and asked it to make an adjustment to all of them. It gave me 9 back. When I asked it to try again it gave me 10 but one didn't work. What's "prompt engineering" there, telling it to try again until it gets it right? I'd rather just do it right the first time.

Prompt engineering is just trying that task on a variety of models and prompt variations until you can better understand the syntax needed to get the desired outcome, if the desired outcome can be gotten. Honestly you’re trying to prove AI is ineffective by telling us it didn’t work with your ineffective protocol. That is not a strong argument.

What should I have done there? Tell it to make sure that it gives me all 10 objects I give it back? Tell it to not put brackets in the wrong place? This is a real question --- what would you have done?

Re: The hidden cost of AI coding

#62
post #13

Earlier quoted context omitted.

This has become especially true for me in the past four months. The new long context reasoning models are shockingly good at digging through larger volumes of gnarly code. o3, o4-mini and Claude 3.7 Sonnet "thinking" all have 200,000 token context limits, and Gemini 2.5 Pro and Flash can do 1,000,000. As "reasoning" models they are much better suited to following the chain of a program to figure out the source of an…

But 1 million tokens is like 50k lines of code or something. That's only medium sized. How does that help with large complex codebases? What tools are you guys using? Are there none that can interactively probe the project in a way that a human would, e.g. use code intelligence to go-to-definition, find all references and so on?

This to me is like every complaint I read when people generate code and the LLM spits out an error, or something stupid. It's a tool. You still have to understand software construction, and how to hold the tool.

Our Rust fly-proxy tree is about 80k (cloc) lines of code; our Go flyd tree (a Go monorepo) is 300k. Generally, I'll prompt an LLM to deal with them in stages; a first pass, with some hints, on a general question like "find the code that does XYZ"; I'll review and read the code itself, then feed that back to the LLM with questions like "summarize all the functionality of this package and how it relates to other packages" or "trace the flow of an HTTP request through all the layers of this proxy".

Generally, I'll take the results of those queries and have them saved in .txt files that I can reference in future prompts.

I think sometimes developers are demanding something close to AGI from their tooling, something that would do exactly what they would do (only, in the span of about 15 seconds). I don't believe in AGI, and so I don't expect it from my tools; I just want them to do a better job of fielding arbitrary questions (or generating arbitrary code) than grep or eglot could.

Re: The hidden cost of AI coding

#63
post #46

Earlier quoted context omitted.

Same as when higher-level languages replaced assembly for a lot of use cases. And btw, at least in places I've worked, better traditional tooling would replace a lot more headcount than AI would.

Not even close, those were all deterministic, this is probabilistic.

The output of the LLM is probabilistic. The code you actually commit or merge is not.

Re: The hidden cost of AI coding

#64
post #40

Earlier quoted context omitted.

Those of us who write software professionally are literally in a field premised on automating other people's jobs away. There is no profession with less claim to the moral high ground of worker rights than ours.

> Those of us who write software professionally are literally in a field premised on automating other people's jobs away. Depends what you write. What I work on isn't about eliminating jobs at all, if anything it creates them. And like, actual, good jobs that people would want, not, again, paying someone below the poverty line $5 to deliver an overpriced burrito across town.

I think most of the time when we tell ourselves this, it's cope. Software is automation. "Computers" used to be people! Literally, people.

Re: The hidden cost of AI coding

#65
post #40

Earlier quoted context omitted.

> Solving problems for real people. Isn't the answer here kind of obvious? Look at the majority of the tech sector for the last ten years or so and tell me this answer again. Like I guess this is kind of true, if "problems for real people" equals "compensating for inefficiencies in our system for people with money" and "solutions" equals "making a poor person do it for them and paying them as little as legally possib…

Those of us who write software professionally are literally in a field premised on automating other people's jobs away. There is no profession with less claim to the moral high ground of worker rights than ours.

Speak for yourself.

I've worked in a medical space writing software so that people can automate away the job that their bodies used to do before they broke.

Re: The hidden cost of AI coding

#66
post #13

Earlier quoted context omitted.

This has become especially true for me in the past four months. The new long context reasoning models are shockingly good at digging through larger volumes of gnarly code. o3, o4-mini and Claude 3.7 Sonnet "thinking" all have 200,000 token context limits, and Gemini 2.5 Pro and Flash can do 1,000,000. As "reasoning" models they are much better suited to following the chain of a program to figure out the source of an…

But 1 million tokens is like 50k lines of code or something. That's only medium sized. How does that help with large complex codebases? What tools are you guys using? Are there none that can interactively probe the project in a way that a human would, e.g. use code intelligence to go-to-definition, find all references and so on?

Yeah, 50,000 lines sounds about right for 1m tokens.

If your codebase is larger than that there are a few tricks.

The first is to be selective about what you feed into the LLM: if you know the work you are doing is in a particular area of the codebase, just paste that bit in. The LLM can make reasonable guesses about things the code references that it can't see.

An increasingly effective trick is to arm a tool-using LLM with a tool like ripgrep (effectively the "interactively probe the project in a way that a human would" idea you suggested). Claude Code and OpenAI Codex both use this trick. The smarter models are really good at deciding what to search for and evaluating the results.

I've built tools that can run against Python code and extract just the class, function and method signatures and their docstrings - omitting the actual code. If you code is well designed and has reasonable documentation that could be enough for the LLM to understand it.

https://github.com/simonw/symbex is my CLI tool for that

https://simonwillison.net/2025/Apr/23/llm-fragment-symbex/ is a tool I released this morning that turns Symbex into a plugin for my LLM tool.

I use my https://llm.datasette.io/ tool a lot, especially with its new fragments feature: https://simonwillison.net/2025/Apr/7/long-context-llm/

This means I can feed in the exact code that the model needs in order to solve a problem. Here's a recent example:

  llm -m openai/o3 \
    -f https://raw.githubusercontent.com/simonw/llm-hacker-news/refs/heads/main/llm_hacker_news.py \
    -f https://raw.githubusercontent.com/simonw/tools/refs/heads/main/github-issue-to-markdown.html \
    -s 'Write a new fragments plugin in Python that registers issue:org/repo/123 which fetches that issue
        number from the specified github repo and uses the same markdown logic as the HTML page to turn that into a fragment'
From https://simonwillison.net/2025/Apr/20/llm-fragments-github/ - I'm populating the context with the exact examples needed to solve the problem.

Re: The hidden cost of AI coding

#67

One of the things people often overlook don't talk about in this arguments is the manager's point of view and how it's contributing to the shakeups in this industry. As a developer I'm bullish on coding agents and GenAI tools, because they can save you time and can augment your abilities. I've experienced it, and I've seen it enough already. I love them, and want to see them continue to be used. I'm bearish on the id…

> If you're a master mason crafting amazing brickwork, you're exactly the same as some amateur grabbing some bricks from home depot and slapping a wall together.

IDK, there's still a place in society for master masons to work on 100+ year old buildings built by other master masons.

Same with the robots. They can implement solutions but I'm not sure I've heard of any inventing an algorithmic solution to a problem.

Re: The hidden cost of AI coding

#68
Earlier this year, a hackernews started quizzing me about the size and scope of the projects I worked on professionally, with the implication that I couldn't really be working on anything large or complex -- that I couldn't really be doing serious development, without using a full-fat IDE like IntelliJ. I wasn't going to dox myself or my professional work just so he could reach a conclusion he's already arrived at. The point is, to this person, beyond a certain complexity threshold -- simple command-line tools, say -- an IDE was a must, otherwise you were just leaving productivity on the table.

https://news.ycombinator.com/item?id=42511441

People are going to be making the same judgements about AI-assisted coding in the near future. Sure, you could code everything yourself for your own personal enrichment, or simply because it's fun. But that will be a pursuit for your own time. In the realm of business, it's a different story: you are either proompting, or you're effectively stealing money from your employer because you're making suboptimal use of the tools available. AI gets you to something working in production so much faster that you'd be remiss not to use it. After all, as Milt and Tim Bryce have shown, the hard work in business software is in requirements analysis and design; programming is just the last translation step.

Re: The hidden cost of AI coding

#69
post #64

Earlier quoted context omitted.

> Those of us who write software professionally are literally in a field premised on automating other people's jobs away. Depends what you write. What I work on isn't about eliminating jobs at all, if anything it creates them. And like, actual, good jobs that people would want, not, again, paying someone below the poverty line $5 to deliver an overpriced burrito across town.

I think most of the time when we tell ourselves this, it's cope. Software is automation. "Computers" used to be people! Literally, people.

I'm unable and unwilling to shadowbox with what you think I'm actually experiencing.

Re: The hidden cost of AI coding

#70
post #40

Earlier quoted context omitted.

> Solving problems for real people. Isn't the answer here kind of obvious? Look at the majority of the tech sector for the last ten years or so and tell me this answer again. Like I guess this is kind of true, if "problems for real people" equals "compensating for inefficiencies in our system for people with money" and "solutions" equals "making a poor person do it for them and paying them as little as legally possib…

Those of us who write software professionally are literally in a field premised on automating other people's jobs away. There is no profession with less claim to the moral high ground of worker rights than ours.

I often think about the savage job-destroying nature of the open source community: hundreds of thousands of developers working tirelessly to unemploy as many of their peers as possible by giving away the code they've written for free.

(Interesting how people talk about AI destroying programming jobs all the time, but rarely mention the impact of billions of dollars of code being given away.)

Post reply on HN