What’s It Like Working With A Code Assistant

I recently went to Make With Notion in San Franscico and one of the most facinating panels was with Simon Last a the co-founder of Notion and some engineers from Anthropic, the makers of Claude. Simon is obviously a major coder and both the engineers work with code daily. So imagine how facinating this question and answer was:

How much code do you actually write on a daily basis?

“None.”

From all three of them.

They use Claude Code to write their code. There was a fascinating discussion of how many instances Simon runs at the same time (9) and how that might make him Claude’s biggest token user.

Needless to say after 20+ years as a coder, I had to see how this was possible.

My Time With Claude

I’m a writer now and don’t program every day, so I needed a project. Knowing the capabilities, and limitations, of LLM chatbots I feel they could build a story bible from a manuscript. But if you put a 80,000+ word manuscript in ChatGPT or Claude and ask it to tell you what characters were in each scene for the whole book you completely confused output. These models just can’t handle that big of a dataset.

But they can look at a scene and pull out the characters pretty well.

I’d tried cut and pasting each scene into ChatGPT asking for a character list. Then I asked it to keep up with the list, but that had mixed results, and you’re still filling your whole context window with the novel.

My feeling was custom code would be a better solution. Read my Scrivener file (a XML based proprietary format), grab each scene and pass it to an LLM API, have it format the return into something computer parseable, then keep the scenes and character stuff in a data structure.

So I installed Claude Code. Got familiar with it by having it clean up my complicated shell start up scripts. Then I basically told it what was in the previous paragraph.

It wrote 70 files and hundreds of lines of python code, tested it, and committed it to a git repository.

And it work.

It was a first step and we tweaked things. I watched what it was doing and suggested changes, which it did. It was facinating to watch it think. Yes, think. It even said things like “I’m getting off track here, roll back and try something else.”

An Enthusiastic A+ CS Grad

It really was like team programming with a recent grad. They can write the code, but don’t always know what to write.

At one point we had a problem with the ASCII output library it was using messing up Claude Code’s UI when it ran the tests. It fixed it by adding a command line flag to do plain text.

After that was done, I pointed out it had added if statements around every print output. “Wouldn’t it have been better to refactor the code so the output was moved to our own routine, and then handle the if statement there once?”

“That’s a great idea” Which it promptly implemented. (Did I mention its gung-ho).

The I said, “Now Claude, we learned a valuable lesson here about when to refactor. How can you remember that logic so you won’t do it again?”

It was just so weird to be talking to a computer program like a college intern. 🙂

Claude Code 2.0 came out last week, and one of the things it added was a way to remember things. Plucky assistant Claude wrote up an “Anti-Pattern” document that included how to recognize when it was going to make the kind of mistake we talked about and what to do instead, including asking for directions.

It wanted to put that memory in just the project’s CLAUDE.md file, but I pointed out this is relevant to all coding, and we put it in the file at the user level of my machine.

Then I opened another terminal window, launched another Claude, and told it to up date my saved and shared start-up scripts to include the Claude.md file.

We live in the future people.

PS: Claude was working on implementing a SQLite database in our analyzer while I was writing this posts.