I have been coding collaboratively with GPT-4 extensively for the last few weeks using aider [1]. Prior to that I had been using an ad hoc workflow to code with GPT-3.5. Here's are some thoughts on my experience collaborating with AI on code:
- Use GPT-4. It's vastly better than 3.5.
- Use an integrated workflow like copilot or aider. Cutting and pasting code between your editor and a chat window/tool is tedious, and doesn't give GPT any context about the rest of your code. It forces you to do extra up front work to prepare your code to call a bite-sized function that can be easily cut/pasted. Asking GPT for revisions is slow with more cut/paste at every step.
- Coding with AI lowers the activation energy to start a new change, since you expect it to be easy.
- GPT is a champ at boilerplate, and can quickly prepare the ground for the interesting work.
- Typing a few terse, informal sentences describing the task to GPT can help organize my own thinking.
- I spend so much less time fiddling with annoying details of syntax, method names, parameter names/order, regex syntax, etc.
- It's important to break down a big change into a series of smaller, self contained steps.
- Watching GPT type out code is good "think time" for me.
- GPT is great at "busy work" like updating docs, adding small quality of life features, writing tests, etc. I accomplish 10x as much of this work now because it's so easy to just ask for it.
- GPT has astounding knowledge about available libraries and packages that can simplify your task.
- Expect to iterate rapidly with GPT on more complex code changes, offering it feedback/direction.
I'm not sure I can go back to coding the old fashioned way. I realized this when GPT-4 went down for an hour or so last week.