Live data from Hacker News

Writing code is cheap now

simonwillison.net

411–420 of 522 posts

Re: Writing code is cheap now

#411
post #353

Earlier quoted context omitted.

We didn’t fire all our developers when we invented compilers either, and for much the same reason we didn’t stop hiring laborers when we first built ships and established overseas trade routes: business will always expand to meet its reach Many enterprises are currently exploring to see if they can invite developers to leverage AI tools—like they leveraged the compiler—to be more productive. To operate on a higher pl…

> Many enterprises are currently exploring to see if they can invite developers to leverage AI tools—like they leveraged the compiler—to be more productive. To operate on a higher plane of agency, collaborating on what we should be building and not just technical execution. The thing is, developers have been hired to automate process, and as for any professional doing a good job, that means the output should perform…

> "Or a crane that will stall and drop its load randomly. It would have been sent to the scrapyard on the first day."

The only reason you have the concept that engines can "stall" is because people have bought engines that can stall by the hundreds of millions, instead of the earliest people refusing to buy them at all and all waiting for the perfect engine.

Container ships can sink with all the containers lost at sea. Still used.

Steam train engines could explode, derailing the train and killing some passengers and employees. Still used.

Buildings can collapse. Still used.

Pneumatic tyres can burst. Still used.

Here[1] is Tom Scott using a recreation walking crane from the 13th century, a technology going back to Roman times, which has no evidence that it ever had brakes on it historically. Look at that and tell me you think the rope never snappped, the wood never broke, the walker never tripped and the thing never unreeled the load back to the ground with the walker severely injured, because if it went wrong builders would refuse to use it? No chance.

Nothing functions like you're claiming; that's where we get the saying "don't let perfect be the enemy of good enough", as soon as stuff is better than not having it, people want to make use of it.

[1] https://www.youtube.com/watch?v=pk9v3m7Slv8

Re: Writing code is cheap now

#412
post #404

Earlier quoted context omitted.

> In my last performance review, my manager was actually surprised when I told him that I am now more a manager of my own work than actually doing the work. I think this is very telling. Unless you have a good manager who is paying attention, a lot of them are clueless and just see the hype of 10x ing your developers and don't care about the nuance of (as they say) all the surrounding bits to writing code. And unfort…

He definitely was paying attention. He had to pause for a second there, arrested by the realization, and was one of the reasons I got an "Exceeds expectations" in one of my KRAs.

It is interesting though that he evidently didn't notice this 2.5X productivity increase until you pointed it out to him.

Re: Writing code is cheap now

#413
post #374

Not sure if “code has always been expensive” is the right framing. Typing out a few hundred lines of code was never the real bottleneck. What was expensive was everything around it: making it correct, making it maintainable (often underestimated), coordinating across teams and supporting it long term. You can also overshoot: Testing every possible path, validating across every platform, or routing every change throug…

> The long-term effect is less clear. If we generate more code, faster, does that reduce cost or just increase the surface area we need to maintain, test, secure, and reason about later? My take is that the focus is mostly oriented towards code, but in my experience everything around code got cheaper too. In my particular case, I do coding, I do DevOps, I do second level support, I do data analysis. Every single task…

This has been my experience, too. In dealing with hardware, I'm particularly pleased with how vision models are shaping up; it's able to identify what I've photographed, put it in a simple text list, and link me to appropriate datasheets. yday, it even figured out how I wanted to reverse engineer a remote display board for a just-released inverter and correctly identified which pin of which unfamiliar Chinese chip was spitting out the serial data I was interested in; all I actually asked for was chip IDs with a quick vague note on what I was doing. It doesn't help me solder faster, but it gets me to soldering faster.

A bit OT, but I would love to see some different methods of calculating economic productivity. After looking into how BLS calculates software productivity, I quit giving weight to the number altogether and it left me feeling a bit blue; they apply a deflator in part by considering the value of features (which they claim to be able to estimate by comparing feature sets and prices in a select basket of items of a category, applying coefficients based on differences); it'll likely never actually capture what's going on in AI unless Adobe decides to add a hundred new buttons "because it's so quick and easy to do." Their methodology requires ignoring FOSS (except for certain corporate own-account cases), too; if everyone switched from Microsoft365 to LibreOffice, US productivity as measured by BLS would crash.

BLS lays methodology out in a FAQ page on "Hedonic Quality Adjustment"[1], which covers hardware instead of software, but software becomes more reliant on these "what does the consumer pay" guesses at value (what is the value of S-Video input on your TV? significantly more than supporting picture-in-picture, at least in 2020).

[1] https://www.bls.gov/cpi/quality-adjustment/questions-and-ans...

Re: Writing code is cheap now

#414

Earlier quoted context omitted.

> Have we not learned anything about technical debt and how it bites back hard? I think LLMs are changing the nature of technical debt in weird ways, with trends that are hard to predict. I've found LLMs surprisingly useful in 'research mode', taking an old and badly-documented codebase and answering questions like "where does this variable come from, and what are its ultimate consumers?" Its answers won't be as natu…

> taking an old and badly-documented codebase and answering questions like "where does this variable come from, and what are its ultimate consumers?" Why do you even need an LLM for this? Code is formal notation, it’s not magic. Unless the code is obfuscated, even bad code is pretty clean on what they’re doing and how various symbols are created and used. What is not clear is “why” and the answer is often a business…

> Why do you even need an LLM for this?

Once you get above a few hundred thousand lines of legacy undocumented code having a good LLM to help dig through it is really useful.

Re: Writing code is cheap now

#415

Earlier quoted context omitted.

This feels to me like peak sfba mentality on par with "move fast and break things". Outside of trying to create a unicorn, is this really how people create things? It seems to me that in order to obtain the ability to build things that other people like, you need to go through the process of creating things they won't. Like a painter needs to paint a bunch of crappy paintings to learn how to create a good painting. I…

> It seems to me that in order to obtain the ability to build things that other people like, you need to go through the process of creating things they won't. Okay, granted. What does that have to do with how the code is written? Do people generally care if a web app is running from nicely formatted JS or minified JS? Is a product manager not getting better at building things people like because they're not iterating…

I agree mostly with your metaphor, I think perhaps I disagree slightly on how it's applied. You don't need to create your own tools to create art, but I don't necessarily map the "tools" to code. The act of programming is mapping information to hardware, the value is in the information, and using LLM's to bypass the phase where you obtain, synthesise, and extend that information is the part where you lose the benefits of iteration. If you're just using the LLM as a mechanical tool to output code, it's mostly not different from, say, using speech-to-text to output code. When you start hearing things like "I don't care about the quality of the code, just it's outputs" that starts sounding like someone isn't iterating on the information which is the crucial bit.

Re: Writing code is cheap now

#416
post #390

Earlier quoted context omitted.

> I think most of us would be fine if the LLMs could actually just type out the code for us after we engineered it in our heads and explained it to the LLM in English language. Alas, they do produce some sort of code, but not always, or often enough not in a way we desribed it. That's exactly what they do for me - especially since the November model releases (GPT-5.1, Opus 4.5). > Where is the superintelligence we we…

> That's exactly what they do for me - especially since the November model releases (GPT-5.1, Opus 4.5). I mean it's inherently impossible, given the statistical nature of LLMs, so I am not sure are you claiming this out of ignorance or other interests, but again, what you claim is impossible due to the very nature of LLMs.

It's impossible for human developers too. Natural language descriptions of a program are either much more painful and time consuming to write than the code they describe, or contain some degree of ambiguity which the thing translating the description into code has to resolve (and the probability of the resolution the entity writing the description would have chosen and the one entity translating it into code chose matching perfectly approach zero).

It can make sense to trade off some amount of control for productivity, but the tradeoff is inherent as soon as a project moves beyond a single developer hand writing all of the code.

Re: Writing code is cheap now

#417
(I wrote this mainly from the perspective of what it feels like on the inside to write code as a human. I think https://news.ycombinator.com/item?id=47138965 explains it better in terms of the business aspect.)

> Code has always been expensive. Producing a few hundred lines of clean, tested code takes most software developers a full day or more. Many of our engineering habits, at both the macro and micro level, are built around this core constraint.

> At the macro level we spend a great deal of time designing, estimating and planning out projects, to ensure that our expensive coding time is spent as efficiently as possible. Product feature ideas are evaluated in terms of how much value they can provide in exchange for that time - a feature needs to earn its development costs many times over to be worthwhile!

This doesn't seem quite right.

"Producing" code involves a lot more than just typing it. It's slow because the dev is planning things out at the same time, at a micro level. Suppose "a few hundred lines" is 10kB of text; actually typing that out at full speed is maybe half an hour of work for a reasonably accomplished typist. But basically nobody even writes blog posts that fast. As soon as you're writing more than a sentence or two and actually care about how you come across (never mind having to satisfy a compiler) you're invoking system 2 thinking. (I didn't even consider tab completion in my napkin math; it wouldn't really matter, because you have to already be thinking to get value out of it!)

Time spent planning isn't really about saving coding time, because it really can't be. It's not like ultra-cheap code production suddenly lets you just implement all the things and see what happens. Features can be net negative, or even outright harmful to the product. It takes resources to evaluate any unplanned change and then integrate it if accepted. (cf. the recent buzz about FOSS projects getting flooded with AI-generated PRs.) Deciding "this feature will/won't be worth the effort" is a rough guess at best, because the actual code/test loop is where you actually hit the unknown unknowns (presumably LLMs would feel the same way, if they were conscious).

And perhaps most importantly, simply meeting feature goals isn't enough. This might be slightly less true in a world where your developers (now partly LLM) don't care about the existing coding style or architecture and can readily adapt on the fly. But I'm still convinced that just letting everything accumulate without a clear vision — without oversight and accountability — will always ultimately lead to a tech-debt reckoning.

Besides which, "a few hundred lines... a full day" is a highly optimistic metric along an axis that has long been understood to make little to no sense. That's a day where things are only added and not removed or changed (to fix them), in a relatively new system (so that interactions with other stuff don't have to be considered). Extrapolating that rate gives you absurd results, e.g. a team of ten developers might re-create the entire Python standard library from scratch in a year.

Well, that becomes more realistic when you already know exactly everything that you're going to do. But the LLM doesn't know that either. In fact, it doesn't even have the advantage of sharing your team's vision and wanting to see it come to fruition. Ask the LLM: "We're creating a new programming language; what modules should the standard library have?" How helpful is that going to be compared to the (human) new guy?

Re: Writing code is cheap now

#418
post #382

Not sure if “code has always been expensive” is the right framing. Typing out a few hundred lines of code was never the real bottleneck. What was expensive was everything around it: making it correct, making it maintainable (often underestimated), coordinating across teams and supporting it long term. You can also overshoot: Testing every possible path, validating across every platform, or routing every change throug…

"What was expensive was everything around it" - when I say that code has always been expensive that's part of what I'm factoring in. But even typing that first few hundred lines used to have a much more significant cost attached. I just pasted 256 lines of JavaScript into the 2000s-era SLOCount tool (classic Perl, I have a WebAssembly hosted version here https://tools.simonwillison.net/sloccount ) and it gave me a 20…

> when I say that code has always been expensive that's part of what I'm factoring in.

Fair, but when an LLM writes code in response to a prompt I really don't get the sense that it's doing as much of that "everything around" part as you might expect.

Re: Writing code is cheap now

#419

Earlier quoted context omitted.

I think code was always expensive. If it seemed cheap, the cost was hidden somewhere else. When I started coding professionally, I joined a team of only interns in a startup, hacking together a SaaS platform that had relative financial success. While we were very cheap, being paid below minimum wage, we had outages, data corruption, db wipes, server terminations, unresolved conflicts making their way to production an…

> The thing with coding agents is that it seems now that you can eat your cake and have it too. We are all still adapting, but results indicate that given the right prompts and processes harnessing LLMs quality code can be had in the cheap. It's cheaper but not cheap If you're building a variation of a CRUD web app, or aggregating data from some data source(s) into a chart or table, you're right. It's like magic. I n…

> I never thought this type of work was particularly hard or expensive though.

Maybe not intrinsically hard, but hard because it's so boring you can't concentrate.

> the LLM becomes a helpful tool but requires a ton of guidance. Even the tests LLMs will write seem biased to pass rather than stress its code and find bugs.

ISTR some have had success by taking responsibility for the tests and only having the LLM work on the main code. But since I only seem to recall it, that was probably a while ago, so who knows if it's still valid.

Re: Writing code is cheap now

#420
post #382

Earlier quoted context omitted.

"What was expensive was everything around it" - when I say that code has always been expensive that's part of what I'm factoring in. But even typing that first few hundred lines used to have a much more significant cost attached. I just pasted 256 lines of JavaScript into the 2000s-era SLOCount tool (classic Perl, I have a WebAssembly hosted version here https://tools.simonwillison.net/sloccount ) and it gave me a 20…

> when I say that code has always been expensive that's part of what I'm factoring in. Fair, but when an LLM writes code in response to a prompt I really don't get the sense that it's doing as much of that "everything around" part as you might expect.

Yeah it absolute isn't, but the time it's saving you means you can spend more effort on all of that stuff.
Post reply on HN