Why Programmers Are Using Problematic AI Code?
While AI-generated code promises benefits like faster delivery, reduced boilerplate, and increased productivity, it often contains considerable flaws, including hallucinated functions and serious security vulnerabilities. Yet developers continue to use it. The question isn’t whether AI-generated code is broken but rather why developers rely on it. After two years of hands-on experience with AI pair programmers, from early tools like Cursor to more advanced agentic setups, Namanyay Goel, founder of Giga AI, describes a developer’s daily trade-off between code quality and efficiency. He summarised in a recent blog post, saying, “AI coding tools are simultaneously terrible and necessary.” The Cold Economics Behind Messy AI Code Goel highlighted that businesses prioritise rapid product releases over code quality, leading to widespread acceptance of flawed software. Although there has always been a divide between developers and businesses, AI has made it wider. “As a programmer, since I live inside my codebase, I want to make it perfect,” wrote Goel. “But from the perspective of a business, my code is merely a tool to generate revenue.” He pointed out that AI tools are potentially favoured not for their elegance, but for their speed. A former engineering manager once told Goel, “Nobody’s getting promoted for clean code if the feature ships late.” That said, some developers do not have a choice but to use the AI tools because the company invested in them. A Redditor said their company had little choice and had to spend money on Copilot licenses. Yes, It’s Flawed. Yes, It’s Still Useful The cracks are glaring. AI struggles with anything beyond mainstream stacks. Goel recalls a WebGL project where it generated code that looked plausible, but simply didn’t work. Even when the output functions, it often lacks grace. “The code worked, but the AI completely lacked the ability to implement an elegant solution,” Goel wrote. Birgitta Boeckeler, global lead for AI-assisted software delivery at Thoughtworks, explained the problem with AI-generated code by categorising it into three areas of impact. First, it slowed down the development speed and the time to commit. Second, it created friction for the team flow in that iteration. Lastly, it affected the long-term maintainability of the code. AI coding can also be a security nightmare. Chetan Gulati, a senior DevSecOps engineer at Fraud.net, told AIM, “AI coding does present significant security challenges. Generative AI, at its core, is an advanced sentence completion system, making it susceptible to prompt injection attacks that could introduce sensitive details or vulnerable code into a system.” Despite concerns, developers are embracing AI code generation due to its genuine utility in specific applications. In a recent blog post, Github’s Johan Rosenkilde, principal researcher for GitHub Next, highlighted that 95% of the time, Copilot makes his day a little bit easier. According to GitHub’s own stats, 88% of developers felt more productive, and 60% said it made their jobs more fulfilling. Earlier this year, in a Y Combinator podcast, partner Jared Friedman said that one-quarter of the YC founders admitted that over “95% of their codebase was AI-generated”. He pointed out that these were highly skilled founders who, just a year ago, would have built their products entirely on their own—but now, AI does the heavy lifting. Another developer on Reddit commented, “I hate it, but it’s a useful tool. I’m retired, but I have a little project I’m working on for my own entertainment.” He added that Web dev has become insanely complicated. “Google/StackOverflow used to be enough to get me unstuck, but web toolkits move so fast that it’s full of out-of-date answers that add more confusion.” The developer further stated that they started using Copilot and found it good, even if they did not trust the code. Last year, there were similar sentiments around the usefulness of StackerOverflow, which is where AI tools seem to be chiming in. Goel recommends a layered approach: Use AI to draft, then verify ruthlessly. Break problems into smaller chunks, give full code context, and—crucially—keep a “WTF AI” journal of the tool’s most ridiculous missteps. He noted that those failures compile an internal library of lessons learned, indicating what should not be repeated in the future. Goel concurs, citing documentation parsing, boilerplate generation, and simple debugging as areas where AI earns its keep.
“I hate it, but it’s a useful tool.”
“I hate it, but it’s a useful tool.”
["coding"]
["Go", "TPU", "AWS", "AI", "coding", "Git", "Aim", "generative AI", "Rust", "GitHub", "R"]
["AI", "generative AI", "Aim", "AWS", "TPU", "R", "Go", "Rust", "Git", "GitHub"]
I am a tech aficionado and a computer science graduate with a keen interest in AI, Coding, Open Source, and Cloud. Have a tip? Reach out to ankush.das@aimmediahouse.com