In this regard, AI-generated code resembles an itinerant contributor, prone to violate the DRY-ness [don't repeat yourself] of the repos visited.
So I guess previously people might first look inside their repo's for examples of code they want to make, if they find and example they might import it instead of copy and pasting.
When using LLM generated code they (and the LLM) won't be checking their repo for existing code so it ends up being a copy pasta soup.
Yeah, but by generating with AI you're incentivized to skip that initial research stage into your own code base, leading you to completely miss opportunities for consolidation or reuse
It is really useful for hobby projects! I needed a recursive function to find a path between two nodes in a graph and it wrote me something that worked with my data in a few seconds, saved a bit of time
Using it to generate code isn't inherently bad (outside of copyright concerns). Especially in "stupid amount of boiler plate" languages/etc.
But the problem is that people are lazy. They don't bother understanding the output, making sure it does what you want it to, etc. It's not that different than people copy pasting code from reference material. Part of the beauty of software development is that you don't have to solve every problem someone else has already solved. But you do need to know what your code is doing and why.
Copilot is a shortcut to code that "works" with less requirement to know what's happening.
If I don't use copilot to give me a piece of best practice code, I'm probably going to go and find it with a search engine.
Obviously I'm not going to do it for every little thing but if I'm going to implement a * somewhere I screw with that what, once every 5 years?I'm going to go and look how someone else did it and probably take their exact implementation and make minor modifications.
I'm not an absolute copy and paste fiend but I don't have the time to reinvent the wheel every time I want to do something. For the most part it's faster to go and grab crowd vetted code from someone that it is to go back through my own stuff and source my own implementation in the last project. Hell, and a lot of cases there might even be a better implementation than I used the last time I borrowed it from someone else.