LLMs and coding

It seems clear to me that coding agents are here to stay.1 It’s a funny thing, though, instructing a computer using natural language.

Let’s forget about LLMs for a moment and think about describing a desired solution to a colleague so that they can go off and implement it. You might say that they need to implement an API to create frobulators. Maybe you give a few more details, but you don’t write down a detailed specification. They might start implementing this and get to a point where they need to figure out what happens if you request to create frobulator X, but X already exists. Do you return success, do you return an error, do you do something else? A less experienced developer might make an implicit choice here. A more experienced one may realize there are multiple options and come back and ask you. There are many low-level choices that need to be made when building a system that impact correctess, performance, security, observability, and so on. Each problem will have many solutions, but only some of those solutions are desriable. And what desirable means is part from general knowledge and past experience, but also part context and situation specific. Experienced developers are the ones able to consistently produce desirable solutions based on the context the system will inhabit.2

Today LLMs are more like the less experienced developer. If you don’t give enough detail, they’ll generally make a choice and call the job done. If you have the LLM generating lots of code, then good luck finding all of the choices that it made that you didn’t realize needed to be made. How is this different than working with humans, though? Humans tend to have predictable judgement and they can be held accountable. You know that if Jane says something is done, there is a likely range of possibilities that the software could be in. Of course, Jane could have made a mistake. With an LLM, you have no way of knowing. It’s claims of completeness mean nothing. The LLM makes decision that no human would ever make. LLMs might get better over time and know when their task is too ambiguous and must ask questions, but natural language is just ambiguous period and it’ll never be perfect.

If you’re leading a large team, you don’t have time to review every single decision (implicit or explicit) made by the developers on the team. So what can you do? You can ask about validation. You can make sure that the way the software is validated makes it very likely that it meets all the requirements around correctness, performance, security, and so on.

Does this work with LLMs? It could. But who writes the tests? If you need to write all the tests by hand then we’re not going to get the full benefit of AI assisted coding. But if the LLMs write the tests, can we trust them? Today’s LLMs make decisions that no human would make. It’s pretty common for an LLM to give up on a test and just decide to do something else so that it can make it to the next step in the project. A reasonable human would never do that. The human knows they are accountable and are being paid to do a job and cheating the test might mean they no longer have a job.


  1. Though we’ll see what happens when the VC money runs out - can inference be made cheap enough or will the real cost of using frontier models for coding agents make their usage at scale untenable? ↩︎

  2. And let’s not even talk about the harder problem of figuring out what to build. ↩︎

Code Feels

I worked at the same company for about ten years. While I ended up working on many different systems, there were a couple constants in the mix. It’s remarkable how ingrained those codebases are in my head. Having started a new job, I miss the ability to quickly know exactly where in the code needs to change to support some new feature.

This ability to navigate a codebase in your head feels to me very much like navigating the physical world. It feels almost like walking through callgraphs and directory structures. In a codebase I’m very familiar with, I can plop myself down to exactly the right location and all paths from there are clear. In a new codebase, I often need to start from some few currently-known starting points and try to navigate from there, trying to discover my destination. I wonder if it’s the same for others.1


  1. ChatGPT tells me that there has been some research here and thinking about code organization triggers the parietal lobe, which is also used for physical navigation. I don’t feel like determining if this is a hallucination or fact, but it does align with my feeling. ↩︎

Converged Consensus

A well known pattern for building systems is to break them down into data planes and control planes. Despite having known this and done this for years, I never considered this distinction within log replication protocols, another thing I’ve thought about for years. The data plane of a log replication protocol can just be concerned with failure-free data redundancy (e.g. replication or erasure coding). The control plane is then concerned with handling and recovering from failures. Raft is a ‘converged’ protocol mixing both data plane and control plane is one protocol and one log. But it doesn’t have to be that way.

I think this is a nice framework to think about the variety of log replication prtocols out there. Thanks to Jack Vanlightly for writing about this. Check out his survey on the topic.