Gee really? You mean generated code by some ML model means people get lazier and just cut/paste hallucinated code? Who would have thought?
I doubt AI is making anyone lazier and less worried about code quality, if they weren't already.
Coding on Copilot: Data suggests downward pressure on code quality
31–40 of 60 posts
Re: Coding on Copilot: Data suggests downward pressure on code quality
#32Re: Coding on Copilot: Data suggests downward pressure on code quality
#33Re: Coding on Copilot: Data suggests downward pressure on code quality
#34Gee really? You mean generated code by some ML model means people get lazier and just cut/paste hallucinated code? Who would have thought?
Re: Coding on Copilot: Data suggests downward pressure on code quality
#35Re: Coding on Copilot: Data suggests downward pressure on code quality
#36I've found that it's useful for explaining things to me, and barely anything else.
Now you have that 6 line script you wanted.
Honestly it is still pretty useful though, as you can see 'your code in different clothing styles' in some sense, very quickly to choose the best/most performant option. You just have to know what that looks like before going in, and it helps make it 'tangible' quicker.
Re: Coding on Copilot: Data suggests downward pressure on code quality
#37Earlier quoted context omitted.
The study shows a doubling in the rate at which tech debt code is produced and checked into the repo. Anecdotally, as a principal engineer, I’ve definitely noticed that new senior engineers on the team that say they are using chatgpt/copilot produce unprecedentedly bad code at unprecedented rates. It takes me 2-3x longer to unwind such crap than it would for me to write it from scratch. As we grow the team, this will…
I was going to ask, why aren't they running the code through unit tests if they're committing such shit code? Does it pass the tests, or is it just inefficient code?
Then: Outside of some extra complex or absurdly simple case it is very often harder to write tests which truly and fully test your code then it is to write the code correct.
In my experience often correct code is a product of carefully written test (which still are in reality imperfect), static code analysis (can be the type system, or external tools) applied to carefully written code and a proper code review.
So if you bring both of it together you have:
- AI supported code which is likely to contain bugs which are really easy to overlook in reviews
- AI supported test code which is has the same issue, i.e. they have gaps which are really likely to overlook by reviewers.
- more code due to less reuse and it also sometimes being easier to generate instead of use a library leading to more code review needing to be done and in turn more time pressure and less quality review
so put together: more bugs which are hard to find with test which are more likely subtle pass even with bugs and less time for proper reviews
So does it pass the test? Yes, but it was AI written too so can it be trusted?
Re: Coding on Copilot: Data suggests downward pressure on code quality
#38Are there "best practices" that can help here?
Re: Coding on Copilot: Data suggests downward pressure on code quality
#39I think this is what's happening. Code production speed has increased. But the speed and efficiency of review and testing hasn't kept pace. Also, my current job limits the use of AI coding tools, because of the risk of our IP leaking out. To really be useful, there is a lot of context a programmer should be able to collate. Not all of it is going to be in the repo.
And AI gives you fast code production speed so it seems to be a fix.
But due to less structured code and code reuse it needs much more code for the same value produced. And it loves to produce the kind of bugs which are easy to pass reviews and tests (because this are the kind of bugs it most likely has as "correct" code in it's training data). Which means less time per-value for human code reviews and in turn lower quality results on many levels.
I originally hoped that with CS/SoftwareDev getting older and less explosive grows and Universities more realizing the (sometimes huge) gap between CS and SoftwareDev the industry would get a chance of consolidating tech and dev processes to fix that issue. But with the rise of LLMs this hope might be further away then it ever had been in the last 20 year.
Re: Coding on Copilot: Data suggests downward pressure on code quality
#40Gee really? You mean generated code by some ML model means people get lazier and just cut/paste hallucinated code? Who would have thought?
Actually if you read the study (I didn't want to give them my email either) you'll find that they can't tell generated code apart from any other code, and are just saying that code quality went down (per their metrics) in 2023. They assume it is because of Copilot. They do not demonstrate this.
- Making code more accessible mean people with lower skills can contribute.
- Increased in productivity increased expectations for deadlines and so there is less time for quality.
- 2023 was a year with lower code quality on average for everybody.
- Easier code to produce meant more code produced, and maybe it dwarfed the absolute amount of quality code, giving this impression, while the relative amount didn't change but we don't have their way of measuring good code.
Etc