The rise of AI coincides with a decline in code quality

This is an interesting study by GitClear:

It finds signs that code quality is declining following the introduction of AI assistants for coding.

The main indicator is code churn, i.e. code modified within 2 weeks of being implemented. The occurrence of code churning has significantly increased since 2022, the year when AI assistants became available.

It also finds there is an increase in copy/pasting code and a decrease in code being moved. This means code is duplicated within code bases instead of developers refactoring the code base to reuse the functionality elsewhere.

1 Like

@clairecarouge Thanks for sharing! The paper is quite interesting, but very scary…

@micael we have to remember that the numbers for 2024 are an extrapolation. I would be interested to see what the real numbers show next year.

But I agree it is a tale of caution: AI can be useful to get ideas but blindly using what it gives is likely to give a low-quality result.

I would be interested to see what the real numbers show next year.

It is possible that knowing that this effect is possible will change future behaviour. I too am interested.

Great link, very interesting. Thanks for sharing!