GitHub Copilot: Improve Development Speed

Programmers working on computer in IT office typing data coding in software

GitHub Copilot: Improve Development Speed

In this article, we will explore how GitHub Copilot, a powerful artificial intelligence tool, is transforming application development. Application development has always had an artistic or creative aspect, especially in complex functionalities. However, it also includes repetitive sections and basic features that require less effort but need to be completed like the rest of the project. Thanks to the emergence of more powerful artificial intelligences capable of conducting deeper analysis, GitHub Copilot allows combining development with AI to improve times and streamline work.

What is GitHub Copilot?

GitHub is one of the world’s most important portals for sharing open-source code and was acquired by Microsoft in 2018. As part of its push towards new artificial intelligence solutions, Microsoft has developed GitHub Copilot.

GitHub Copilot is based on Codex, a new AI system created by OpenAI, the same organization behind GPT-3, the foundation of ChatGPT. However, in this case, Codex is exclusively trained on code for software development, relying on the code available on GitHub.

GitHub Copilot is an AI designed for programmers, which proposes code based on the current project and the text entered when starting development, such as comments or names of classes or functions. This service is a paid one, with a fee of €10/month for individual users and €19/month per user for businesses. However, it offers a free trial period of 2 months.

GitHub Copilot_Que es_Itequia

How does GitHub Copilot work?

Once subscribed, Copilot works through a plugin or extension that is added to the IDE used for development, with support for most of the current major IDEs. For example, in Visual Studio, you would need to add the GitHub Copilot extension.

GitHub Copilot_Como funciona_Itequia

Once the extension is added, you need to log in with a GitHub account that has an active Copilot subscription. After logging in, Copilot analyzes the code of the current project and then the plugin can generate completely new proposed code, without copying from other sources. Depending on the case, it can suggest several additional alternatives to choose from.

The programmer must review this proposed code to verify if it fits what they actually want to achieve. Then, they can accept or reject the code. In case of rejection, Copilot can offer new solutions. As the project progresses, Copilot learns and improves the delivered proposals.

GitHub Copilot_Como funciona 2_Itequia

Extensions usually allow enabling or disabling Copilot. If it’s disabled, it will ask whether you want to disable suggestions globally or only for the language of the file currently being edited.

GitHub Copilot_Como funciona 3_Itequia

Which languages can I use Copilot with?

Although Copilot has been trained in many types of languages, it works particularly well for Python, JavaScript, TypeScript, Ruby, Go, C#, and C++. Given the nature of AI, as it makes more predictions and code is accepted or rejected, Copilot learns more concepts and can provide more accurate solutions.

GitHub Copilot_Con que lenguages puedo usar_Itequia

Currently, Copilot also includes specific modules to detect patterns of insecure code and prevent the introduction of vulnerabilities.

Copilot is a relatively new technology. Although progress is fast, it still needs to learn more. To propose better code each time and make its suggestions more accurate. In simple tasks such as creating new classes and controllers, it is very effective. It can speed up development. However, in more complex tasks or bug fixing, it may still not come up with correct solutions.

In any case, developers who have tried it agree that it allows them to focus on more motivating and complex work. It also helps them be more productive and save time on repetitive and easy tasks.

Copilot Pilot Test at ITEQUIA

At ITEQUIA, we conducted a pilot test of Copilot with a small group of 6 developers. This team is composed of individuals working on different projects with various tasks and programming languages. While the majority use .NET, React, or Angular.

During the trial, we recorded the tasks performed by the group, along with the initial time estimation they should have taken and the actual time it took to complete them. The results show a significant percentage of time savings:

MonthSavings PercentageTime Gained
March5%48 hours
April2%19,2 hours
May 3,5%33,6 hours
June 8,7%83,52 hours

To understand what this percentage represents: Starting with the fact that we have approximately 160 hours to plan for each developer in a month. The percentage of time savings represents how many of these 160 hours we have been able to save by completing the planned tasks using Copilot.

Behaviors based on the type of development

In general, we have observed two types of behaviors based on the type of development:

  • Completely new projects or functionalities: In these cases, Copilot manages to generate a significant amount of code that facilitates the work. The overall structure of the new functionality is generated automatically and effortlessly. The developer only needs to refine it and focus on the more specific business cases of the client. Copilot also allows for easy and quick generation of documentation, saving a lot of time.
  • Existing projects or functionalities that require corrections or changes: In these cases, Copilot is more limited. It assists in the development, but in a similar way to the IntelliSense options of VisualStudio. Time is saved, but it is more challenging to quantify the total. Sometimes, it proposes options that are not correct and do not solve the problem.

Within the test group, there were mainly corrections done in April, and in June, there have been more new developments. We have also detected that not all developers have been able to make use of Copilot. This depends on the project they are working on and the information provided to Copilot to generate code. The use of Copilot, like any other technological tool, is not always straightforward. It requires a period of adaptation and learning.

Example of tasks performed and results:

This is a small example of the tasks performed and their results:

LanguageEstimated HoursActual HoursCommentsTask Type
C# 12 Hours5 HoursMethod for SOAP service response processing. XML Serialization / Deserialization.Development
C# 2 Hours2 HoursNot helpful because the dedication time is more for investigating the error than solving it.Defect
YAML24 Hours12 HoursAlthough it needs some initial learning time, once Copilot has enough examples to work with, documentation creation becomes a process where you only need to provide specific inputs for it to do most of the heavy lifting, such as generating structures and conditions…Documentation
C# 24 Hours4 HoursUsing previously generated documentation in Swagger, we quickly created data models and related entities by providing associated components as input. We noticed that GitHub Copilot in Visual Studio 2022 provides more accurate results than in Visual Studio Code and avoids infinite loops in documentation generation.Development
javascript3 Hours2,5 HoursIt helped us detect and correct an excessively long string for a Kendo grid.Defect
javascript16 Hours12 HoursIt assists in completing functions by filling in parameters and facilitates LINQ queries. Additionally, when adding all the functionality while creating a new endpoint, it suggests the same structure as in other cases.Development
React TypeScript 2 Hours2 HoursIt evolves over time and becomes more precise. However, for many tasks, there is no difference in implementation time between using Copilot and not using it.Development

Reflections on GitHub Copilot: A powerful tool with room to evolve

Copilot is a very powerful tool. It allows focusing on complex developments and helps with more generic and mundane development, resulting in better times. This tool is still in its early stages. It needs more time to learn, improve, and propose correct solutions in all cases.

Developers will need some time to adjust to make good use of it. At the moment, it doesn’t always yield positive results in every task. However, it’s clear that the advantages in new developments are significant. It can greatly streamline initial tasks and projects.

To use it for corrections and fixes, more time may be required. It is also important that it continues to evolve. However, the possibilities it offers are very promising, and we expect to save time through proper use.

Are you ready to take your development to the next level with GitHub Copilot? Contact us today to discover how this powerful AI can benefit your team and projects! Don’t miss the opportunity to try GitHub Copilot and experience the difference in your workflow. We are here to help you make the most of this innovative tool!

Daniel Morales Fitó – Cloud Engineer at Itequia