Live data from Hacker News

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

theregister.com

111–120 of 153 posts

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

#111
post #86

Now compare this to people who blind copy paste from Stack Overflow. This is a bad comparison until you accurately divide the group of engineers who use it correctly and incorrectly.

There's probably a sampling bias for SO that means higher quality than the average code from GitHub (what it was trained on).

I frequently click through random people's repos when they interact with the ones I'm interested in. I see lots of students who are apparently required to do their homework on github. Which is good! But if that's what's feeding the beast... woof.

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

#112
post #96

I am an experienced "industry professional" C++ programmer and I tried ChatGPT and Stackoverflow and found it impressing and entertaining, but I don't know how these two platforms would be helpful for my work. I never use them. When I need to solve a problem I must read the (API's) docs and I must understand it. It would be dangerous and buggy if I would copy 'n paste code from somewhere. I don't think it would even…

I don't know what you do for your work, but I suspect you haven't used chatgpt/copilot/etc enough to see the benefits. Do you think tab-autocompletion is useful? AI assistants can do that on steroids. Do you ever use example code to learn a new package? ChatGPT does that at a new level. When I hear developers I work with saying stuff like the above, I think it sometimes comes from a place of insecurity. It's ok to fi…

I'll continue to try it. It is not like I think I am totally elite and that's why I don't need code examples. It is just that I in retrospective I see that I did not find much assistance in SO.

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

#115
post #12

I find the best use of coding AI is for shitty little inconsequential apps. I could imagine a startup founder using it to feel like they are saving a lot of money on engineering costs by using it for an MVP. You will likely never use coding AI for things like embedded systems, financial software, manufacturing, flight computers, operating systems, software for managing networked infrastructures, various domain specif…

That's my experience as well. I've tried Tabnine and Copilot and they're both useful as fancy line autocompleters when you know what you want to type. However they're unreliable to write code directly from business logic. They'll usually write code that _seems_ to be doing the right thing but with very subtle bugs because they don't understand the intent of the function and just try to mimic what's already there.

I can picture a type of adversarial situation with a generator intentionally trying write bugs to fool a discriminator.

We can't forget that what we have now basically is the MVP of code generation.

We are at the deep dream stage in AI art compared to Stable Diffusion. Deep dream art was pretty much a one off parlor trick. Not a single artist in the world was upset by it.

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

#116
post #34

Earlier quoted context omitted.

That's my experience as well. I've tried Tabnine and Copilot and they're both useful as fancy line autocompleters when you know what you want to type. However they're unreliable to write code directly from business logic. They'll usually write code that _seems_ to be doing the right thing but with very subtle bugs because they don't understand the intent of the function and just try to mimic what's already there.

If anything that's what makes them more dangerous. I tried Copilot for a month and ended my subscription. It will write a SQL query with all the expected keywords in there: a WHERE for a filter, an ORDER BY for a sort, but the way it combines these things, especially recursive queries, is almost always wrong except the most trivial queries which I would have written by hand in no time anyway.

chatGPT is even worse. The less popular a python package is, the more bullshit is in the chatGPT answer. I don't know how many times now it has literally made up functionality that isn't there in a library. At least that obviously doesn't work.

I am going to try it with R though. Maybe that is the real power. Using it to write a language you hate and only the output matters with no regard to how you got there.

Anything in production though that has users is insane.

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

#117
post #21

Surprising. If only there were a way that we could have foreseen that an AI trained to write code in part by looking at people who, self-admittedly, don’t know how to write code, and people who write code for others with minimal context (Stack Overflow), would produce buggy code. It is a case of GIGO. Most developers do not learn much from Stack Overflow. Why do we expect AI to fare better? In my experience, one in t…

AI can learn to do code review, there is plenty of data on Github. It could also write tests and suggest possible bugs on its own. Overall, using it might be better than doing it by hand. If you are using the AI just to write snippets of code, then it is suboptimal. What it needs is to monitor execution errors and fix its code over a few iterations, just like humans do.

Humans fix the code by understanding the model it represents. In fact it's often that bug fixing is where you are forced to understand what you wrote gliby from memory/patten matching.

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

#118
post #106

Looking at the demographics of the study, they only had 47 total participants, 15% of which were professionals and 62% reporting less than 5 years experience coding (which I would imagine is an underestimate assuming some people exaggerated their actual experience level). So that means they only had 6-7 participants who worked in industry and generously 18 people with more than 5 years experience. They also don’t rep…

My concern is that students/novices are going to be using this, without the ability to double-check the output of the tool. It inspires overconfidence, looks okay at the surface level, and bugs go unnoticed. The younger generation using this as a crutch, treating their own creations as a black box, will not have an adequate feedback mechanism to learn from their mistakes. Code quality and performance will deteriorate…

I definitely agree with your point about it being used as a crutch. My criticism was more towards how the authors evaluated AI’s effect on writing secure code. I’m not saying they shouldn’t have student participants, but they should be fully representative across the skill demographics.

To me it’s comparable to a study where you make a general claim about driving ability with lane assist but then 2/3 of the participants only have their learner’s permits.

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

#119
Recently tried copilot for about a month or so. After the initial, “wow neat” couple days I general became annoyed with the suggestions. They are either sort of right, kind of right, or right. However in the time to read and determine I could have already produced the correct result.

I have it turned off at this point.

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

#120
post #87
post #82

Earlier quoted context omitted.

Anybody that uses these ai assistants know that the human is still by far the main architect and driver of the code base. Increasingly advanced AI just means more back/forth between coder and AI, both increasing each other's velocity. AI won't just be trained on other AI-generated code, but more like "cyborg" code. Code that was made by both AI and human together. Code that the human probably wouldn't have been able…

How will they be able to keep purely AI-generated outputs from being fed back in as inputs? That seems hard to separate out once it’s published and not attributed. The ability of AI to generate lots of output means it might swamp human or cyborg outputs when looking at the corpus of publicly searchable code (or blog posts, or whatever the training data is for the case in question). Maybe a GAN to detect and filter ou…

Well I'm not saying that we should put effort into forcing AI to not train on purely AI-generated work.

All I'm saying is that I believe humans are gonna produce more and better code with the help of AI and that AI models trained on a mix of human and AI-generated code will likely result in smarter AI that is also more receptive to cultural changes

I think it's gonna happen through social evolution. Not something we actively need to work towards

Post reply on HN