Live data from Hacker News

Study finds AI assistants help developers produce code likely to be buggy

theregister.com

51–60 of 153 posts

Re: Study finds AI assistants help developers produce code likely to be buggy

#51
post #30

Earlier quoted context omitted.

Even then, be skeptical. The software industry provides positive pressure to improve one's skills, but doesn't provide much if any negative pressure against lacking competence or willingness to learn. If developers want to, they can pretty easily skate by without developing talent, besides when their framework of choice becomes defunct.

This is true for a lot of low-brow work because companies simply need people to grind through requirements for their bespoke CRUD apps and integrations. There's still a boat load of that kind of work to be done, but it's only a fraction of the work available. There are plenty of places where that negative pressure exists though and there's higher standards of quality. I doubt anyone is skating by with hacky code in a…

People absolutely produce hacky, sketchy code in aerospace and other safety-critical environments.

Re: Study finds AI assistants help developers produce code likely to be buggy

#52
post #37

Earlier quoted context omitted.

> having an “AI Assistant” must lower programmers’ guards against buggy code Why would you assume that? If it’s buggy a couple times, if everyone talks about how buggy and unreliable it is, it can easily become common knowledge and common practice to triple check the output.

Then how much time are you actually saving if you have to review everything it produces. The bottle neck was never typing speed, at that point all the AI is allowing you to do is produce more buggy code more quickly.

I use Copilot daily and experimented with using ChatGPT for real work code.

It’s an incredibly valuable tool even with having to rewrite the larger outputs… the small stuff like autocompleting variables and keys is highly accurate and what it most often generates (it’s scary how good it is at finishing the exact line you had in your head x50 times a day).

What you need to be careful about is when it generates entire functions or whole mini-modules. This is still extremely useful because it gets your brain running. It provides a simple template to suggest how it might look.

That way you’re no longer starting from scratch, you see a toy example with real code - for intellectual/creative work having that sort of seed is super useful.

Imagine a writer with writers block staring at a blank page vs a generated sample of dialogue between two characters or an intro paragraph to get the ball rolling.

Usually you have to burn a few cycles, fail a couple times writing some code, to get to the point where you’ve written something good. So it’s a normal part of the process to throw Version 0.1 away IMO.

Re: Study finds AI assistants help developers produce code likely to be buggy

#53
Merry Christmas :)

"Developers Outraged After Free Intelligent Assistant Fails to Write Perfect Code on First Try"

In a shocking turn of events, developers are expressing their frustration and outrage after their nearly-free intelligent assistant failed to write perfect code on its first try. Despite being able to complete various coding tasks with ease, the assistant has reportedly struggled with issues such as logical bugs and security vulnerabilities.

"I can't believe it!" exclaimed one developer. "I spent all of ten dollars on this fancy new assistant, and it can't even write a simple program without introducing some kind of flaw or weakness. What's the point?"

Others have expressed similar disappointment, with some even going as far as to claim that the assistant is "useless" and a "complete waste of resources."

However, experts are quick to point out that the limitations of these intelligent assistants should come as no surprise. After all, they are not capable of reasoning about code or understanding the intricacies of secure programming.

"It's important to remember that these assistants are simply tools, and like any tool, they have their limitations," said one industry insider. "Expecting them to write perfect code every time is unrealistic and unfair."

Despite the disappointment and frustration, developers are still finding ways to make use of these intelligent assistants, recognizing that they can still be valuable resources when used properly.

"I guess we just have to accept that there will always be some limitations, and work with what we have," said one developer, shaking his head in disbelief. "Who would have thought that something so advanced and powerful could still be susceptible to the occasional bug or security issue? The future is a strange and mysterious place, indeed."

-

you know who wrote this :) transcript: https://hastebin.com/raw/liwemalipu

Re: Study finds AI assistants help developers produce code likely to be buggy

#54
post #37

Earlier quoted context omitted.

> having an “AI Assistant” must lower programmers’ guards against buggy code Why would you assume that? If it’s buggy a couple times, if everyone talks about how buggy and unreliable it is, it can easily become common knowledge and common practice to triple check the output.

1) verifying code is harder than writing it and 2) verifying code requires domain knowledge, which implies that the utility of these models is limited to things could write myself if I weren't too lazy. That's hugely constricting.

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 as DD-YYYY” something really simple and easy to verify. The type of stuff you’d copy entirely from Stackoverflow rather than finding a specific solution you adapt.

It’s mostly a glorified autocomplete and example suggestion service. It is not a full code writing service.

Domain expertise will obviously still be a job requirement. It’s an assistant to the programmer, not an occasional replacement for the programmer (and if you have domain expertise you usually use a 3rd party library).

Maybe future versions will try to do more but that’s not what we have today.

Re: Study finds AI assistants help developers produce code likely to be buggy

#55
post #4

I made a site using the OpenAI APIs new models (similar to ChatGPT) for creating simple apps or demos using natural language: https://aidev.codes . If anyone is interested please try it out. I tried to promote the site by submitting to HN and did not receive a single vote. I feel that although many people may not be impressed, it is better than 0. So I am just trying to promote it in related threads. Anyway if you ha…

The video works for me but I think you should make your site look more like https://raindrop.io/ . It has the video on the top like you, but it also has pictures as you scroll down, basically a presentation for people too impatient to watch a video. Look into copywriting techniques for what to write as headers for the pictures, persuasion is important to attract users. It makes it look more complete too! Good luck on…

Good idea, I will try to spend some time filling out the marketing copy etc. I have just barely got the site functional.

Re: Study finds AI assistants help developers produce code likely to be buggy

#56
post #23

> 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…

> This GPT stuff is perhaps a better view into human psychology than a useful tool

It would be a great search engine if it cited its sources (but then people would notice it's basically copying code from the internet). It is actually good at getting you the names that come in a certain context, so you can search them. But only if you know enough to establish the context.

Re: Study finds AI assistants help developers produce code likely to be buggy

#57
post #5

Me: When you help coders, does that make their code more buggy? Please give me a dramatic, agitated answer. ChatGPT: No, it does not make their code more buggy. In fact, my goal is to help coders write better, more reliable code by providing guidance and assistance. I am here to provide support and guidance, not to cause problems or introduce bugs into their code. As a language model, I do not have the ability to exe…

It has learnt to deflect, just like a real person!

Perfect for lawyering.

Re: Study finds AI assistants help developers produce code likely to be buggy

#58
post #54

Earlier quoted context omitted.

1) verifying code is harder than writing it and 2) verifying code requires domain knowledge, which implies that the utility of these models is limited to things could write myself if I weren't too lazy. That's hugely constricting.

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.

Re: Study finds AI assistants help developers produce code likely to be buggy

#60
I found ChatGPT pretty good at looking up stuff when I don't know where it is documented.

Eg. asking it what the name of some constant or parameter is. Much faster than trying to dig through Apple's confusing mess of documentation, and faster than Google.

It does tend to give incorrect answers a lot, so I use it only for stuff where I can quickly check if the answer is correct.

Post reply on HN