Live data from Hacker News

Writing code is cheap now

simonwillison.net

271–280 of 522 posts

Re: Writing code is cheap now

#271
> We need to build new habits

In my case, testing and documentation becomes even more important.

I’m currently rewriting a server backend that was originally written as a “general-purpose” server, and is very complex. It works extremely well, is robust and secure, but way overkill for my current application.

I'm using an LLM to write a lot of the code. The LLM-written code is quite verbose, and I’m having to learn to just accept that, as it also works well. For a while, I would go in and rewrite the code, but I'm learning to stop doing that. If there's a problem; even an obvious one, I am learning to ask the LLM to fix it, instead of going in and doing it, myself.

Right now, I am writing a headerdoc for the server that is going to be hundreds of lines long. It is a detailed, pedantic description of the API and internal structure of the application.

Its primary audience is LLMs. I need to make sure that future analysis understands exactly why the server does what it does, as well as what it does. The current server is a first step in a (probably years-long) process of migration away from the original server design.

It does seem to be coming along well.

Re: Writing code is cheap now

#272

Earlier quoted context omitted.

This is actually an old syndrome with technology. It takes a longt ime for the effect to be reliably measured. Famously, it took many years for the internet itself to show up in significant productivity gains (if the internet is actually useful why don't the numbers show that? - a common comment in the 1990s and 2000s). So it seems to me we're just the usual dynamic here. Productivity in trillion-dollar economies do…

>Famously, it took many years for the internet itself to show up in significant productivity gains Yeah but the actual productivity gains that the internet and software tools introduced has had diminishing returns after a while. Like, are people more productive today when they use Outlook and Slack than they were 20 years ago when using IBM Lotus Notes and IBM Sametime? I'm not. Are people more productive with the Ex…

I think the biggest productivity improvements in software development over the last ~20 years came from open source (NPM install X / pip install Y save so much time constantly reinventing wheels) and automated tests.

Re: Writing code is cheap now

#273
post #220

I like using the analogy of 'living in a small apartment' when building systems with a small team. You need to choose carefully what furniture you can fit into your apartment, and that choice depends a lot on how you live your live. Do you want a large table to host friends, or a comfortable couch to fall asleep on in front of the TV? If you get both the space will probably be cluttered. The same applies to a small s…

Are you familiar with the cathedral vs the bazaar?

To some extent, although I've never read the actual text. Care to elaborate, I don't want to infer things on your behalf?

Re: Writing code is cheap now

#274
post #203

Every modern (and not so modern) software development method hinge on one thing: requirements are not known and even if known they'll change over time. From this you get the goal of "good" code which is "easy to change code". Do current LLM based agents generate code which is easy to change? My gut feeling is a no at the moment. Until they do I'd argue code generated from agents is only good for prototypes. Once you…

> Do current LLM based agents generate code which is easy to change?

Yes, if that's your goal and you take steps to achieve that goal while working with agents.

That means figuring out how to prompt them, providing them good examples (they'll work better in a codebase which is already designed to afford future changes since they imitate existing patterns) and keeping an eye on what they're doing so you can tell them "rewrite that like X" when they produce something bad.

> Once you can ask your agent to change a feature and be 100% sure they won't break other features

That's why I tell them to use red/green TDD: https://simonwillison.net/guides/agentic-engineering-pattern...

Re: Writing code is cheap now

#275
Agentic coding are bringing new people to coding. But instead of reading some books about coding or looking at the history, they face the same problems as before, they have the same struggle and they re-invent the same solutions.

I am waiting for the vibe coding expert posts that will tell us that lines of code are not a good measure, it is a liability and you should instruct your agent to write less code ...

Re: Writing code is cheap now

#277

> 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. > ... > Writing good code remains significantly more expensive I think this is a bad argument. Code was expensive because you were trying to write the expensive good code in the…

> When you drop your standards, then writing generated code is quick, easy and cheap.

Not as cheap as generating code of equivalent quality with an LLM.

Re: Writing code is cheap now

#278

Earlier quoted context omitted.

> Yeah but there were a lot less ditch diggers in the world after the invention of the backhoe As a specialization? Sure. But the ditch diggers moved since to machine operators, handymen and the like. In the past there were sysadmins. Do we have less software engineers since sysadmins ceased to be a thing?

> As a specialization? Sure. But the ditch diggers moved since to machine operators, handymen and the like. All of them? What if they liked digging ditches? > In the past there were sysadmins. Do we have less software engineers since sysadmins ceased to be a thing? Software Engineers were never sysadmins in the past, you’re thinking DevOps maybe?

The software engineers who like "digging ditches" are going to have a bad time in the new agentic engineering world, unfortunately.

Here "digging ditches" corresponds to somebody else figuring out the detailed requirements and specification and handing it to the engineer to transcribe into code.

That's what the coding agents replace. Thankfully for most engineers I've worked with that's only a small part of their overall jobs, albeit one of the most time consuming.

Re: Writing code is cheap now

#279

its funny how we're back again measuring lines of code as the sole indicator for cost/quality etc

See my list of characteristics of "good code" half way down the article for my thoughts on quality that go way beyond lines of code produced.

Re: Writing code is cheap now

#280
post #64

This is the first "chapter" in a not-quite-book I've started working on - I have an introductory post about that here: https://simonwillison.net/2026/Feb/23/agentic-engineering-pa... The second chapter is more of a classic pattern, it describes how saying "Use red/green TDD" is a shortcut for kicking the coding agent into test-first development mode which tends to get really good results: https://simonwillison.net/gu…

I believe the ChatGPT code has a bug, in that it accepts three spaces or tabs before a code fence, while the Google Markdown spec says up to three spaces, and does not allow a tab there. I also see that the tests generated by ChatGPT are far too few for the code features implemented. The cannot be the result of actual red/green TDD where the test comes before the feature is added. For examples, 1) the code allows "~~…

100%. That's why if you want good code you need to pay attention to what it's writing and testing and throw feedback like that at it.
Post reply on HN