I was wrong about AI Coding

I'm mostly anti-AI person since the AI hype started years ago. However with time I realized that I misjudged AI Coding — Here’s Why.
I was wrong about AI Coding
Photo by Kanhaiya Sharma / Unsplash

A few thoughts kept me busy and I wanted to get it out.

I'm mostly anti-AI person since the AI hype started years ago. The basic reason was the quality of the content created by AI. I'll keep it short, but some of the things that made me keep away from AI were:

  • Hallucination is a big issue. AI answers are full of wrong assumptions.
  • Images generated by AI feel very fake. People use AI-generated images all the time, and it's just poor taste for me.
  • Vibe coding is real, but people using them don't know what they do, and they vibe code until something is fixed, without understanding what has been fixed. For me it's a huge red flag, because it signals the person doesn't care about quality at all.
  • FAANG created AI related products that truly suck (see latest state of Siri, or Google populating the search results with false narratives).
  • AI-generated text and blog posts feel immensely fake. People think that others won't care or don't understand the difference, but you can smell one from hundreds of meters away.

You can argue that most of these are better now, or that “quality” is merely a term used to deter newcomers from entering the field. However, I still believe there’s a significant issue with how we manage AI tools. And a part of me that always prioritizes quality over cheap work still holds this belief.

Tipping point

However, I'm a Software Engineer for almost two decades, and over the years, I've always tried to learn more. I think it's always good to be open-minded and take the good parts of your learning journey. All great Software Engineers I've worked with so far have one thing in common: they are open-minded and have an immense desire for new knowledge.

Let me admit one thing first before I move on: I was partly wrong on the "Coding" part of AI.

I believe now that it's truly powerful if you know how to use it. How did I change my mind? There were a few people in my circles that made me rethink my stance against AI, and then when I used it in a few projects, I decided it's time to write this blog post.

The first person was Thorsten Ball. You should follow him. Thorsten is a Software Engineer and worked on various things over the years (Code Search, Editors, Type Systems, etc.). He also wrote a great book on how to write a Compiler and Interpreter for Go. So he knows his stuff. In the past months, he is advocating more and more for Software Engineers to be open minded and to learn more about AI tools. But what made me rethink was his blog post about why people should take Coding with AI seriously: https://registerspill.thorstenball.com/p/they-all-use-it

This was a tipping point for me, because as with many friends like me, I wasn't really into it, but the curisiouty in me couldn't let it go. Reading the blog post made me realize that I should really change my attitude. I think Thorsten did a great a job of advocating for a future where AI can be used to create "Quality" work in a way more efficient way.

The second tipping point was the various sessions I had with my friend Mustafa Akin. I believe it was about two or three months ago that we met for lunch. I asked a simple question to him: “I think the entire AI concept is overhyped and unrealistic, but I know that you’re also trying and experimenting. Do you have anything that could potentially change my mind?”

He launched Cursor and demonstrated to me in just ten minutes how he had resolved an issue in his personal project that would have required him a day or two. In the following months, he consistently showcased various examples of how he utilized Cursor and other similar tools. Each example he presented improved compared his previous examples. These observations made me to reconsider my stance on AI.

Using AI for coding for first time

Having changed my mind slightly, I was looking for an excuse to use it. I'm a heavy NeoVim/Vim user. I’ve used it for almost 23 years, and even after trying lots of IDEs and editors, I always come back to Vim. This is important because I never wanted to use VSCode with Copilot, Cursor, Zed, or any other editor. I tried Zed a few times, but again, it's not the same. So when Claude Code was announced, I really loved it, because I could use it with Vim side by side on my terminal.

A few days ago, I worked on a bug that was caused due to connectivity failures between Etcd members in different regions. This was because the Kubernetes service responsible for Etcd was misconfigured. After several debugging sessions, I implemented the fix in our controller. Next, I had to write a proper unit test to ensure that the controller always creates the correct services with the appropriate annotations and labels.

Usually, what I would do is scaffold a table-driven test in Go and slightly build it with lots of edge cases. And I knew it would take me a few hours because we didn't have any tests yet. Adding a case to an already written table-driven test takes a few minutes mostly, but writing a new test from scratch is not always fun, honestly. So I knew what to do. I've used Claude Code and asked a simple question:

I added a new function called reconcileEtcdServices. Write a table driven unit test for it.

It was quite straightforward and simple. More importantly, I didn’t mention the location of the new function definition or provided any specific instructions. I could have been more detailed, but I intentionally omitted it to observe how well the code executes.

The results blew my mind. Claude Code wrote a test that had the specifications:

  • It was truly Go idiomatic. Even the test name followed the convention TestType_Method.
  • It used existing frameworks (such as testify) and wrote the test that resembles exactly how our other test were written.
  • The table driven test had 4-5 cases. It not only tested whether the services were created properly, also made sure that they were NOT created when a certain configuration was disabled.
  • It read my doc comments that I wrote of the function, and used those descriptions in the test cases.

If I were to share the code with any of my colleagues, I believe they would perceive it as being well-written by me.

However, something was off with the test. First, it wasn't as tidy as I would write; second, it didn't compile at all. I immediately knew, though, because it hallucinated and assumed there must be some sort of function called identifier.SetX(), however, the identifier was a global package modifying an internal value, so it had to be initialized differently.

I told Claude Code to revisit the code again, pasted the error, and told him to initialize the value in a different way. I knew how to do that, but I didn't tell Claude the solution. I wanted to see if it could understand and figure it out. In the second iteration, it recognized the error, did a deep search, and found the correct way of initializing, and also refactored the test again. At this point, it was compiling fine, and all the tests passed fine.

In total, it took me about 4-5 minutes to do all of this, whereas previously it would take me maybe a few hours, depending on the test. Claude Code said the total cost was $0.81, which I think is not bad at all.

What's next

photo of outer space
Photo by NASA / Unsplash

I shared my experience within the company on Slack and explained how it significantly sped up my work. There were already a few people experimenting with AI Coding, some of whom had negative experiences, while others had positive ones. Overall, it was a mixed bag. Nevertheless, I sensed that everyone was excited to give AI Agents a try.

The issue, particularly in my use case, is that the codebase I’m working on is a Kubernetes controller, which is quite complex, comprising hundreds of rules and business logic. It's responsible of creating horizontal scalable databases across thousands of nodes. Most of these rules are based on assumptions that aren’t within that repository (for instance, performing a regional failover for a multi-regional database).

Hence, I'm not sure how useful it'll be for things that work only in a distributed system, where assumptions and requirements are represented by multiple entities and repositories. However, going forward, I'll be trying to incorporate more and more AI coding into my dev workflow. I think with time, I'll also be learning certain assumptions, how it works best for our use case. Tests, for example, are a good candidate so far. Small, decoupled logic could also be a good candidate.

If you're like me, and always hesitated, I'll suggest doing this. Read Thorstens blog post, and afterwards maybe spent a few hours trying Cursor or Claude Code. Give it a try, and maybe spend a few hours understanding how it fit your workflow. You won't regret it.

Engineer with a passion for Design, Dieter Rams, Watches, Coffee and Bauhaus

No spam, no sharing to third party. Only you and me.