Value Before Volume : Code That Matters
Tags: programming, ai, githubcopilot, development
Published: 2024-04-22 07:06:18

## Intro:

In the world of creating software, new tools that use AI to help programmers have started a big change. These tools make it easier and faster for people to get their work done. Among these, GitHub’s Copilot stands out, promising a significant boost in coding speed. Recent findings suggest that developers can write code 55% faster with the aid of Copilot [**1**](https://github.blog/2023-06-27-the-economic-impact-of-the-ai-powered-developer-lifecycle-and-lessons-from-github-copilot/). But beyond sheer output, there lies a crucial question: does the quality and maintainability of this AI-generated code measure up to the meticulous standards of human-crafted code? This blog delves into the heart of this inquiry, unpacking the key findings of a research by _**GitClear**_ .

## Primary Insights:

- _**Embracing the trend**_:  Junior Developers 20% More Likely to Use Copilot Over Experienced Peers

GitHub's own data suggests that Junior Developers use Copilot around 20% more than experienced developers. Writing a lot of code can make it simpler for new programmers to quickly and easily pick up the rules of a new programming language. It’s true that writing more also means facing various situations and problems, which can improve their ability to solve problems and think critically. Good code isn’t just about making code that works; it’s also about making code that is easy to read, keep up, use again, and grow. These parts of coding need more understanding and decision-making. But, they are important and shouldn’t be ignored.

- **_Reversal Reality_**: Over 7% of Changes Reversed Within Fortnight, Doubling Since 2021

Code churns are changes that were either incomplete or erroneous when the author initially wrote, committed, and pushed them to the company’s git repo. The time frame under study is 2 weeks ( size of a spirint). usually within two weeks. This often happens because the original code was not finished properly or had mistakes. This would influence the DORA Change failure Rate. Which means the greater the risk of mistakes being deployed to production. 

- **_Code base Longevity_**: One-Keystroke Temptation 

When you change parts of an already existing system of code, it’s common to see code being moved around. This process supports the use of code again. The advantage of reusing code is that it’s code that has been tested and is known to work well when actually used. Developers tend to enjoy adding new features more than figuring out if existing code can be used again. Because of this, code that’s just copied and pasted is often used for longer than it should be. Using AI Assistants makes it more tempting to quickly create new code with just one keystroke rather than taking the time to review and reuse existing code.

- **_Graceful Code_**: Study Finds 10% More Changes Within Two Weeks

“Code Provenance” checks how long code lasts before it’s changed or removed. Recently, there’s been a 10% increase in code being changed within two weeks of being written. On the other hand, code that’s been around for more than a month is being changed 24% less often this year compared to last year.




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nkmr6w50xuomoui535yc.png)


## Closing Remarks:

Crafting quality code goes beyond functionality; it’s about enhancing its maintainability. To achieve this with AI companions, proper training, comprehensive usage manuals, and a feedback loop involving human oversight are essential. This ensures that AI-assisted code remains both maintainable and sustainable.



## Further Read:

1) [Gitclear Research](https://www.gitclear.com/coding_on_copilot_data_shows_ais_downward_pressure_on_code_quality)

2) [Sea Change in Software Development: Economic and Productivity Analysis of the AI-Powered Developer Lifecycle
](https://arxiv.org/abs/2306.15033)

3) [Beyond Answers: The Power of Effective Questioning
](https://dev.to/balagmadhu/beyond-answers-the-power-of-effective-questioning-3i54) 


4) [DORA Metrics](https://cloud.google.com/blog/products/devops-sre/using-the-four-keys-to-measure-your-devops-performance)

5) [Tech Debt](https://dev.to/balagmadhu/software-credit-crunch-technical-debt-2a9g)