All posts

How I use AI in development – and where I don’t

AI drafts on the left, human decisions on the right

People ask me how much of my code is written by AI. Honestly, a lot of the typing is. Very few of the decisions are.

That distinction matters more than the percentage. “70 % AI-written” sounds either amazing or terrifying depending on who you ask. But if I designed the system, chose the patterns, wrote the important bits and read every line before it shipped – whose code is it? I’d say mine. The AI is a very fast keyboard with opinions.

What a normal day looks like

I usually start a feature by writing down, in plain words, what it should do and how it fits into what already exists. That note is for me as much as for the AI. Then I let it scaffold the boring parts, read through it, throw away what I don’t like, and write the tricky parts myself. At the end I ask it to review the diff like a grumpy colleague. It is surprisingly good at being grumpy.

What AI does for me

  • Scaffolding new features and boilerplate.
  • Writing first versions of tests from the cases I describe.
  • Refactoring – splitting a 600-line class into something readable.
  • Explaining unfamiliar code and APIs.
  • A second pair of eyes on a diff before I open a PR.

The refactoring one deserves a special mention. Everyone has that one file. The one that started as 80 lines and is now a small city. Splitting it up by hand is a full day of careful, boring work. With AI it’s an hour – and then another hour of me checking that it didn’t quietly change behaviour along the way. Still a good deal.

What I never hand over

  • Architecture – how the system fits together and how it will grow.
  • Security – auth, permissions, input handling, secrets.
  • Data models – they are expensive to change later.
  • The final review – nothing merges that I haven’t read and understood.

Data models are the sneaky one. AI will happily suggest a schema, and it will look reasonable. But a database structure is a decision you live with for years. Getting it slightly wrong means migrations, workarounds and sad comments in the code. I want that decision to be mine, made slowly, with a whiteboard and probably too much coffee.

$ git log --oneline -3
a3f9c1e feat: rate limit login
7b2d044 test: cover token refresh
c04be12 fix: escape search query
$ npm audit --production
found 0 vulnerabilities

Mistakes I’ve seen it make

  • Inventing a function that doesn’t exist in the library – with total confidence.
  • Building SQL by gluing strings together, because that’s what it saw in old tutorials.
  • “Fixing” a failing test by changing the test instead of the code.
  • Adding a package for something the language already does in one line.

None of these are disasters if you read the code. All of them are disasters if you don’t.

Why the line matters

AI is confident even when it is wrong. In most code that means a bug. In security code it means a breach. So the faster AI makes the easy parts, the more time I can spend on the parts where being wrong actually costs something.

That’s really the whole philosophy. AI didn’t make me care less about the code. It gave me more time to care about the right parts of it.