Easier and Faster Coding: How GitHub Copilot Brings Actual Benefits in Real Projects

Easier and Faster Coding: How GitHub Copilot Brings Actual Benefits in Real Projects

The article explains how GitHub Copilot accelerates coding by providing AI-driven code suggestions, improving efficiency, and enhancing project outcomes.
publish-icon Aug 14, 2024 time-icon 11 min read

You’ve likely come across articles explaining how GitHub Copilot can help software developers code faster. But are the impressive results GitHub parades on Copilot’s website—a 55% boost in coding speed—true? 

That’s what we set out to test with InventorSoft’s development team. And the verdict is in. Spoiler alert: GitHub Copilot does make software engineers more productive and lowers the overall project development cost. But there’s a catch (or two).


GitHub Copilot explained

GitHub Copilot is an AI-powered code completion tool designed to help software developers code more efficiently. It integrates with popular code editors like Visual Studio Code, Visual Studio, Neovim, or JetBrains and suggests whole lines or blocks of code as you type based on the context of your project. So it understands your code base, project structure, and connections between its parts. It can even generate entire functions or assist with comments and documentation.

GitHub Copilot was created by—you guessed it right!—GitHub in collaboration with OpenAI. The project uses OpenAI’s Codex, a specialized AI model derived from GPT-3, trained on code from public repositories.

Since it’s a GitHub project, every Copilot user needs a GitHub account. Setting up Copilot is easy: just install the Copilot Chat extension in your code editor and log into your GitHub Copilot account. Last but not least, the pricing is pretty affordable.

Tasks where we used GitHub Copilot 


InventorSoft’s teams were excited to use Copilot in their AI development and other projects. Here’s how they mostly used it. 

Writing functions, schemes, variables, etc.

These were routine tasks: writing functions, schemes, and variables, and analyzing and manipulating data arrays. Copilot did a good job here since it recognizes code patterns and understands the context based on the names of variables and previous code. Using it, we reduced the time spent on writing repetitive logic and avoided mistakes in variable usage and data manipulation. There’s just one condition: you need to make sure the function names are set correctly.

Efficient formatting and processing of small data objects

Our developers found GitHub Copilot incredibly helpful in formatting and processing small data objects. For instance, when they needed to convert data formats, filter datasets, or aggregate results, Copilot quickly suggested the most efficient ways. This reduced the risk of formatting-related bugs and saved a lot of time.

Faster bug optimization

Speaking of saving time, GitHub Copilot also helped the devs identify and suggest fixes for common bugs by analyzing the context of the code. It offered code optimizations or alternative approaches that could perform better or be less error-prone.


InventorSoft’s engineers used GitHub Copilot like an extra set of eyes to catch edge cases or scenarios they might have missed. When it came to debugging, Copilot suggested useful code snippets for logging, error handling, and other debugging techniques, making it much quicker and easier to track down and fix issues.

Description of functions and comments

Copilot can automatically generate descriptive comments and documentation for functions, explaining their purpose, parameters, and expected output based on the function’s code.

Every developer knows that well-commented code is easier to understand, maintain, and extend. Copilot helped InventorSoft’s engineers ensure that their functions were properly documented, which is especially valuable in distributed teams where multiple developers work on the same codebase. Plus, it helped maintain a consistent style and format in comments, making the codebase more organized and easier to manage.

Automatic import of dependencies

Our developers also found the automatic import of dependencies feature to be a huge time-saver. When Copilot suggested code that relied on certain libraries, it also automatically suggested the necessary imports at the top of the file. This streamlined the coding process, eliminating the need to manually search for and import dependencies.

Copilot's ability to handle these imports ensures that the code remains clean and that all dependencies are properly accounted for. This was especially helpful in our larger projects where managing dependencies was hard.

Swift writing of exports

Exporting functions, classes, or objects is a typical task in projects involving modular code. Copilot can quickly suggest export statements, ensuring the correct syntax and objects are used.

Properly exporting code elements is also critical for modularity and reusability. Copilot speeded up this process, letting our developers focus on the logic rather than the mechanics of exporting. By standardizing how exports were handled, Copilot helped maintain a consistent code structure, making it easier to navigate and use across different project parts.

Writing recursive functions

Writing recursive functions can be tricky, especially when handling edge cases and performance concerns. GitHub Copilot has been a big help here. It suggests base cases, recursive calls, and termination conditions, ensuring that recursion is both correct and efficient.

If done wrong, recursive functions can easily lead to problems like infinite loops. Copilot helps avoid these pitfalls by offering well-structured recursive logic. This significantly reduces the chance of errors. Plus, Copilot suggests optimized versions of recursive algorithms, such as tail recursion, which boosts performance and prevents stack overflow issues.

Pros of GitHub Copilot: What We Liked


After using it in several projects, InventorSoft’s developers shared the benefits of GitHub Copilot they enjoyed most. 

Faster development

With simple word queries, Copilot generates code quickly, handling straightforward tasks with ease. Its real-time suggestions are context-aware, making it perfect for specific components or classes. What’s more, it automatically manages imports based on the file structure, keeping the code clean and error-free.

Code explanation

Our developers appreciate Copilot’s code explanation function. Instead of manually dissecting unfamiliar code, Copilot provides fast and clear explanations of what each part does. It’s a real game-changer whenever we switch to a new project or try to make sense of someone else’s code.

This feature also boosts collaboration, helping team members get up to speed faster with shared codebases. It often highlights best practices and patterns, which is just great.

Copilot Chat inside your IDE

Our engineers consider GitHub Copilot Chat incredibly useful. This chat interface within the IDE lets us ask coding-related questions directly and get instant answers without having to sift through documentation or scour online forums for help.

With access to your codebase, Copilot Chat can understand the context of your questions and provide relevant answers. Whether our teams need help with syntax, programming concepts, test cases, or debugging, the chat interface offers quick and accurate responses.

Documentation generation

Copilot can automatically create detailed documentation, saving you time and effort (as long as the names of your functions and variables are clear). This feature works especially well to maintain consistency and clarity across the codebase. It ensures that documentation is automatically updated as the code evolves, keeping everything aligned and accurate. With automatic documentation, new team members can get up to speed much faster.

Cons of GitHub Copilot: What we didn’t like


GitHub Copilot seems great—what’s not to like? Well, our developers did find some aspects that could be improved.

Not always understand the context 

One issue is that sometimes, Copilot doesn’t fully grasp the context of what the team is working on. If a task is new or involves complex objects, developers might need to provide extra clarifications or adjust prompts to get accurate results.

Occasionally, Copilot can provide incorrect or incomplete suggestions, especially when dealing with intricate code or specific edge cases. This means developers need to be vigilant and double-check Copilot’s suggestions to ensure they’re appropriate.

Can’t do anything on its own 

GitHub Copilot doesn’t operate autonomously. Developers must oversee every suggestion and decide whether to use it. This means that while Copilot can be a great helper, it doesn't replace the need for careful review and oversight.

Another concern is the risk of complacency. If developers rely too heavily on Copilot and simply copy-paste suggestions without proper review, there’s a significant risk of introducing errors or vulnerabilities in the code. This can have serious long-term consequences for both the project and the business. So, developers must remain accountable and thoroughly check and validate all code, whether suggested by Copilot or written manually.

How to get the most out of using GitHub Copilot: Hands-on tips from InventorSoft


Having worked with (and without) Copilot, our engineers came up with some tips for coding most efficiently with Copilot: 

Use accurate prompts

“The key is understanding that Copilot's effectiveness largely depends on the prompts we provide. The clearer and more specific our prompts are, the better the code suggestions will be. Copilot can better understand what we’re trying to accomplish and offer more precise suggestions if we name a function descriptively.

Overall, being clear and specific with our prompts ensures that Copilot acts as an effective and efficient coding partner, helping us write better code faster.”

Roman,

Senior Front-End Developer

Watch YouTube tutorials

“To get even more out of Copilot, I recommend checking out YouTube tutorials. There are plenty of resources that explain how to set prompts effectively and use hotkeys to streamline your workflow. Combining clear prompts with insights from tutorials can help you use GitHub Copilot to the fullest.”

Artem,

Senior Front-End Developer

Ask Copilot instead of googling

“Ask Copilot directly when you hesitate about something. Instead of spending time googling or searching through documentation, you can get quick answers or code suggestions right within your IDE. This saves time and keeps you focused on coding without getting sidetracked."


Sometimes, Stack Overflow is the answer

“If you’re working with a lesser-known library (like we did on one AI SaaS project), Copilot might not be very helpful since it’s less likely to have information on smaller or niche libraries. It’s often faster to solve these issues by turning to the tried and tested resources like Stack Overflow, where you can find community-driven solutions and discussions that might be more relevant to your specific problem.”

Vlad,

 Middle Front-End Developer

Finding the Balance: Integrating Copilot with Personal Coding

“If you’re working with a lesser-known library (like we did on one AI SaaS project), Copilot might not be very helpful since it’s less likely to have information on smaller or niche libraries. It’s often faster to solve these issues by turning to the tried and tested resources like Stack Overflow, where you can find community-driven solutions and discussions that might be more relevant to your specific problem.”

Ihor,

Senior Back-End developer

Summary

At InventorSoft, our software engineers have been making good use of GitHub Copilot. It greatly speeds up the development process, even though it doesn’t write code all on its own. For simpler tasks like writing basic functions or analyzing data arrays, Copilot is a huge help. However, for more complex assignments, we still need to double-check the code it generates.

Copilot is excellent for boosting productivity and cutting costs. It helps us find answers faster than searching online. This tool works particularly well for new projects, though it can be a bit tricky with large, legacy codebases.

So, while developers still put in the same number of hours, our clients benefit from faster development and lower costs over time. That is something worth considering if you plan on developing software with InventorSoft.


Table of contents
  • GitHub Copilot explained
  • Tasks where we used GitHub Copilot
  • Faster bug optimization
  • Description of functions and comments
  • Pros of GitHub Copilot: What We Liked
  • Cons of GitHub Copilot: What we didn’t like
  • Can’t do anything on its own
  • How to get the most out of using GitHub Copilot: Hands-on tips from InventorSoft
  • Summary

We use cookies in this website to give you the best experience on our site and show you relevant ads. To find out more, read our privacy policy rules.