Coding More Efficiently: My Experience Using GitHub Copilot

March 10, 2023
Sarah Maclean
5
min read

Coding More Efficiently: My Experience Using GitHub Copilot

Sarah Maclean

March 10, 2023

With all the hype and excitement around large AI-based language models like ChatGPT, I thought I'd highlight the tool that stands out for me in the world of coding: GitHub Copilot.

GitHub Copilot, which was co-created by GitHub and OpenAI (the team behind ChatGPT), is an AI coding assistant that plugs straight into your code editor. And in my experience as a Data Scientist at Kohort, it has significantly reduced the time and effort required to write the code which informs our cohort-based forecasting model.

Here’s why it has quickly become one of my favourite tools:


Boilerplate Code

I've spent a fair amount of time in the trenches to know the pain of typing out the same code over and over again. It can be prone to silly errors, like accidentally adding a cup of salt instead of sugar to your muffin mix - they look similar but it will definitely leave you wondering why they don't taste the way you expected them to.

I love that GitHub Copilot can generate boilerplate code so there is no need to spend time typing out repetitive code structures like function definitions, variable declarations, and import statements anymore.


Because of this functionality, I have been able to speed up my output and become more efficient in order to focus on more complex data scenarios. Think of it like walking into the kitchen, and having all the correct ingredients already lined up in their perfect quantities. You can focus on using advanced techniques and elevating the recipe, instead of being bogged down by prep work.

Autocomplete-style Suggestions

The tool’s smart code completion is like having a trusty sous chef in the kitchen who always knows exactly what ingredient you need next, without having to ask and who doesn't accidentally add salt instead of sugar.

Instead of typing out every line of code myself, I can use GitHub Copilot's suggestions to quickly fill in common code structures or complete potential code based on what I'm typing, the surrounding code and the comments already added.

In this example, I typed out a comment describing the method I wanted to create and GitHub Copilot was able to give me a suggestion that was exactly inline with what I was looking for.

This is an example, where GitHub Copilot was able to suggest a string for me based on the variable name that I had set.

Fixes Errors

GitHub Copilot also has the ability to identify errors in my code and suggest ways to fix them. This has saved me countless hours of manual debugging and helped me catch potential bugs before they make it into Kohort’s production code.  

This also accelerates productivity and can be compared to your sous chef turning the oven temperature up to 180° Celsius from 80° Celsius, preventing you from sitting in front of the oven for hours wondering why your muffins are not turning brown.

Expands Coding Knowledge

When baking muffins, I've realised that putting in double the amount of choc chips specified in the recipe always makes them taste better. Similarly, GitHub Copilot has lots of extra, sweet surprises and has been great for helping me learn new coding techniques and best practices.

Whether you’re a beginner coder or a seasoned developer, I think there’s a lot the plugin can teach you. Using machine learning algorithms that provide explanations and suggestions for code snippets, it has allowed me to expand my coding knowledge and stay up to date with the latest trends and best practices which are essential to my role at Kohort.

I am in the mood for some muffins all of a sudden, but connect with me on LinkedIn and let me know if you give GitHub Copilot a try.

With all the hype and excitement around large AI-based language models like ChatGPT, I thought I'd highlight the tool that stands out for me in the world of coding: GitHub Copilot.

GitHub Copilot, which was co-created by GitHub and OpenAI (the team behind ChatGPT), is an AI coding assistant that plugs straight into your code editor. And in my experience as a Data Scientist at Kohort, it has significantly reduced the time and effort required to write the code which informs our cohort-based forecasting model.

Here’s why it has quickly become one of my favourite tools:


Boilerplate Code

I've spent a fair amount of time in the trenches to know the pain of typing out the same code over and over again. It can be prone to silly errors, like accidentally adding a cup of salt instead of sugar to your muffin mix - they look similar but it will definitely leave you wondering why they don't taste the way you expected them to.

I love that GitHub Copilot can generate boilerplate code so there is no need to spend time typing out repetitive code structures like function definitions, variable declarations, and import statements anymore.


Because of this functionality, I have been able to speed up my output and become more efficient in order to focus on more complex data scenarios. Think of it like walking into the kitchen, and having all the correct ingredients already lined up in their perfect quantities. You can focus on using advanced techniques and elevating the recipe, instead of being bogged down by prep work.

Autocomplete-style Suggestions

The tool’s smart code completion is like having a trusty sous chef in the kitchen who always knows exactly what ingredient you need next, without having to ask and who doesn't accidentally add salt instead of sugar.

Instead of typing out every line of code myself, I can use GitHub Copilot's suggestions to quickly fill in common code structures or complete potential code based on what I'm typing, the surrounding code and the comments already added.

In this example, I typed out a comment describing the method I wanted to create and GitHub Copilot was able to give me a suggestion that was exactly inline with what I was looking for.

This is an example, where GitHub Copilot was able to suggest a string for me based on the variable name that I had set.

Fixes Errors

GitHub Copilot also has the ability to identify errors in my code and suggest ways to fix them. This has saved me countless hours of manual debugging and helped me catch potential bugs before they make it into Kohort’s production code.  

This also accelerates productivity and can be compared to your sous chef turning the oven temperature up to 180° Celsius from 80° Celsius, preventing you from sitting in front of the oven for hours wondering why your muffins are not turning brown.

Expands Coding Knowledge

When baking muffins, I've realised that putting in double the amount of choc chips specified in the recipe always makes them taste better. Similarly, GitHub Copilot has lots of extra, sweet surprises and has been great for helping me learn new coding techniques and best practices.

Whether you’re a beginner coder or a seasoned developer, I think there’s a lot the plugin can teach you. Using machine learning algorithms that provide explanations and suggestions for code snippets, it has allowed me to expand my coding knowledge and stay up to date with the latest trends and best practices which are essential to my role at Kohort.

I am in the mood for some muffins all of a sudden, but connect with me on LinkedIn and let me know if you give GitHub Copilot a try.

Related Articles