OffshoreLabs Studio
ENRU
Menu

Building apps with AI · Part 3

Who's the intelligence here?

Illustration: Alex and his dog at a Phuket desk arrange ideas into a connected map

AI writes the code. What am I doing, then? In “artificial intelligence”, the first word deserves at least as much attention as the second.

Last time, I described building EasyStayTH: the agent read files, wrote code and ran checks, while I explained what I wanted, inspected the result and asked for changes. Sounds convenient, particularly if you don't know that explaining “the cards should be transparent” took me about ten hours.

This seems a good moment to pause the app stories and ask which of us is actually the developer.

I've always liked understanding how things work. With ManiTalk, I began by moving code manually and learning about it as I went. Eventually, the agent learned to work with files itself, but my curiosity didn't disappear. I still wanted to understand the connections between parts of the app, the logic and the reasons for its decisions. How else was I going to check its work?

Competing with it over how quickly we can write functions doesn't interest me at all. Sorry, “real programmers”, but here's the bad news as I see it: AI has driven the value of simply typing out code almost to zero. We might have to live with that. The good news is that I still have to supply the idea worth building. These things don't live with our inconvenient human problems. Perhaps that's just as well.

I want to end up with something that's pleasant to use, and it turns out that “end up with” covers an awful lot of work.

Ideas weren't new to me. ManiTalk spent years sitting somewhere in my memory before a tool appeared that let me try to build it. For a long time, the gap between “that would be useful” and a working app was very simple: I didn't know how to start.

AI gave me a way to begin, however slowly and clumsily, and test ideas in practice. Once you've made one working app, it's harder to shelve the next idea. “I can't do that” becomes a less convincing excuse.

An idea doesn't arrive in my head as a finished technical specification, though. Sometimes I have a fairly clear picture; sometimes it's something I can't even properly put into words. The thought runs ahead of my mouth, my typing fingers fall further behind, yet inside my head it all seems to fit. Seems to. Does it?

I'll go to bed and something will keep turning over in there. Something generally is. Occasionally I'll wake in the middle of the night: bloody hell, we could do it that way! Grab the phone, write a note, go back to sleep. In the morning: “the butterfly effect is overrated” and “the sparrow who liked tennis”. Sometimes there are useful notes too.

Even a useful note needs unpacking. At night the solution was obvious; by morning I need to work out what I meant, where it belongs and whether I've invented something unnecessary. Some ideas get thrown away, others wait, others return later. Gradually, a thought emerges that I can explain to somebody else.

So I've started trying to discuss ideas before I've finished thinking them through. With A., with the children, with agents. Telling the story makes the idea acquire words; I have to explain connections and answer questions. That's when I discover that I really have worked out one part, while another still consists of “well, you know, obviously”.

Obviously to whom? I'm not entirely sure myself.

In your head, you can skip an awkward bit without noticing and jump straight to the lovely finished result. In a conversation, somebody is liable to stop you there and ask how it actually works. Sometimes the discussion changes the solution; sometimes it turns out we should build something else; sometimes we shouldn't build anything, because somebody already has. Humans are remarkably productive animals.

I don't consider myself exceptionally clever, let alone a genius, and I don't file agents under either “genius” or “idiot”. You can, and should, hear a second opinion, a fifth, a twenty-fifth, and possibly change your mind. An idea doesn't improve just because it was yours. Ninety per cent of ideas are probably wheels that don't need reinventing. Give or take a completely made-up percentage.

That's where talking to an agent is useful. It can find a constraint or an existing implementation — if I tell it to look — check whether something is feasible, and sometimes suggest another route. I don't need to know the right answer before we start. It would be a peculiar learning tool if I had to know everything I wanted to learn from it in advance. I'd still be sitting on my talking-payment-notification idea.

I was learning throughout: operating systems, different approaches, other people's advice tested against my own jobs. Some I adopted, some I changed, some I discarded. Being self-taught means taking responsibility for learning; it doesn't mean doing without anyone else's experience. My learning happened while I worked, usually prompted by something that had stopped working. Again.

The more I understood, the better I could explain a task and examine a proposed solution. I could ask why the agent had chosen that approach, what else the change would affect, whether there was a simpler way. “Are we doing something stupid here?” is a particularly useful question. The answer still needs checking, but at least it becomes clearer what to check.

This is also where it's easy to quietly replace verification with trust in a confident voice. The answer is long, the vocabulary sounds right, the explanation is persuasive. Surely it understands the problem. You've only just started digging into it, and here it is, explaining everything so fluently you could listen all day.

I'd already seen agents find “bugs” because they didn't know why a decision had been made. Something with a perfectly sensible explanation looked odd to them. I can't accept an answer as true just because it sounds confident. The intelligence is still artificial, after all.

Its mistake doesn't automatically make me right, either. Perhaps I explained badly, perhaps it missed a constraint, or perhaps we've both wandered away from the thing we originally meant to discuss. We need to go back and find where we lost the point, rather than decide who's cleverer.

I've always treated AI as a tool. An interesting, useful one, which makes me want to understand how to use it, what to delegate and where I still need to look for myself. I can ask it to be a great developer and produce code worthy of the Louvre as often as I like. What I actually need is a working feature and transparent cards. Preferably in less than ten hours.

Then comes the moment when all the discussion stops and I open the app on my phone.

Now the questions change. Is it convenient? Is it clear? Does it look how I wanted? And what the hell is that? The agent may have completed the technical task, while I look at the result and realise I still don't want to use it. My own idea can change too: beautiful in my head, in need of rebuilding on the screen.

That doesn't necessarily mean anyone wrote bad code. Sometimes this is the first point at which I understand what the original idea was missing. We seemed to cover everything in discussion, but using it reveals another need I hadn't noticed.

So first I have to work out what I want, explain it, understand the proposed solution, examine the result and notice that it's still awkward to use. Sometimes I have to admit that my own suggestion was rubbish and go back. There's plenty to do even when somebody else writes the functions.

Count only the lines written and most of that work disappears: a conversation that persuaded us to drop a needless feature, an existing solution we found, a check that exposed a confidently wrong answer. These can all leave us with less code, or no new code, and a better product.

My answer to the opening question, for now, is this: AI writes the code; I take the idea through to a working product. I discuss, choose, learn, check, and decide whether we've made the thing we set out to make.

After two apps, I knew I could build quite a lot with agents. I also knew how much I still had to carry in my head. Every discussion added something worth remembering: why we'd chosen this solution, what we'd tried, what we'd ruled out. I wanted a way to avoid reconstructing all of that every time I met the next agent.

Coming up: prompt engineering and why it was born dead. Or, if you prefer: DO NO MISTAKES!!!