Getting Your Developers Started with GitHub Copilot

By Tom Printy, Advanced Design & Development Engineer, Zebra Technologies.

  • Sunday, 25th February 2024 Posted 9 months ago in by Phil Alsop

In a recent interview, Microsoft CEO Satya Nadella revealed that GitHub Copilot for business has more than one million paid users in over 37,000 organisations. It’s a great achievement for a new generative AI tool that was only launched in February 2023, powered by OpenAI’s Codex large language model.

 

GitHub Copilot, an AI-powered pair programmer, has emerged as an invaluable asset within the realm of software development. In the dynamic landscape of technology, staying competitive demands rapid development cycles. Copilot steps in as a supportive companion, significantly reducing coding time by providing instant, contextually relevant suggestions, keeping developers “in the flow.”

 

Automating repetitive or boilerplate tasks is another critical aspect where Copilot shines, freeing developers from mundane, repetitive work. This enables them to focus on more creative and challenging problem-solving, in the same way that various automation technologies and AI analytics are taking on repetitive tasks at the edge of business so front-line workers don’t have to do them.

 

The GitHub platform, launched in 2007, is now used by over 100 million developers to collaborate, track changes, and store their code. “Sooner than later, 80% of the code is going to be written by Copilot,” said GitHub CEO Thomas Dohmke in an interview. “And that doesn’t mean, as we discussed, that the developer is going to be replaced. That means that the developer has more time to focus on the 20% that they’re writing.”

 

Dohmke also shared the findings of a study, where two groups of developers were asked to build a web server. Fifty developers had access to Copilot, and 50 developers didn’t. The group with Copilot was 55% faster. Not only were they faster, but they also had a success rate of 78% versus 70% for those without Copilot.

 

Additionally, Copilot can contribute to mitigating technical debt by offering optimal and standardised code suggestions, helping teams maintain code quality and consistency. Ultimately, Copilot serves as a bridge between the increasing demands within businesses for efficient software development and the challenges developers face, serving as an indispensable tool in the developer's arsenal.

 

What are Copilot’s Strengths?

 

GitHub Copilot, like any type of AI including generative AI, isn’t a silver bullet and shouldn’t be seen or used in a silo.  However, it does have its strengths and showcases its prowess in various facets of software development in the following areas:

 

Producing boilerplate or repetitive code - Copilot excels in swiftly generating boilerplate code, freeing developers from the monotony of writing repetitive sections and enabling them to focus on more intricate and critical aspects of the codebase. Copilot can even help jumpstart new projects by providing the scaffolding and boilerplate files needed in the most common programming frameworks.

Generating documentation - GitHub Copilot excels in aiding the creation of documentation by offering concise and pertinent descriptions. It supports developers by providing descriptions of code files, explaining their functionality. This capability proves advantageous for newcomers to the codebase and serves as a useful refresher for developers, offering insights into the code's operations and functionality.

Generating comments and converting comments to code - Copilot demonstrates proficiency not only in generating comments that assist in documenting the code but also in converting comments into functional code, streamlining the development process, and enhancing code readability.

Code optimisation - Its AI capabilities extend to suggesting optimized code snippets, enhancing the efficiency and performance of the codebase while adhering to best practices and standards. This helps increase overall code quality of the codebase.

Test case generation - Copilot significantly aids in generating test cases, supporting developers in ensuring robustness and reliability in their code through the creation of comprehensive test cases and test suites.

Creating SQL queries - Copilot demonstrates proficiency in generating SQL queries, providing valuable assistance in database-related tasks, accelerating development cycles in database management systems.

Translation of code from one language to another - Its multilingual coding capabilities shine through by facilitating the translation of code snippets from one programming language to another, aiding developers in multilingual environments or during migration processes.

GitHub Copilot's diverse functionalities and adeptness in these specific areas make it a valuable asset for developers, significantly streamlining development workflows and enhancing productivity across various facets of software engineering.

 

Top Advice For Implementing Copilot In Your Developer Team

 

Start out using Copilot on small projects, and start now. Start with smaller projects to familiarise yourself with its capabilities. While starting small, begin utilising Copilot immediately to experience its benefits and gradually expand its implementation across larger projects.

 

When you start, member that commenting in code is completely different with Copilot. Copilot's functionality relies on context. Given its ability to interpret code comments, providing comprehensive and detailed comments can yield better and more relevant code suggestions. Emphasise contextual information within comments to guide Copilot toward accurate and useful suggestions.

 

Another tip is to open all relevant code in tabs. To optimise Copilot's performance, open all relevant code files in separate tabs. This approach provides Copilot with a broader context, enabling it to generate more accurate and fitting code suggestions based on the entire project's scope.

 

And, learn to embrace autocomplete and suggestions. Familiarise yourself with Copilot's autocomplete feature understand that sometimes the code snippet suggested may not be accurate but could help guide the user to the correct solution. Copilot generates numerous code suggestions, learning how to work with code suggestions will help gain workflow efficiencies.

 

In light of the above, it’s worth saying that one must still be a good engineer. Despite Copilot's capabilities, it's crucial to remember that Copilot is a tool—the quality of output is still reliant on the skills and decisions of the developer. Ensure that you maintain a solid understanding of engineering principles, as the adage goes: “garbage in, garbage out.” Validate Copilot's suggestions against best practices and engineering standards.

 

Expect more AI in 2024

 

At the GitHub Universe 2023 conference, most of the announcements were around Copilot and the use of generative AI. GitHub will be implementing Copilot in everything from GitHub advance security (GHAS) to pull request comment generation. If your team uses GitHub in any way, GitHub Copilot will start to become a more prominent feature in the

GitHub ecosystem. Teams should be staying informed about these developments by following the GitHub Next website and explore opportunities to try out advanced GitHub features before they are released for general availability.

 

There are a growing number of use cases where generative AI tools can make important contributions to efficiency and productivity across the front and back office, inside and outside the four walls. Other recent examples include

Microsoft introducing Copilot to Microsoft 365 for knowledge workers, and the AI research team at Zebra Technologies demonstrating that a generative AI large language model could run on mobile computers and tablets on-device. This opens the door to potential use cases for front-line workers in a range of industries and gives businesses cloud cost savings and enhanced data security. 

 

The rapid pace of AI research and use cases, including generative AI adoption, dictates that businesses should start to implement tools like Copilot in their businesses, now. Start small and increase adoption as experience grows.