Articles AI Integration Interviews: Software

AI Integration: What Works

Originally published on Facebook

Well, time to unleash another compilation of our interviews.

What works for people — and what doesn’t work quite so well.

First, the most important conclusion: writing code as a problem is over. Done. Just like assembly language stopped being a problem back in the Stone Age: it’s still useful to know, and if you’re working “at the bleeding edge of performance,” you might write 20 instructions once every couple of years. Otherwise — get off, we’ve arrived.

I want to throw in a quote from an interview here:

“Nobody here knows Rust. We just described the architecture, what we expected, and Claude implemented a complete module for us in Rust. Works great, passed review in both the Apple Store and the Microsoft Store. Before AI, we wouldn’t even have attempted this.”

“A similar incident occurred in the city of Kutaisi” (c). I cobbled together an iOS port of our application in a pidgin mix of Kotlin and Swift — I’ve never written code in either of them (and have no intention of doing so, muhahaha). Three quarters of the time went into testing and bug fixing — I haven’t taught the agent to pick up a receiver and fuck off outside with it to run some tests.

And another quote:

“Eighty percent of the time, I just look through it myself and say: sure, it’s no masterpiece, but it’ll do.”

The bottleneck has moved further down the line — primarily into testing and review. In my own projects, I’ve started moving towards the concept of “evidence of correctness” instead of “test” — or rather, alongside it. Let me put it this way: if software has some property that’s important to the project (for example, the ability to recognize its owner’s face through a device’s camera in no more than 1 second), there must be a test that verifies exactly that property, formulated exactly the way it matters to us. In the case of facial recognition, the formulation should be something like: “In 99.9% of cases, the test completes within 1 second under lighting conditions ranging from XX to YY, with faces of all races and genders, up to 30% obscured, correctly recognizing them in 99% of cases” — and the test must verify exactly that with statistical confidence. And the verification criteria must be formulated independently of how exactly the agent implemented the recognition.

A general observation for those working with AI: the bugs agents make are very different from the bugs humans used to make. Or rather, not quite: they’re still our good old human bugs, but where they used to be failures of thinking things through at the code-writing level, now they’re failures of thinking things through at the system-description level. I’m deliberately leaving out things like typos in markup or scripting languages — that’s minor stuff.

Bad news for those who can’t put together fully automated tests — although it’s often a matter of investment. For example, can you build an automated test that flashes firmware onto a piece of hardware and whispers a few words to it over Bluetooth? While lying about the sensor readings? Sure you can, but you need to invest money and time into it.

Something that might be useful to some of you: people are experimenting heavily with testing directly by agents. Personally, I don’t think it’s a silver bullet — at the very least, it’s several times slower than running a Playwright script (or any other deterministic walkthrough), but on the other hand, it can discover things you hadn’t even thought of yet. Another interesting quote:

“Sometimes the agent doesn’t just fail to do something — it simply can’t find the button. At first, we tried to ignore this… but once we went live with real users, we realized that real users often couldn’t find that same button either.”

Because the apple doesn’t fall far from the tree.

The approach to agent-based testing varies significantly depending on the cost of an error — the more expensive the error, the stronger the shift towards deterministic tests.

Code and documentation review by two agents (using different models, often with different prompts), followed by comparing their results (and using the percentage of agreement as a numerical metric), is also something many people are already doing. And the most interesting part is that for some it’s “if agreement is below 80%, we don’t even look at this shit,” while for others it’s “if agreement is below 80%, we’ll have to look at it with our own eyes.” Personally, I find both approaches at least interesting — that’s how contradictory I am today.

Pull request size limits — they work if the team already has a mental model of the project. On projects entirely churned out by AI, I have very little faith in human code review — it’s time to move towards black-box development, at least for non-critical modules. And “black box” doesn’t mean, for example, “we don’t look at the architecture.” Oh, we absolutely do — but we look at class diagrams and state machines, not lines of code. Incidentally, there are already open-source skills that draw not only class diagrams (which can also be done deterministically), but data flows as well.

I’ll finish with four questions worth asking separately for every project:

  • Whose mistake are we actually trying to catch? At what stage is it introduced?
  • What’s more expensive — closing the loop or checking things manually, in our particular case?
  • What exactly are we looking for during review? A potential bug? Architectural drift? Suboptimal decisions?
  • Whose signature goes on the release? What’s the cost of an error?