Earlier quoted context omitted.
The problem with ML is that it's pattern recognition, it's an approximation. Code is absolute, it's logic that is interpreted very literally and very exactly. This is what makes it so dangerous for coding; it creates code that's convincing to humans but with deviations that allow for all sorts of bugs. And the worst part is, since you didn't write the code, you may not have the skills (or time) to figure out if those…
Expand your view. AI can write tests, read error messages, find bugs in your code, we just need to give this task. Let's think about tests. You write a function, the AI writes a few tests for you. maybe you need to add a few more. But it's better to have tests, and you might have missed one of them. Error messages - we rely on error messages to make this leap from "code parrots" to "bug free". Most of our codes fail…
Study finds AI assistants help developers produce code likely to be buggy
121–130 of 153 posts
Re: Study finds AI assistants help developers produce code likely to be buggy
#122Earlier quoted context omitted.
Yes but I don’t see it as generating entire blocks of code you’re supposed to copy and paste into your project. It’s like a template, a suggestion from which you can build your own version. Only rarely does it have the context or understanding of the wider codebase to do a programmers job for them. The times when it does generate a copy/pastable function it’s usually some isolated utility function like “format date a…
I think that many people will treat it as something that can generate entire blocks of code. Unfortunately it can be quite broken even just writing basic functions. One of my tests was doing some quaternion rotations. It did them, but refused to stop multiplying by the conjugate afterwards. Another was converting dates to "years ago", which was broken for BCE because ChatGPT doesn't understand the underlying concept.
Have you tried to use it for this purpose?
It basically can’t unless you’re only building a toy app. Even after multiple levels of refinement it still requires tons of real programming work.
Which is largely my point, it won’t because it’s fundamentally incapable of providing that in its current state. Even without the buggy part it’s mostly just outputs generic stuff that will always need to be integrated into the wider codebase and to specifically what you’re trying to build.
Re: Study finds AI assistants help developers produce code likely to be buggy
#123"Only 67 percent of the assisted group gave a correct answer while 79 percent of the control group did so."
Re: Study finds AI assistants help developers produce code likely to be buggy
#124P¹ All people write buggy code. [1] P² AI assistants are trained on code written by people ∴ People using AI assistants will write buggy code [1] Some might object to this, either in their own case or that of some of their professional associates. I would not trust the judgement of these people.
1. Not all people write code. 2. Code can be written without bugs.
It may be provable that a statistically significant amount of code written by people is buggy, by linking to any overview of CVEs.
Re: Study finds AI assistants help developers produce code likely to be buggy
#125Earlier quoted context omitted.
I think that many people will treat it as something that can generate entire blocks of code. Unfortunately it can be quite broken even just writing basic functions. One of my tests was doing some quaternion rotations. It did them, but refused to stop multiplying by the conjugate afterwards. Another was converting dates to "years ago", which was broken for BCE because ChatGPT doesn't understand the underlying concept.
> I think that many people will treat it as something that can generate entire blocks of code. Unfortunately it can be quite broken even just Have you tried to use it for this purpose? It basically can’t unless you’re only building a toy app. Even after multiple levels of refinement it still requires tons of real programming work. Which is largely my point, it won’t because it’s fundamentally incapable of providing t…
Re: Study finds AI assistants help developers produce code likely to be buggy
#126Re: Study finds AI assistants help developers produce code likely to be buggy
#127> The study involved 47 people with varying levels of experience, including undergraduate students, graduate students, and industry professionals. Honestly, for things like catching potential sql injections, “industry professional” should be the start. I won’t trust a student of any kind further than I can throw them, for topics like maintainability, security or readable code. Those are too far away from what’s usual…
Having "industry professionals" in this sort of study actually puts it in the top tier of studies. Most studies don't even have that, they're all undergrad based. (Sometimes people express frustration that we don't pay much attention to "the science" in the programming field, and my response is generally to tell such people to take a closer look at the "science" they're trying to wave around. Studies based on "a clas…
For me the interesting question is not whether they can improve quality.
The interesting question is, given that they can be used to produce code faster (as a sort or auto complete on steroids), whether that improvement can be achieved in a way that doesn’t involve a decrease in quality.
I think it’s possible, for sufficiently competent professionals that can spot and correct mistakes on the fly, and I have anecdotal evidence to support the idea, but it would be nice to see serious research around it.
Re: Study finds AI assistants help developers produce code likely to be buggy
#128> The study involved 47 people with varying levels of experience, including undergraduate students, graduate students, and industry professionals. Honestly, for things like catching potential sql injections, “industry professional” should be the start. I won’t trust a student of any kind further than I can throw them, for topics like maintainability, security or readable code. Those are too far away from what’s usual…
Many industry professionals ignore or are unaware of known attack vectors. Meanwhile, many schools do teach a semblance. Given how young and emotion-driven the field is, a sweeping statement like this is useless. If security is remotely concerning to you, get a security expert as your baseline.
It’s not either or. Most industry professionals get there after going through school, or are at some point checked to have achieved equivalent knowledge somewhere else. A professional is school + experience.
Re: Study finds AI assistants help developers produce code likely to be buggy
#129Hot take: train next generation of ML assistants to fix bugs.
Re: Study finds AI assistants help developers produce code likely to be buggy
#130Wasn't this obvious from the very beginning? Or we now have a statistical evidence? Hot take: train next generation of ML assistants to fix bugs.