Code generation is changing my approach

Generative AI tools are getting multi-file editing capability. It recently got introduced to GitHub Copilot. It’s already in Cursor and my current favorite, Cline.

It can implement a feature across multiple files, but it’s still bound to the token limits that the LLM it’s using has.

Adding a parameter to an API response and modifying a few files to pass it along is cool, but forget about building the whole application from a prompt.

(For all but the most simple apps)

The limiting factor is my architecture, but this is for me, also the benefit.

It forces me to think about the design of my application. If the AI is having trouble making a simple change, because it needs to rewrite 6 files, perhaps its context is not to blame, but my poorly designed, tightly coupled code spaghetti bolognese.

🧢 I ask AI to implement features. Complexity grows. AI starts struggling.

🎩 Let’s analyze the architecture of the app. What’s a better approach?

This way, I’m not just theory-crafting the perfect architecture, but I actually build it. Fast. And see the limitations.

Every time I hit a roadblock and I’m forced to refactor, I learn something about my application and find a better approach.

Sure, this is the same process that I’ve been doing for years. Implement it in a naive way, see it work and then improve.

But with AI writing the boilerplate, that process is much faster. Writing boilerplate and CRUD calls is no longer the thing that takes the most time.

It’s improving the architecture while the robot does the mundane work. This will only get better in the future and I look forward to just having a conversation about how I want the app to behave and what a good structure and separation of concerns would be.

Of course, these are early days, so every once in a while it still runs in a loop trying to fix a bug it can’t find. That is annoying. But I suspect there will be less and less manual intervention as the tooling improves.

In the last week I got something up the ground that would take me a month to build before. I could build and compare two approaches fast.

And I have a bunch more experiments to run on actual code. It’s so satisfying to have a question and just build it out and see.

The danger is to not get too carried away, just because I can, but keep focus on the experiments that are important for making the one-way door decisions I have to make at the start of a project.

Yours,

Taj

All writing