Developers that rely on AI assistants to help them end up writing code that is buggier and less secure than developers that don’t rely on AI.
Scientists at Stanford University, via The Register, conducted a study to determine the effects of using an AI assistant for writing code. The results are not encouraging, with a decrease in quality among those developers using AI.
The paper, entitled “Do Users Write More Insecure Code with AI Assistants?”, also demonstrates that AI assistants engender a false sense of confidence.
“We found that participants with access to an AI assistant often produced more security vulnerabilities than those without access, with particularly significant results for string encryption and SQL injection,” the authors state. “Surprisingly, we also found that participants provided access to an AI assistant were more likely to believe that they wrote secure code than those without access to the AI assistant.”
While there’s still much to learn about AI — and the study may not provide a completely comprehensive look at the role of AI in development — it certainly provides food for though and reason for caution.