Live data from Hacker News

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

theregister.com

31–40 of 153 posts

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

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

What are users supposed to do when they visit your site? Sign up? There's not enough information there on what to expect from the product for me to want to sign up. You should add more detailed information about what the tool does as enticement to try it.

Were you able to view the video?

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

#32

Isn't this like trouble shooting a pong console to assess the future of video gaming?

No, they aren't judging the future, they are judging the present. Many developers are using language models to assist them today so it is worth checking if that actually helps them or not. When we are in the future we can start judging future language models, but until then we can only test what we have now.

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

#33
post #11

Earlier quoted context omitted.

Haskell? Not buggy code? I'd say Haskell is the best language to write buggy code. And when I say buggy is not about writing purposely to be buggy, I say it's a maintenance horror show that WILL produce buggy code 100% down the road. Remember, maintenance is 90% of a project life, the initial development is only 10%.

Ok. The main point was to discuss making languages that are better at preventing bugs. I simply threw out one to get the conversation started, not to be the final answer. Other thoughts?

You can't prevent injection bugs on a language level, since injection happens when you use string manipulation to dynamically create code that you send to another program. This means that it is just as easy to create SQL injection bugs in Haskell or Rust or any other language, because they all support concatenating strings to create SQL.

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

#34
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.

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.

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

#35
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 your site!

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

#36
post #3

Sounds like we need computer languages that are better at preventing bugs. Throw in a little static analysis and AI assistants become more useful. Type inference, pure functions, functional, assertions, … Maybe start with Haskell?

Haskell? Not buggy code? I'd say Haskell is the best language to write buggy code. And when I say buggy is not about writing purposely to be buggy, I say it's a maintenance horror show that WILL produce buggy code 100% down the road. Remember, maintenance is 90% of a project life, the initial development is only 10%.

You must have used a different Haskell in production than I have.

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

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

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

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

#38
I’ve been using GitHub copilot for six months now. It definitely produces a lot of code that looks right, but isn’t. I review anything it produces carefully. I’ve introduced one bug to production where I can say that was likely from copilot. Compared to the number of bugs I produced in that time, that’s nothing. It’s a productivity tool, not magic, and it’s not replacing me anytime soon. Like the auto complete in my IDE, it accelerates my work. There’s no going back for me.

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

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

Does it look at the questions on Stack Overflow? That would be silly. But yeah, even the answers are far from perfect - they might solve the immediate problem but lack error checking, use undocumented features, etc.

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

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

If I had a little robot riding in the passenger seat that could tell me whether to go left, straight, or right, and it was correct 90% of the time, I'd think that was pretty great. I'd get where I needed to be, even with a couple mishaps.

ML code suggestions are the same thing to me. If I don't know where I am going, I can just ask it for suggestions. And it's probably going to be what I want.

In both cases, I am annoyed with myself for having started before I knew where I want to end up.

Post reply on HN