Writing source code is not always an easy task. Sometimes, a bug occurs that it is so hard to find, you spend hours and hours searching through the Internet on websites like Stack Overflow [1] to try and find someone that had that issue before and how they fixed it. Some other times you have to rewrite the same code over and over again, which can be boring.
GitHub Copilot [2] is a Generative AI tool that helps developers with writing code, increases productivity and decreases development times, while also automating the “boring” parts of writing code. The tool offers two main features:
- Code completions: The tool auto-generates code on-the-go while you are typing, which you can add at any step. You can also write comments and the tool will treat it as a prompt to generate code.
Using a comment to instruct GitHub Copilot what to generate, using code completions.
The red-colored code is the AI suggestion. If suggestion is accepted, it is turned into normal-colored code.
- Chat Discussion: The tool also offers a way to interact with the model via chat, similar to the ChatGPT-like tools.
Using GitHub Copilot Chat to debug code and fix errors. It can also be used to generate documentation, tests, explain selected code or optimize algorithms.
I have been working as a Software Developer for the past 2 years. Ever since I started, I have been using GitHub Copilot to help me automate (part of) the software development process, especially with writing tests, documentation and to debug errors. Tasks that used to take up to a day to complete were resolved in a matter of one or two hours. Compared to the projects I was involved before such tools emerged, I can definitely say they were a game-changer. Tasks were being completed faster, the code written had better quality and I had time to focus on more important tasks, like improving the customer UI experience.
From my experience, Copilot is very good at suggesting repeating (or similar) code from within the project, as well as general code structures identifiable from other projects. It also has very good understanding of error codes in most programming languages I have used, so it is very powerful to use for fixing errors. This type of debugging usually took a long time, browsing through Stack Overflow posts and trying different suggestions until finding what could be a possible solution. The GitHub Copilot Chat was able to provide a working solution within minutes in most of the cases and with good explanations too of what was going wrong.
Even though it sounds like this is the perfect tool for coding, there are some limitations I found. Sometimes, I noticed it is slow in providing an answer. Theoretically, you can switch between different suggestions, but so far I noticed that feature is broken, as I always get “no alternative suggestions”. Moreover, many times, when you are writing a new feature from scratch, it is not good at giving initial suggestions. I expect this is a “cold start” effect, so until you give it some more input, it will not give suitable suggestions.
The biggest issue I have encountered so far is related to privacy. GitHub (Microsoft) collects data from your (private) repositories with code when you use this tool. Thus, some companies may be reluctant to let their developers use such tools, as sensitive data can leak. There is history on this topic, as Microsoft has been accused of copyright infringement multiple times when developing Copilot, as they used copyright-protected code to train their models [3].
All in all, I am really happy with how this tool incorporates with my work and I use it daily. Up until now I have had free access to this tool (as a student), but even if I would have to, I would 100% pay to use this plugin. I am confident that in the future, the quality of this service will increase continuously and I am looking forward to seeing what other alternatives emerge on this market! Having an AI pair programmer really makes a difference!
Have you used any similar Gen AI tools with your work? How did you find it? Let me know below!
References:
Thumbnail photo: Generated with DALL-E, made by OpenAI. Prompt: Generate an image about a programmer that uses a Generative AI tool such as Microsoft GitHub Copilot as a pair programming tool to enhance their software development cycle.
- Stack Overflow – where developers learn, share, & build careers. (n.d.). Stack Overflow. https://stackoverflow.com/
- GitHub Copilot · Your AI pair programmer. (2024). GitHub. https://github.com/features/copilot
- Vincent, J. (2022, November 8). The lawsuit against Microsoft, GitHub and OpenAI that could change the rules of AI copyright. The Verge. https://www.theverge.com/2022/11/8/23446821/microsoft-openai-github-copilot-class-action-lawsuit-ai-copyright-violation-training-data
Hi Codrin,
Reading your article felt like a déjà-vu! Generative AI tools are quite legends in writing code. While I wasn’t working in Software Development, but rather Data Science, I probably encountered less “new” problems than you. Still, again and again facing an error in the same lines of code is terrible. Hence, I couldn’t be more thankful for the tools the development of technologies brought up. However, I want to add upon your limitations. With mentioning the “cold start”-problem, you definitely have an important point. Nevertheless, in my opinion the problem of inaccuracy is a lot bigger, than just a cold start. As GenAI models (also those for coding) are still just built upon NLP, inaccuracy (especially in mathematical as well as coding related exercises) will prevail. In my opinion, a huge step in the way how the model is built has to be made, in order to clear this problem. What do you think?
This was a really insightful post! Even though I don’t have experience with coding, I found it fascinating how you explained both the pros and cons of GitHub Copilot. It’s interesting to learn how tools like this are changing the coding process, especially by saving time on tasks like rewriting similar code and fixing errors.
The idea that Copilot can help speed up productivity by automating those repetitive parts of coding is eye-opening. I can imagine how helpful it must be for developers to focus more on the creative and complex parts of their work, instead of having to deal with the same issues over and over again.
The privacy concerns you mentioned are also something I hadn’t thought about before. It’s a bit worrying to think that data from private code might be collected by Microsoft. I wonder how companies will handle this going forward, especially if they’re dealing with sensitive information. It seems like something that might need stricter controls in the future.
Overall, it sounds like Copilot has really changed the way you work, and I think your experiences show just how powerful AI could be for coding in the future. Thanks for sharing your thoughts – it’s given me a lot to think about!
Hi, Codrin! I really enjoyed reading your article. I have recently heard of GitHub Copilot, and honestly, I wish I heard about it sooner! As a former computer science student, it would have been so nice to have a tool that could assist me in my coding assignments. The worst part when you code is debugging and this tool is so good for that, as it saves you so much time, especially when you have many code lines.
I really appreciate that you also mentioned its limitations, as data privacy is quite an important concern. However, even though it is not perfect, I believe that for personal projects, when you don’t really use sensitive data, can be very insightful. I feel like it can be useful in many situations and also help people save a lot of time when coding.