Live data from Hacker News

Writing code is cheap now

simonwillison.net

261–270 of 522 posts

Re: Writing code is cheap now

#261

Earlier quoted context omitted.

I find it amazing that skills are essentially excellent tools for humans to understand too.

I really wish they were called lessons instead of skills. It makes way more sense and prevents the overloading of the term "skill".

We'd just be overloading "lessons" as well, and even more so because it takes more work to ground the concept, given its larger semantic distance from what we're describing.

Re: Writing code is cheap now

#263

Here's an easy to understand example. I've been playing EvE Online and it has an API with which you can query the game to find information on its items and market (as well as several other unrelated things). It seems like a prime example for which to use AI to quickly generate the code. You create the base project and give it the data structures and calls, and it quickly spits out a solution. Everything is great so f…

been there. for these kinds of projects i never start with code, i start with specs. i sometimes spend days just working on the specs. once the specs are clear i start coding, which is completely different monster. basically not that different from a common workflow (spec > ticket > grooming > coding; more or less), but everything with AI.

Re: Writing code is cheap now

#266
post #173

Earlier quoted context omitted.

I'm finding I can iterate significantly faster if the coding agent is doing the typing for me, and learn at a faster rate as a result.

Hmm interesting, I didn't realise people were using it as a typing replacement instead of having it work agentically. Does that mean when you want to change a line of code somewhere, you just prompt the LLM to replace line 334 with your changes etc? So do you not use the LLM autonomously at all then? Sounds like it since you're still doing the iteration yourself.

I do both. A lot of changes are "autonomous" like "add a new Django model to record a change every time the title or body is edited in the admin", but I also do more fine grained edits like "have the import script truncate to 400 chars" (instead of 250.)

Sometimes I'll make edits like 400 to 250 by hand, but if I'm prompting on my phone it's faster to have the model do it as navigating code in an editor and changing it at the exact right point is fiddly on a mobile keyboard - models can spot and account for typos, direct code editing can't.

Re: Writing code is cheap now

#267

Here's an easy to understand example. I've been playing EvE Online and it has an API with which you can query the game to find information on its items and market (as well as several other unrelated things). It seems like a prime example for which to use AI to quickly generate the code. You create the base project and give it the data structures and calls, and it quickly spits out a solution. Everything is great so f…

Sounds like every other software project to me …

Re: Writing code is cheap now

#268
post #172

Earlier quoted context omitted.

Less code isn't as important as it used to be, because the cost of maintaining (simple) code has gone down as well. With coding agent projects I find that investing in DRY doesn't really help very much. Needing to apply the same fix in two places is a waste of time as a human. An agent will spot both places with grep and update them almost as fast as if there was just one. It's another case where my existing programm…

When you talk about maintaining code, do you mean having the LLM do it and you maintain a write-only codebase? Because if you're reading the code yourself and you have a bloated tangled codebase it would make things much harder right? Is the goal basically a codebase where your interactions are mediated through an LLM?

The goal is "good code" based on my list of criteria, which includes both "simple and minimal" and "the design affords future changes".

A bloated table codebase isn't good code, because it's harder to understand and makers changes to than the equivalent non-bloated codebase.

But... bloat does look a little bit different when you no longer need to optimize code for saving humans typing time.

Much of the confusing code I've encountered during my career has been confusing because it had too many layers of indirection, which happened because someone was applying DRY too aggressively because they didn't want to duplicate even the smallest pieces of logic in more then one place.

Good coding agents will only DRY like that if you tell them to.

Re: Writing code is cheap now

#269
post #263

Here's an easy to understand example. I've been playing EvE Online and it has an API with which you can query the game to find information on its items and market (as well as several other unrelated things). It seems like a prime example for which to use AI to quickly generate the code. You create the base project and give it the data structures and calls, and it quickly spits out a solution. Everything is great so f…

been there. for these kinds of projects i never start with code, i start with specs. i sometimes spend days just working on the specs. once the specs are clear i start coding, which is completely different monster. basically not that different from a common workflow (spec > ticket > grooming > coding; more or less), but everything with AI.

I do the same, plus add tests from early on. New features then naturally are accompanied by more tests.

Re: Writing code is cheap now

#270
post #185
post #67

Earlier quoted context omitted.

I would normally agree, but I think the "code is a liability" quote assumes that humans are reading and modifying the code. If AI tools are also reading and modifying their own code, is that still true?

What happens when there’s a service outage and you cannot debug code without an agent?

Switch to a rival service that doesn't have an outage. There are at least half a dozen competent hosted LLM vendors for coding now (Anthropic, OpenAI, Gemini, Mistral, Kimi, MiniMax, Qwen, ...)
Post reply on HN