Make no mistakes. Do not hallucinate.

In this post, I'll share my experiences with AI in software development, AI's advantages, and the pitfalls I ran into.

How I got into coding with AI

It was almost three years ago when I was introduced to AI-assisted coding. It started using GitHub Copilot. All I needed to do was pay a premium and install Visual Studio Code. I primarily write code using Neovim, so I installed GitHub Copilot for Vim and Neovim as a plugin. What was amazing about that is it provided autocomplete suggestions based on what was currently typed. For instance, if you’re in a blank Java file and type public st, you’ll get something like the following:

public static void main(String[] args) {
    System.out.println("Hello, world!");
}

Take note that what came after public st is styled as gray text. Back then, I wasn’t aware of updating code via prompts.

Enter agentic coding

Fast forward to late 2024 when I came across Cursor, where developers can open a new pane and type prompts like “refactor this file to minimize code duplication”. It was a game changer. It seemed like I was coding in English now. About a year later, I settled on Claude.

I was used to writing code manually, so it took a few months for me to adopt a new style of coding—type a prompt, check if the changes work, prompt for follow-up fixes, rinse and repeat until I achieve my desired goal. I gradually settled into the cycle of giving instructions and copying & pasting error messages (and eventually screenshots), hoping for the issues (whether it’s functional, linting-related, or type-related) to go away. It was fun while it lasted.

There was a point in time when I developed the habit of mindlessly entering “Could you please fix it?” and “It still doesn’t work” on loop, so much so that I stopped looking closely at the code as often. That led to overlooked complications like unnecessary abstractions, code duplication, and incessant use of code comments. Ideally, code (including the unit and integration tests) should be self-documenting. Comments should only be added for situations where parts of code desperately need explanation. TL;DR: more technical debt that I need to address via follow-up PRs.

You’re still the architect

Coding assistants like Claude or Cursor are just tools that get the job done. They need enough context and direction so that we get the desired results. As mentioned in this post, it’s no different from how people wrote code about a decade ago, before AI-assisted coding became a thing. It was like browsing through forums for snippets and mindlessly copying and pasting them.

Tools like these take out the busy work, but we still need to act and think like architects. At the time this post was written, AI can help us make decisions related to architecture and design. However, the decisions are still up to us.

Light