With AI-assisted code, I’ve been wondering what’s more optimal and also more enjoyable. On one hand, it feels great when AI generates code that, with just a couple of tweaks, works well enough for me to start iterating. But it often misses edge cases, which can lead to a lot of frustration. For example, just yesterday, I was using the new ChatGPT o1 model with Cursor (which is basically a clone of Visual Studio Code that uses LLMs for code assistance). I was bouncing between Cursor for AI changes and Emacs for making bigger manual edits. I had some AI-generated code that made a simple video by grabbing an OpenGL buffer and encoding it using ffmpeg. Things were going smoothly until, all of a sudden, the code just stopped working.

I spent hours scratching my head, trying to figure out what went wrong. Turns out, the AI-generated code had a sneaky bug; it wasn’t flushing the decoder at the end, so a couple of seconds of the video were missing. It was the kind of bug that’s easy to miss, especially in my AI-generated podcasts, where I didn’t even notice that 2 seconds were cut off in a 40-minute episode. But yesterday, I was doing something else, and that missing bit mattered.

There’s this sweet instant gratification when the AI spits out something that works right away, but then, the debugging hits hard. It’s like a rollercoaster. I thought, “This is it! Humanity can relax; AI is here to take over.” But nah, it’s not a silver bullet. I still ended up spending too much time debugging instead of just writing it myself. I keep thinking there must be a balanced approach, but I haven’t quite figured out where to draw the line yet.

To be honest, I prefer writing code that’s already solid, bug-free (if that’s even possible), and easy to debug. I like adding tons of debug output logs, safety checks, error handling—things that AI doesn’t really think about. Debugging is just… not fun. I want the code to work right from the start, not to spend hours playing detective on an AI’s half-baked output.

In the end, I’m torn. I love not having to write all the boilerplate code, but the constant back-and-forth between Cursor and Emacs, tweaking AI-generated code, then manually fixing it—it’s a lot. It’s fun, but also frustrating, and I’m not sure if AI-assisted coding is where it needs to be just yet.

Next - Previous