Man Metal Machine – Pair Programming with the AI
from Robot & Frank

Man Metal Machine – Pair Programming with the AI

"Mission says we have done well. That we are an effective team"

A couple months back the CEO told us all – the whole company – to make AI central to our workflows. His reasons were good, but this is not the kind of announcement that fills developers with enthusiasm! But a couple of my friends had been talking about great successes with AI coding and I'd wanted to give it a try. I decided to go all in.

Since then I've used AI assistance to code Ruby on Rails (which I'm excellent at), raw SQL (which I'm decent at, but certainly don't know all of) and JS with Vue and Vuex (which I scarcely know at all). (Kent Beck of all people says he's been coding in languages he doesn't know with AI assist.)

The results have been far better than I could have imagined.

This is a brief story about what works for me. If you have different experiences – a different approach that works for you or even if it doesn't work for you at all – I want to hear from you. This is a whole new field and I want to learn from you.

The tools for the job

I'd had a brief shot at AI-assisted coding early last year. I tried using ChatGPT for a problem I simply didn't know how to crack. It didn't get me anywhere. I'm sure the LLMs were less advanced then, but in retrospect I was also naive about how I was using them and about the specific code domain.

This time I initially used Claude standalone (Claude 4 Sonnet I think). It was a little help but no great shakes.

The huge breakthrough came with cursor. If you don't know, cursor is a fork of VS Code – a full IDE with integrated AI support (Claude Sonnet and Opus and various other models). Like some other tools, cursor can read your entire project codebase on disk. It's a game changer.

Learning from others' mistakes

I was doing a code review and saw a whole new test file appear for a previously untested class. Every method tested. Great! Except...the tests were all about method implementations, not their outputs. Method x calls method y twice, and receives the following return values.

I checked with the Dev. Did he simply ask the AI to give him spec for the entire class? He confirmed it. (The AI, bless it, didn't know what those methods were supposed to do. All it could test was what it could see them doing.) And he stood by it – even if these weren't the best tests, at least it was something. It led to a really great discussion amongst the Devs about good testing. (For the record, I think testing the implementation and not the outputs is worse than nothing.)

I decided then to be a lot more specific when working with the AI.

Pair Programming with the AI

So to the next day, armed with this lesson, my clean cursor install (yes it really was my first time using cursor) and a new Jira ticket. And I started by telling the AI (heavily paraphrased):

We're going to write tests. I don't want to test the implementation of methods. I want to test outputs for known inputs. I expect some of the tests to fail initially. We will subsequently code the implementation.

The AI knew I was talking about TDD. Good start.

For the first test I want to test method x. I want these inputs. We're going to test for the existence of this feature rendered to the page.

And that's how it went. I asked the AI to deliver me a test. I was specific about what I wanted. It wrote the test. I asked it to write an implementation. It wrote the implementation. I made changes to what it had written. I questioned its choices and we discussed alternatives. It helped me track down bugs.

It was every bit a pair programming experience. And it accelerated my delivery immensely.

And then tab-complete

If I thought the agent was good, I was shocked again a few weeks later when I learned how good tab-complete could be. I was writing a new run-once data migration task. I made a small change to the implementation and thought I'd better add it to the human-readable description. Placed the cursor in the description block and the AI wrote what I was about to type. Almost word for word. I hit tab and moved on. Blown away!

I switched to another implementation file – a worker class. I'd given the class a solid, descriptive name and started writing the key method, also with a descriptive name. When I closed the parentheses on the method signature, the IDE offered me 5 lines of tab-completion. I stared at it. Based on the class and method name, the AI had given me a correct implementation. Not perfect but correct. I accepted it and made some improvements.

Now this was Ruby on Rails, the language and framework in which I'm most expert. I'd have written the same thing pretty damn quickly all on my own, thank you. But nevertheless the fact that the IDE offered it to me was an accelerator.

The partnership

The AI and I bring different things to this partnership.

The AI types really fast, without errors. When I ask it about where something is implemented, it can search my code faster and more effectively than I can. It can explain language features that I don't know (a huge help in an unfamiliar framework). It can rapidly generate whole methods.

What do I bring? Strategy. Intent. Context. I can spot code smells and refactoring opportunities that the AI misses.

Are we an effective team? Damn right we are Sally!

What's next (for me)

I love this! How good can it get? How good can I get at it?

I've discovered that there's a tipping point somewhere in between supervising the AI really closely and engaging it in discussion (really effective) and telling it to go write a whole class on its own (those implementation tests above). Where is that tipping point? How much bigger can I make my requests to the agent before it stops being useful?

And what else can I do with it?

  • Here's a feature description. Write an epic and user stories in RAG format.
  • Here's a user story, break it down into gherkin-style acceptance criteria.
  • Here's an acceptance criterion. Write the test. Write the implementation. Tell me the edge cases. Write tests for those.

And I want to try an AI IDE running entirely on my laptop without sending my data to an agent in the cloud. That would address security and confidentiality concerns with tools like cursor.

What's next (in AI the field)

The field is moving fast. This experience is all relevant today, 1 August 2025. We know that in six months it will have changed. The AI agents will get 'better' in some sense. But what that means we can only speculate. Less chatty? More so? Better at writing the right thing at the right time? Less expensive, or more? We can't tell.

The other point is that I can use the AI well because I've written thousands of lines of code myself over many years. How will a kid entering programming today ever get that experience? We're going to have to work this out.

To view or add a comment, sign in

More articles by Guy Strelitz

Explore content categories