A reflection on AI and taking responsibility for what we ship.
In a recent chat with a friend, I shared an experience in which I deleted over 25k lines of code from a project I was working on. I explained it was an effort to completely deprecate a legacy flow, thus making it unavailable in new app versions.
While I shared with him, there was this instinctive, curious look on his face. Then he asked me if I had used some AI to accomplish such a Herculean task. I responded simply with a “No.” Instantly, his demeanor became rather calmer.
He then recounted a funny scenario from a project he had worked on where bad code was pushed to production, which inadvertently broke the login function in the app. Apparently, behind the rush of curiosity was a question on his mind: “I hope your change did not remove or introduce a regression bug?” Thankfully, no issues till date. 😀
AI as a Tool, Not a Silver Bullet
You may be wondering by now, “What is he driving at?” or even thinking, “Why does he not use AI? He must not be productive.” Well, on the contrary, I do use AI, but on a case-by-case basis.
I believe AI is a tool every software engineer (SWE) should take advantage of, but this in no way makes it a silver bullet.
I have my reasons for not using AI for that particular task:
- Primarily, I did not write the code.
- Secondly, most of it coexisted architecturally with other code that must remain.
- Lastly, I felt a made-up Human + AI conversation like the one below would make me second-guess myself when I eventually triggered the
mergecommand on the repo:
ME: Hey, Claude, scan the repo and remove legacy feature XYZ.
AI: Thinking… Identifying legacy feature components… Deleting related files… Running the Gradle build command
AI: Done! 14k lines of code removed across 117 files. No compilation errors. The Gradle build passed.
ME: Thanks, buddy!
Now, don’t overthink the prompts or the chat messages. They’ve been simplified in order to get to my point. But hey, sometimes we get lazy, and our interactions with AI fall in the same bracket as my made-up Human + AI chat. So the prompt could as well pass as a valid chat a SWE could use to perform a task similar to the one I did manually. 🤷♂️
How I Approached the Task
Before proceeding any further, I would like to make plain, as much as I can, how I approached the task I have described so far, for anyone reading this article who’s curious:
- I deleted the code in a logical sequence, with each step in its own commit. That let me verify at each step that the app still compiled, which would catch issues such as missing Dagger bindings.
- I also verified that the change did what I expected.
- I checked that the end-to-end UI tests passed and verified the user flows manually.
These were some of the reasons I felt confident enough to merge.
Taking Responsibility for What We Ship
With that said, let me get to my point. Recalling the conversation with my friend, I notice a sentiment that resides not only in him but also in every other person I discuss AI-driven development with. On the one hand, there’s the agreement that AI is incredible and can indeed write code, but on the other hand, there’s a subtle skepticism as to whether it did the right thing without any side effects.
Being a software engineer, I share these sentiments as well, and I think they are valid. From my experience, the part about skepticism, many times, comes from the fact that we work on huge production systems where shared dependencies across components are common, and a single mistake can cause ripple effects leading to incidents.
I am not a prompt expert, but it feels to me like even though we are given certain parameters to manage the randomness and autonomy of AI coding agents, they still somehow manage to do things outside the bracket of our rules. If our guardrails are not a silver bullet to ensure AI output aligns with our expectations, should we not keep a keen eye on it?
As software engineers, we are responsible for the changes we merge. Companies don’t hire GPT5.1 sol or Claude to build their businesses. They instead hire human engineers to work for them. Whichever tool you wield for execution requires a great deal of care to ensure quality is not compromised and work is delivered safely and on time.
Comments
No comments yet. Start the discussion.