5 Ways AI Pair Programmers Impact Developer Productivity
Tags: ai, productivity, githubcopilot, chatgpt
Published: 2023-08-21 00:34:47

<!-- wp:heading -->
<h2 class="wp-block-heading" id="harder-faster-better-stronger-programming-with-ai-pair-programmers">Harder, Faster, Better, Stronger: Programming with AI Pair Programmers</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Chat-GPT was launched to the public in November 2022. Less than two months later, Open AI's chatbot had crossed the 100 million subscriber milestone, making it (back then) the fastest-growing consumer application ever. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":1367,"width":388,"height":388,"sizeSlug":"medium","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-medium is-resized"><img src="https://five.co/wp-content/uploads/2023/08/Five.Co-92-of-Programmers-Are-Using-AI-Tools-300x300.png" alt="Five.Co - 92% of Programmers are using AI tools" class="wp-image-1367" width="388" height="388"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>AI's rapid rise to popularity is nowhere more obvious than in programming. In fact, AI has become so commonplace in programming that a stunning <a href="https://www.zdnet.com/article/github-developer-survey-finds-92-of-programmers-using-ai-tools/">92% of programmers say that they are using AI tools</a>, according to a GitHub developer survey from 2023. In programming, almost everyone uses AI. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Clearly, programmers see the benefits of working with an AI pair programmer in their day-to-day work. But it is worth asking just how much more productive programmers are when using an AI tool to assist in their development. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>What's the impact of AI on developer productivity? How does AI change the developer experience? </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Let's check out what researchers, analysts, and industry experts have found out about the productivity gains from using an AI pair programmer, and let's quantify the impact on developer productivity. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading" id="ai-pair-programming-and-developer-productivity-whats-the-impact">AI Pair Programming and Developer Productivity: What's the Impact?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>To quantify the impact of AI pair programmers on developer productivity, researchers have come up with a number of different experiments and studies. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In this article, we review the results of five studies measuring the impact of AI on developer productivity:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Which AI tool was assessed by the research?</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>What was the research question?</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>How were the results measured?</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>What was the overall conclusion?</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:rank-math/toc-block {"headings":[{"key":"0327edde-c0a9-4f33-8e78-ae7df4f573dc","content":"Harder, Faster, Better, Stronger: Programming with AI Pair Programmers","level":2,"link":"#harder-faster-better-stronger-programming-with-ai-pair-programmers","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"ea3d9d5b-e2eb-4ad1-ba80-c6e39f09f4a6","content":"AI Pair Programming and Developer Productivity: What's the Impact?","level":2,"link":"#ai-pair-programming-and-developer-productivity-whats-the-impact","disable":false,"isUpdated":false,"isGeneratedLink":true},{"key":"76fca9aa-ae8e-48bb-b533-35ade14583e7","content":"1. The Impact of AI on Developer Productivity: Evidence from GitHub Copilot","level":3,"link":"#1-the-impact-of-ai-on-developer-productivity-evidence-from-git-hub-copilot","disable":false,"isUpdated":false,"isGeneratedLink":true},{"key":"74af8c40-7723-483e-bd22-4924e1579223","content":"Which Tool Did the Researchers Assess? ","level":4,"link":"#which-tool-did-the-researchers-assess","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"7c48cfc1-ed0a-49c3-9897-9cd1d614f19d","content":"What Was the Research Question? ","level":4,"link":"#what-was-the-research-question","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"8c162ad8-1c23-4e14-9adb-a04261db6ee5","content":"How Was the Question Tested? ","level":4,"link":"#how-was-the-question-tested","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"680a45c4-7f0d-4407-b2df-052253da5d52","content":"Result","level":4,"link":"#result","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"44a4b042-be55-4b7e-b96d-55a9dc33bef3","content":"2. The Robots Are Coming: Exploring the Implications of OpenAI Codex on Introductory Programming","level":3,"link":"#2-the-robots-are-coming-exploring-the-implications-of-open-ai-codex-on-introductory-programming","disable":false,"isUpdated":false,"isGeneratedLink":true},{"key":"36c97464-fa47-4fb6-a863-8b07cab924cb","content":"Which Tool Did the Researchers Assess? ","level":4,"link":"#which-tool-did-the-researchers-assess-1","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"c45839d7-1ecf-4b54-90ff-5fbe34a481c5","content":"What Was the Research Question? ","level":4,"link":"#what-was-the-research-question-2","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"e7f7684b-6846-4d6d-bb05-f91efbbe1e45","content":"How Was the Question Tested? ","level":4,"link":"#how-was-the-question-tested-3","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"0206f111-f440-4a39-a827-6b38c3c62643","content":"Result","level":4,"link":"#result-4","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"088f9f2b-c618-46a2-a86c-1368d8b0894d","content":"3. Automatic Generation of Programming Exercises and Code Explanations Using Large Language Models","level":3,"link":"#3-automatic-generation-of-programming-exercises-and-code-explanations-using-large-language-models","disable":false,"isUpdated":false,"isGeneratedLink":true},{"key":"19a767e5-9c89-4fb3-b4b4-8d65924ecb9b","content":"Which Tool Did the Researchers Assess? ","level":4,"link":"#which-tool-did-the-researchers-assess-5","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"62918829-6364-4154-805b-37279a45d55e","content":"What Was the Research Question? ","level":4,"link":"#what-was-the-research-question-6","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"a0971470-6894-4f21-828f-21ec109fd0e5","content":"How Was the Question Tested? ","level":4,"link":"#how-was-the-question-tested-7","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"dd7aef8f-b989-40ac-a933-0ec9de00d16e","content":"Result","level":4,"link":"#result-8","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"e6d09bfc-07a0-455a-87ad-55fff9d6eb6f","content":"4. Evaluating the Code Quality of AI-Assisted Code Generation Tools: An Empirical Study on GitHub Copilot, Amazon CodeWhisperer, and ChatGPT","level":3,"link":"#4-evaluating-the-code-quality-of-ai-assisted-code-generation-tools-an-empirical-study-on-git-hub-copilot-amazon-code-whisperer-and-chat-gpt","disable":false,"isUpdated":false,"isGeneratedLink":true},{"key":"73730b99-3ee1-44ca-acd2-55fb507c3085","content":"Which Tool Did the Researchers Assess? ","level":4,"link":"#which-tool-did-the-researchers-assess-9","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"e1d654e1-fd61-46e0-bf99-04f2482089c8","content":"What Was the Research Question? ","level":4,"link":"#what-was-the-research-question-10","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"033b79dd-e420-4207-a1a4-a64b44c2599e","content":"How Was the Question Tested? ","level":4,"link":"#how-was-the-question-tested-11","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"7168e4e7-a7ef-496a-9354-10945b1878ba","content":"Result","level":4,"link":"#result-12","disable":true,"isUpdated":false,"isGeneratedLink":true},{"key":"02709c99-d963-44c7-8242-215204147f23","content":"5. Using AI for Code Documentation, Code Generation, Code Refactoring, and Other High-Complexity Tasks","level":3,"link":"#5-using-ai-for-code-documentation-code-generation-code-refactoring-and-other-high-complexity-tasks","disable":false,"isUpdated":false,"isGeneratedLink":true},{"key":"6cf4bf5c-7a9e-4e6d-9c52-cb63185f2cc4","content":"Conclusion","level":2,"link":"#conclusion","disable":false,"isUpdated":false,"isGeneratedLink":true}],"listStyle":"ul"} -->
<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><nav><ul><li class=""><a href="#ai-pair-programming-and-developer-productivity-whats-the-impact">AI Pair Programming and Developer Productivity: What's the Impact?</a><ul><li class=""><a href="#1-the-impact-of-ai-on-developer-productivity-evidence-from-git-hub-copilot">1. The Impact of AI on Developer Productivity: Evidence from GitHub Copilot</a><ul></ul></li><li class=""><a href="#2-the-robots-are-coming-exploring-the-implications-of-open-ai-codex-on-introductory-programming">2. The Robots Are Coming: Exploring the Implications of OpenAI Codex on Introductory Programming</a><ul></ul></li><li class=""><a href="#3-automatic-generation-of-programming-exercises-and-code-explanations-using-large-language-models">3. Automatic Generation of Programming Exercises and Code Explanations Using Large Language Models</a><ul></ul></li><li class=""><a href="#4-evaluating-the-code-quality-of-ai-assisted-code-generation-tools-an-empirical-study-on-git-hub-copilot-amazon-code-whisperer-and-chat-gpt">4. Evaluating the Code Quality of AI-Assisted Code Generation Tools: An Empirical Study on GitHub Copilot, Amazon CodeWhisperer, and ChatGPT</a><ul></ul></li><li class=""><a href="#5-using-ai-for-code-documentation-code-generation-code-refactoring-and-other-high-complexity-tasks">5. Using AI for Code Documentation, Code Generation, Code Refactoring, and Other High-Complexity Tasks</a></li></ul></li><li class=""><a href="#conclusion">Conclusion</a></li></ul></nav></div>
<!-- /wp:rank-math/toc-block -->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading" id="1-the-impact-of-ai-on-developer-productivity-evidence-from-git-hub-copilot">1. The Impact of AI on Developer Productivity: Evidence from GitHub Copilot</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Who can code faster: a programmer with or without an AI pair programmer?</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In this 2023 study, two groups of programmers were given the same task: implement an HTTP server in JavaScript as quickly as possible. One group used GitHub Copilot, an AI pair programmer, to complete the task. The other did not. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Who completed the task faster?</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="which-tool-did-the-researchers-assess">Which Tool Did the Researchers Assess? </h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>GitHub Copilot</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="what-was-the-research-question">What Was the Research Question? </h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Do programmers using GitHub Copilot complete a common development faster than programmers not using GitHub Copilot?</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="how-was-the-question-tested">How Was the Question Tested? </h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The researchers set up a controlled experiment to measure the productivity gains from using AI tools in professional software development: 95 developers were split into two groups and asked to implement an HTTP server in JavaScript as quickly as possible. The faster they completed the task, the higher the payment they would receive. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>45 developers had access to an AI pair programmer (GitHub Copilot), and 50 developers could complete the task in any way they wanted to, including, for example, searching for answers online or consulting StackOverflow.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="result">Result</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The group of developers with access to GitHub Copilot completed the task 55.8% faster than the group without access to Copilot. The result is statistically significant and suggests that AI tools have a strong impact on developer productivity. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>As the saying goes: it won't be AI replacing you. It will be the human knowing how to use AI.</p>
<!-- /wp:paragraph -->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><!-- wp:paragraph -->
<p><strong><em>"The group [of developers] that has access to GitHub Copilot was able to complete the task 55.8% faster than the control group [without access to GitHub Copilot]."</em></strong></p>
<!-- /wp:paragraph --><cite>Peng et al (2023). The Impact of AI on Developer Productivity: Evidence from GitHub Copilot</cite></blockquote>
<!-- /wp:quote -->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:image {"align":"center","id":1357,"width":568,"height":468,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-large is-resized"><img src="https://five.co/wp-content/uploads/2023/08/image-1-1024x843.png" alt="Measuring AI's Impact on Developer Productivity. Working with and without AI: who can complete coding tasks faster?" class="wp-image-1357" width="568" height="468"/><figcaption class="wp-element-caption"><em>How much faster are developers when using an AI pair programmer? In this controlled experiment, developers using GitHub Copilot (blue bars) completed a common development much faster than those without access to the tool (red bars).</em></figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>The paper was published by researchers from Microsoft Research, GitHub, and the MIT Sloan School of Management and is <a href="https://arxiv.org/pdf/2302.06590.pdf">available as a free download</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading" id="2-the-robots-are-coming-exploring-the-implications-of-open-ai-codex-on-introductory-programming">2. The Robots Are Coming: Exploring the Implications of OpenAI Codex on Introductory Programming</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Who can program better: AI or humans? </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This is the question a team of researchers asked in their paper titled "The Robots Are Coming: Exploring the Implications of OpenAI Codex on Introductory Programming". In it, the researchers compare Codex' performance against that of first-year programming students.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="which-tool-did-the-researchers-assess-1">Which Tool Did the Researchers Assess? </h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>OpenAI Codex (Private Beta)</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="what-was-the-research-question-2">What Was the Research Question? </h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>How well does Codex do on introductory programming exams when compared to students who<br>took these same exams under normal conditions?</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="how-was-the-question-tested-3">How Was the Question Tested? </h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The researchers presented Codex with 23 real-world programming exam questions, and compared Codex' performance against that of first-year students.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="result-4">Result</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The researchers concluded that Codex performs better than most students on code writing questions in typical first-year programming exams. </p>
<!-- /wp:paragraph -->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><!-- wp:paragraph -->
<p><strong><em>"Our results show that Codex performs better than most students on code writing questions in typical first-year programming exams."</em></strong></p>
<!-- /wp:paragraph --><cite><em>Finnie-Ansley et al (2022). The Robots Are Coming: Exploring the Implications of OpenAI Codex on Introductory Programming.</em></cite></blockquote>
<!-- /wp:quote -->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:paragraph -->
<p>Just how much better does Codex do compared to first-year programming students? Here are the results. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The red asterisk is Codex. Note that Codex did not score 100% on the tests, i.e. it is not almighty. But its score places it within the top quartile of participants.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":1355,"width":595,"height":569,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-full is-resized"><img src="https://five.co/wp-content/uploads/2023/08/image.png" alt="Measuring AI's Impact on Developer Productivity: How does Codex Compare to Computer Science Students?" class="wp-image-1355" width="595" height="569"/><figcaption class="wp-element-caption"><em>How does Codex compare to human programmers? Finnie-Ansley et al (2022). The Robots Are Coming: Exploring the Implications of OpenAI Codex on Introductory Programming.</em></figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>The paper was published in February 2022 by Finnie-Ansley et al. and it is <a href="https://dl.acm.org/doi/abs/10.1145/3511861.3511863">available as a download here</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading" id="3-automatic-generation-of-programming-exercises-and-code-explanations-using-large-language-models">3. Automatic Generation of Programming Exercises and Code Explanations Using Large Language Models</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Not everyone who touches code in their everyday life works as a programmer. There is also a large number of instructors and educators who teach other people how to code. Are LLMs useful for them? </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This is the question a 2022 paper published by Sarsa et al seeks to answer.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="which-tool-did-the-researchers-assess-5">Which Tool Did the Researchers Assess? </h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>OpenAI Codex (Private Beta)</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="what-was-the-research-question-6">What Was the Research Question? </h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>How useful are Large Language Models (LLMs) for educators? Can AI tools help with creating programming exercises, such as problem statements, sample code solutions, and automated tests? </p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="how-was-the-question-tested-7">How Was the Question Tested? </h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The researchers analyzed two questions:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>To what extent are programming exercises created by OpenAI Codex sensible, novel, and readily applicable?</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>How comprehensive and accurate are OpenAI Codex natural language explanations of code solutions to introductory programming exercises?</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Their paper thus tested two of OpenAI Codex' features: its ability to turn natural-language into programming exercises, and its ability to turn code into natural-language explanations. </p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="result-8">Result</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Codex did a great job in both categories: creating programming exercises, as well as explaining code.</p>
<!-- /wp:paragraph -->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><!-- wp:paragraph -->
<p> <strong><em>"There is significant value in massive generative machine learning models as a tool for instructors".</em></strong></p>
<!-- /wp:paragraph --><cite><em>Sarsa et al (2022). Automatic Generation of Programming Exercises and Code Explanations Using Large Language Models.</em></cite></blockquote>
<!-- /wp:quote -->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:paragraph -->
<p>The researchers found that out of 240 programming exercises created by Codex, "the majority [...] were sensible, novel, and included an appropriate sample solution". </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In addition, Codex explained 67.2% of lines of code given to it correctly. The mistakes that Codex made in its explanations contained "only minor mistakes that could easily be fixed by an instructor".</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Visit <a href="https://arxiv.org/abs/2206.11861">this website to download</a> a copy of this paper.</p>
<!-- /wp:paragraph -->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading" id="4-evaluating-the-code-quality-of-ai-assisted-code-generation-tools-an-empirical-study-on-git-hub-copilot-amazon-code-whisperer-and-chat-gpt">4. Evaluating the Code Quality of AI-Assisted Code Generation Tools: An Empirical Study on GitHub Copilot, Amazon CodeWhisperer, and ChatGPT</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Developers <a href="https://five.co/blog/the-3-best-ai-coding-assistants/" data-type="post" data-id="1296">are spoilt for choice when it comes to selecting AI pair programmers</a>. Microsoft, Amazon, OpenAI, as well as a large number of start-ups have already introduced code generators to the market. But which one works best? </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A 2023 paper published by Yetistiren et al compares three of the more popular AI tools, Copilot, CodeWhisperer, and ChatGPT. The tools are compared using five different code quality metrics: code validity, code correctness, code security, code reliability, and code maintainability. It is one of the most comprehensive analyses of each tool's code-generation capabilities. </p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="which-tool-did-the-researchers-assess-9">Which Tool Did the Researchers Assess? </h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>GitHub Copilot, AWS CodeWhisperer and ChatGPT</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="what-was-the-research-question-10">What Was the Research Question? </h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>What is the quality of code generated by code generation tools? This question was further broken down into sub-questions centered on code validity, code correctness, code security, code reliability, and code maintainability. </p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="how-was-the-question-tested-11">How Was the Question Tested? </h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The researchers presented each AI tool with a standardized set of 164 coding problems, called the <a href="https://github.com/openai/human-eval">HumanEval dataset</a>. The generated code was then tested for the 5 code quality metrics mentioned above.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The experimental setup is shown in this figure:</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":1358,"width":521,"height":379,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-full is-resized"><img src="https://five.co/wp-content/uploads/2023/08/image-2.png" alt="Measuring AI's Impact on Developer Productivity: Study Design For Comparing Copilot, CodeWhisperer and ChatGPT" class="wp-image-1358" width="521" height="379"/><figcaption class="wp-element-caption"><em>Experimental setup to compare GitHub Copilot, AWS CodeWhisperer, and ChatGPT on code correctness, code validity, code security, code maintainability, and code reliability</em>. </figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading" id="result-12">Result</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Copilot, CodeWhisperer, or ChatGPT: Which AI tool performed best? </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Surprisingly, ChatGPT "had the highest success rate among the evaluated code generation tools": "It was able to generate correct code solutions for 65.2% of the problems in the HumanEval problem dataset", compared to 46.3% and 31.1% for Copilot and CodeWhisperer respectively.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Why is this surprising? CodeWhisperer and Copilot are dedicated AI pair programmers that can be integrated into your favorite IDE. ChatGPT, on the other hand, is a multipurpose AI that cannot be embedded into an IDE. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For a free download of the paper, <a href="https://www.researchgate.net/publication/370213526_Evaluating_the_Code_Quality_of_AI-Assisted_Code_Generation_Tools_An_Empirical_Study_on_GitHub_Copilot_Amazon_CodeWhisperer_and_ChatGPT">visit the Research Gate website</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading" id="5-using-ai-for-code-documentation-code-generation-code-refactoring-and-other-high-complexity-tasks">5. Using AI for Code Documentation, Code Generation, Code Refactoring, and Other High-Complexity Tasks</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>An <a href="https://www.mckinsey.com/capabilities/mckinsey-digital/our-insights/unleashing-developer-productivity-with-generative-ai#/">analysis by McKinsey</a> focused on the time gains resulting from AI tools. The team from McKinsey measured the impact of AI on developer productivity in three common development tasks: code documentation, code generation, and code refactoring. The team further presented AI with more complex tasks to measure the impact on developer productivity in a non-trivial setting.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The study concluded that "software developers can complete coding tasks up to twice as fast with generative AI".</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":1359,"width":586,"height":429,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-full is-resized"><img src="https://five.co/wp-content/uploads/2023/08/image-3.png" alt="AI's Impact on Developer Productivity: Code Documentation, Code Generation, Code Refactoring" class="wp-image-1359" width="586" height="429"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>The time savings were most significant for code documentation, where the use of an AI pair programmer can reduce the time required to complete a task by up to 50%. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>However, for more complex tasks, these time savings "shrank to less than 10 percent". Also, the study found that junior developers sometimes even take more time to complete a task when using an AI pair programmer, indicating that AI tools are not right for everyone all the time.</p>
<!-- /wp:paragraph -->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:heading -->
<h2 class="wp-block-heading" id="conclusion">Conclusion</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>AI in programming is still a novel technology, yet it already shows tremendous potential. All studies reviewed here show that AI's ability to generate code is equal to, if not even better than the human ability to write code. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>AI pair programmers have a direct impact on developer productivity and developer experience in at least five ways:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Speed of development (faster), </li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Amount of hand-written code (less), </li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Quality of code documentation (better and faster), </li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Learning how to code (AI will work side-by-side with a human instructor), and </li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Job scope (evolving - human programmers will perform less manual, repetitive work).</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>But, of course, just like humans, AI is not flawless: AI cannot solve all coding challenges correctly, does not interpret code correctly 100% of the time, and does not generate code that is always free of errors. It also struggles to solve more complex coding challenges. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Nevertheless, there is little doubt that generative AI will transform software development. Eran Yahav, co-founder and CTO of Tabnine, a generative AI company, predicts that five years from now, <a href="https://softwareengineeringdaily.com/2022/01/21/tabnine-with-eran-yahav/">all code in the world will be touched by AI</a>: maybe not all code will be completely generated by AI, but reviewed, tested, or interpreted with the help of AI. </p>
<!-- /wp:paragraph -->