4 ms·
"GitClear analyzed approximately 153 million changed lines of code, authored between January 2020 and December 2023 [A1]. This is the largest known database of
by datadrivenangel 3y ago
"GitClear analyzed approximately 153 million changed lines of code, authored between January 2020 and December 2023 [A1]. This is the largest known database of highly structured code change data that has been used to evaluate code quality differences [A2]. We find disconcerting trends for maintainability. Code churn -- the percentage of lines that are reverted or updated less than two weeks after being authored -- is projected to double in 2024 compared to its 2021, pre-AI baseline. We further find that the percentage of "added code" and "copy/pasted code" is increasing in proportion to “updated,” “deleted,” and “moved” code. In this regard, code generated during 2023 more resembles an itinerant contributor, prone to violate the DRY-ness of the repos visited. "
If the cost of updating code has dropped due to AI, is code churn still a good proxy for low code quality?
- tigeroil 3y agoIndeed - if anything in my organisation AI has lead to developers replacing poor quality existing code more quickly because what was quite a time consuming process before can be sped up tremendously by using language models.
- dartos 3y agoReplacing poor code, with poor code that nobody really understands isn’t good either. Imagine hiring a junior to write your code, except they’d just stop existing when they were done. You’d need to ask a whole new junior to explain it to you later (if you were relying on AI) At the recent startup I was at, the CEO (who was also an engineer) basically relied on chatgpt to make the whole app. It was a complicated and fragile codebase. The docstrings, which were also AI generated, were frequently out of date if not just wrong. We were in the midst of rewriting it before we went bust.
- lucioperca 3y agoWell if you need it touch it again, you hope for an even better AI.
- dartos 3y agolol, I mean I guess that’s one way to do it.
- hedora 3y agoTheir metric doesn’t include old poor quality code that was recently replaced. It only looks for brand new code that was immediately reverted/rewritten, and also looks for code that was copied from the internet vs. from within the repo (the former is probably non-idiomatic for the code base in question).
- lostmsu 3y agoThis could also be an indication of young codebases or more frequent commits. Basically, the AI correlation is baseless.