From Internet to AI: My experience with GitHub Copilot

A transformative journey in enhancing workflow and productivity

Renju
Data Science at Microsoft
7 min readJul 9, 2024

--

Photo by Patrick Tomasso on Unsplash.

As a software engineer with over a decade of experience, I’ve seen firsthand how technology evolves and transforms the way we work. While my primary expertise lies in application development, my current role has me working alongside data engineers. In this article, I want to share my recent experience with GitHub Copilot, a tool that has added significant value to my daily workflow. I believe this insight will be particularly valuable to the data science community, providing some ideas about ways to explore how GitHub Copilot can enhance projects and productivity.

The Internet: My guiding light

The Internet has always been my guiding light. Back in the early 2000s, when it was starting to become popular in India, I found myself completely captivated. This vast network of information became my playground, igniting a curiosity that would shape my career. With just a basic understanding of C programming, I set out to create my first website using Linux, PHP, MySQL, Apache, and many other technologies. The Internet was my mentor, providing answers and guidance at every step.

Launching that website was a significant milestone for me. It proved that with enough curiosity and the right resources, I could achieve my dreams. Without the Internet, my dream of becoming a developer might have stayed just that — a dream. This journey from curiosity to realization solidified my belief in the Internet’s power to transform lives and careers. Looking back, I can confidently say that the Internet was not just a tool, but a true guiding light in my life.

Jumping into the AI revolution

Fast forward to the recent AI revolution, and I felt excitement similar to what I experienced with the Internet when I started using ChatGPT. This generative AI tool wasn’t just a novelty; it was a game-changer that promised to redefine how I interacted with technology. During the last hackathon, I decided to use ChatGPT to develop a social media–like website. What would typically take two weeks to complete, I managed to finish in just three days. ChatGPT’s ability to assist with coding and problem-solving was remarkable, making it feel like I had a knowledgeable peer working alongside me.

Before ChatGPT, I relied heavily on search engines for any coding issues. I’d spend hours sifting through countless forum posts and articles. But ChatGPT changed everything. Instead of searching for answers, I received instant, context-specific solutions. The shift turned my developer experience into a more efficient and collaborative effort, making it feel like I was working with someone to finish my tasks.

GitHub Copilot: An answer to my needs

ChatGPT quickly became an integral part of both my personal and professional life. It answered questions, provided solutions, and even assisted in brainstorming sessions. I found its versatility unmatched. However, there were times when I needed to share sensitive code and confidential details, and that posed a problem. I couldn’t rely on ChatGPT for these tasks due to security concerns.

Then, just when I needed a solution to deal with more confidential data, I found that Microsoft already had GitHub Copilot in the market, ready to meet my particular needs. GitHub Copilot integrated seamlessly into my workflow and provided the features I was searching for.

My early days with GitHub Copilot

Recently, I worked on a project to migrate to User-Assigned Managed Identity (UMI). I found GitHub Copilot helpful here, making the process smoother and more efficient. Here are the steps I followed:

  • Step 1: Understanding the project with GitHub Copilot
  • Step 2: Finding solutions with GitHub Copilot
  • Step 3: Getting instant answers, but double-checking them
  • Step 4: Testing and troubleshooting made easier

I explore each of these in turn below.

Step 1: Understanding the project with GitHub Copilot

When I started this project, my first big challenge was understanding the existing code and implementation logic. I hadn’t worked on this project before, so everything was new to me. That’s where I found GitHub Copilot helpful. By using explain commands, I could ask it to break down specific classes and methods for me. This saved me hours of manual code review. I found that GitHub Copilot’s ability to simplify complex code made it so much easier for me to get a handle on the project and plan my next steps.

Chat prompt:

/explain <file_name or method_name or any free text>

Github Copilot prompts examples to help me understanding the code:

Github Copilot prompts examples for helping me understanding the code.

Step 2: Finding solutions with GitHub Copilot

Once I understood the code, my next step was to find a solution for the problem. Asking the right questions was crucial here. With GitHub Copilot, I could simply ask how to implement an AuthTokenProvider that supports User-Assigned Managed Identity (UMI). For my project, I found that GitHub Copilot provided precise, context-specific answers and code snippets, guiding my implementation. For instance, when I asked about UMI migration, GitHub Copilot gave me the code I was seeking, along with explanations that I found clear. This made the implementation process smooth and efficient for me, as if I had an expert developer by my side.

Here are some examples of a few prompts that helped me in arriving at solutions:

Some example prompts for solutions.

Step 3: Getting instant answers, but double-checking them

Although GitHub Copilot often provided immediate help, I made it a point to verify and seek clarifications. It’s important not to rely solely on GitHub Copilot’s suggestions without understanding the underlying concepts, because Copilot can make mistakes. By doing so, I worked toward seeing that my implementations were correct and optimized. This approach saved me from many potential pitfalls and enriched my knowledge and skills. In the pre-Copilot era, finding and understanding these solutions would have taken me significantly longer. Now, with GitHub Copilot’s help, I feel as though I have a knowledgeable peer to discuss and validate ideas with, making my development process more efficient and reliable.

The following are some examples of prompts that helped me clarify and confirm various details.

Getting some clarifications via chat:

Step 4: Testing and troubleshooting made easier

During testing, I encountered an issue with the API endpoint configuration. An exception popped up, indicating that the request was taking more time than expected. I found that GitHub Copilot’s “Ask Copilot” feature quickly identified the problem for me. By following its suggestions, I realized I was connecting to the incorrect API endpoint. This feature allowed me to correct the configuration and resolve the issue efficiently. Usually, when an exception comes up it’s necessary to copy the error message, search the Internet for possible causes, look through all the context data, and eventually arrive at the reason. I found that this process took me notably less time with the Ask Copilot feature.

Additionally, I had a wonderful experience using the Visual Studio Performance Profiler Tool alongside GitHub Copilot. The Profiler Tool helped me identify performance bottlenecks in the application, providing detailed insights into CPU and memory usage. With GitHub Copilot’s assistance, I could quickly understand and address these issues. The combination of these tools streamlined the debugging process, making it more efficient and effective. This synergy not only improved the performance of my application but also enhanced my overall development workflow.

Github Copilot assisting me while debugging and perf testing the solution:

Use “Ask Copilot” Option when we get exceptions.
This example show how Github Copilot provides the cause, fix, and additional helpful suggestion for exceptions.
GitHub Copilot with the VS Performance Profiler Tool enhances the performance testing experience.

Reflection: A new way forward

I have found that the advent of GitHub Copilot has marked a significant shift in how I develop software. It streamlines my tasks and accelerates my development process, making it an essential tool for my work. However, I recognize that it’s crucial to remain vigilant. GitHub Copilot can sometimes provide incorrect information, so I always double-check its suggestions and use my judgment. As a developer, it’s my responsibility to ensure the accuracy and reliability of my code, regardless of any tools or techniques I use. While GitHub Copilot is a powerful assistant, expertise and critical thinking are irreplaceable.

I hope you also find that integrating GitHub Copilot into your workflow early can enhance your productivity and code quality. I believe that embracing this tool is a step toward staying competitive in a rapidly evolving industry, and that a shift toward AI-assisted development is unfolding. I believe that GitHub Copilot can help position users at the forefront of this technological revolution, as we use it to continue to be innovative and efficient.

Renju is on LinkedIn.

--

--

Renju
Data Science at Microsoft

Hello! I'm Renju, Software Engineer @ Microsoft. I'm passionate about technology and always eager to explore new innovations.