4-5 June 2025, Madrid | Global Customer Meeting

Discover more

Updater
April 16, 2025 , in technology

 

How good is AI-generated code?

One of the earliest applications of generative AI models was assisting human software developers with coding. The practice is now widespread and we look at the advantages, as well as the risks, of AI-driven coding assistants.

Eidosmedia AI-generated code

Benefits, Risks and Best Practices for AI Coding Assistants | Eidosmedia

We have heard many times that AI is great at helping reduce monotonous tasks that are easily automated, and that trend continues when we start talking about AI in coding. The first to put Gen AI to practical use were software developers using coding assistants to take the grunt work out of programming. More ambitious bots now claim to let anyone build apps with a few lines of plain-language instruction.

But as we have also learned since Gen AI hit the scene, the hype does not always match up with reality. So, before you get excited about ditching your developers and letting AI do the work, it’s imperative to separate fact from fiction. When it comes to coding, Gen AI has its strengths and weaknesses.

What do coding assistants do well?

We’ve already hinted at one of the best uses of AI in the coding arena: tackling simple, common tasks. With the help of large language models (LLMs), coding assistants can autocomplete lines of code or make suggestions. Additionally, they can help translate code from one language to another, saving valuable time and energy. So, it’s no surprise to learn that AI is already being used by coders to make them more efficient. In fact, responses to Docker’s AI Trends Report 2024 revealed that of the 64% of developers who currently use AI at work:

  • 33% use AI to write code
  • 29% use AI to write documentation
  • 23% use AI to write tests
  • 21% use AI for debugging

Additionally, a French/German government report identified further uses: “While the generation of source code is the key functionality, these LLM-based AI systems can also help developers to familiarize themselves with new projects by providing code explanations.”

Security and quality concerns

But the same report warns against over-reliance on AI assistants: "AI coding assistants are no substitute for experienced developers." It also suggests that the improvements in productivity from using AI may be offset by the need for increased vigilance over quality assurance: "Gain in productivity of development teams must be compensated by appropriate scaling measures in quality assurance teams."

Caution is the the overall recommendation: "An unrestrained use of the tools can have severe security implications." In particular it notes “Mild and severe security flaws are commonly present in AI-provided code snippets. Moreover, using LLM-based AI systems during software development allows for novel attack vectors that can be exploited by malicious actors.”

Limitations of AI coding assistants

As well as the security implications of AI coding assistants, the nature of their training may limit their capabilities. Software development portal LeadDev warns “Codebases with unconventional, non-standard coding patterns, or legacy codebases may challenge AI coding assistants.” And, like most Gen AI, code assistants can struggle to come up with innovative solutions because they only know what they’ve been trained on.

LeadDev also notes that widespread use of coding assistants is creating an unprecedented quantity of 'technical debt' - sub-optimal code that, sooner or later, will have to be rewritten.

Debug with caution

Deficiencies in training data probably lie behind the recent heads-up from Microsoft Research who have just issued a warning about their own debugging tool, Debug-gym. According to a report in ArsTecnica, the tool works better than a standard AI, but "when your best case is a 48.4 percent success rate, you're not ready for prime time."

The report continues: "The limitations are likely because the models don't fully understand how to best use the tools, and because their current training data is not tailored to this use case."

Vibecoding - the answer for amateurs?

While professional coders may benefit from the careful use of AI tools, it may be amateur coders who get the most dramatic results. For those without coding experience, Gen AI may make the difference between just having an idea and turning it into a functioning app.

Kevin Roose, a New York Times writer with no coding experience to speak of, wrote, “Among my creations: a tool that transcribes and summarizes long podcasts, a tool to organize my social media bookmarks into a searchable database, a website that tells me whether a piece of furniture will fit in my car’s trunk and an app called LunchBox Buddy, which analyzes the contents of my fridge and helps me decide what to pack for my son’s school lunch.”

However, as Gary Marcus notes, many of these ideas are just reinventing the wheel. He points out that existing applications of this kind almost certainly make up part of the AI's training data, so the model is merely 'regurgitating' someone else's work. There is also, he adds, a danger that parents and educators may conclude from the popularization of these models that coding is an obsolete skill, leading to a future shortfall in properly trained software engineers.

Skepticism is also confirmed by the survey of attempts to use LLM Grok to write clones of the popular PacMan videogame, conducted by Guardian writer Rich Pelley. “A lot worse than expected” was Pelley's verdict on his own and others' attempts, although some of the games were playable to some extent.

Best practices for using AI coding assistants

Back in the professional sphere, guidelines are emerging around the adoption of coding assistants. Not all Gen AI tools are created equal and for the pros, tools like ChatGPT and Google Bard just won’t cut it. Gartner recommends sticking to enterprise tools like GitHub Copilot, Amazon CodeWhisperer, and Google Codey for companies looking for AI-generated code.

While Gartner seems to recommend limited use of AI-driven code in most arenas, one place it does see significant room for benefits is in testing. From planning and prioritization to creation and maintenance to data generation to visual testing and defect analysis, AI can help at every stage of testing.

While using code to make predictions and suggestions seems safe enough, there are a few more limited ways Gartner suggests deploying these tools — such as helping modernize apps and explaining, detecting, and measuring technical debt.

Still, right now, the advice around code assistants seems to be much the same as in other potential AI application areas: use it to be more efficient, but do so sparingly and with a watchful eye.

Interested?

Find out more about Eidosmedia products and technology.

GET IN TOUCH