When I first heard about GitHub Copilot, I was intrigued. An AI assistant that could help with basic coding tasks? That sounds like a game-changer. I’m happy to report that after using it for a while, I can say for certain that Copilot is more than just a tool - it's a true AI assistant.

The name is fitting because that's exactly what Copilot feels like. It's like having another brain that can fill in the gaps I miss and help me work faster. Think of it like scaffolding on a construction site - it enables you to focus on more complex tasks by providing you with the foundational tools to work efficiently. For instance, when I'm writing quick notes, I can just write them in any language I want and translate the text using AI. Overall, this functionality has really saved me a lot of time and effort.

Example Finnish text:

Käytitpä Atlassianin tuotteita itsenäisesti tai osana Eficode ROOT DevOps -alustaa, tämä tieto koskettaa sinua. Eficode voi Pohjoismaiden ainoana Atlassianin Platina-tason kumppanina auttaa sinua hyödyntämään sekä pilvi- että Data Center-ratkaisuja. Laaja osaamisemme pilvi- ja Data Center -migraatioissa auttaa sinua vähentämään kustannuksia ja maksimoimaan suorituskyvyn.

English by Github Copilot with 0 changes:

If you are using Atlassian products on your own or as part of Eficode ROOT DevOps platform, this information is for you. Eficode is the only Platinum Atlassian partner in the Nordics and can help you to leverage both Cloud and Data Center solutions. Our extensive experience in Cloud and Data Center migrations can help you to reduce costs and maximize performance.

Copilot works with you

Another great feature of GitHub Copilot is that it helps me write more efficient code. When we worked with customers to get a script running for integrating two different tools and their workings, I didn’t need to open the API documentation for the basics - I could just do the first draft by knowing how the basics work.

Here’s an example Python function for fetching GitHub actions with code comment and func definition:

# Fetch Github actions from a repository from organization
def fetch_github_actions(org, repo):
   url = f"https://api.github.com/repos/{org}/{repo}/actions/workflows"
   response = requests.get(url)
   return response.json()

Here’s a CURL command example in GitHub Docs:

curl -L \

  -H "Accept: application/vnd.github+json"   
  -H "Authorization: Bearer <YOUR-TOKEN>"\
  -H "X-GitHub-Api-Version: 2022-11-28" \

  https://api.github.com/repos/OWNER/REPO/actions/workflows

Finally, for those of you wondering if it works:

import requests

# Fetch Github actions from a repository from organization
def fetch_github_actions(org, repo):
   url = f"https://api.github.com/repos/{org}/{repo}/actions/workflows"
   response = requests.get(url)
   return response.json()

response = fetch_github_actions("eficode","RESTinstance")
print(response)

 

NOTE: The example above did require me to tune my comment about 5+ times to make it work. And I wouldn’t have been able to write this code with GitHub Actions without knowing what I wanted out of it. 

Reflecting back on Copilot

However, there are downsides to using AI assistants, such as the frustration that comes whenever the AI makes mistakes. When the API receives an update, the AI assistant can start getting things wrong, which leads to longer debugging times. That’s why it's essential to know the basics and the workings of the code to work effectively with Copilot.

One of the biggest benefits of using Copilot for me is that it has helped me refactor programs. If I write “bad” code, I can use Copilot to break it down into functions and testable components; making my job easier and more efficient.

However, it's important to note that Copilot is not a substitute for basic programming knowledge. If you’re new to IT and just copy the code from Copilot, you will likely have a hard time when it comes to the more complex aspects of programming.

In the future, we will likely see automatic tests becoming mandatory with AI tools, as the only way to verify the code works as intended is to have automatic tests verifying it. As programmers work more closely with customers and designers on writing requirements, having better requirements will make it easier to use AI to help program the application. 

While AI assistants like GitHub Copilot do require some basic programming knowledge to use effectively, they hold immense potential for revolutionizing the way coders work. As AI technology continues to advance, we can expect to see even more powerful tools emerge that will make coding faster, safer, and more efficient than ever before.

Read the following notes from the terms and conditions of Github:

Ownership of Suggestions and Your Code

GitHub does not claim any ownership rights in Suggestions. You retain ownership of Your Code.

Responsibility for Your Code

You retain all responsibility for Your Code, including Suggestions you include in  Your  Code  or  reference  to  develop  Your  Code.  It  is  entirely  your  decision  whether  to  use  Suggestions generated by GitHub Copilot. If you use Suggestions, GitHub strongly recommends that you have reasonable policies and practices in place designed to prevent the use of a Suggestion in a way that may violate the rights of others. This includes, but is not limited to, using all filtering features available in GitHub Copilot.

As developers, we should embrace these technological advancements and continue to push the boundaries of what is possible with AI. With the help of AI assistants like GitHub Copilot, we can focus more on the creative and strategic aspects of coding - working collaboratively with other teams to develop innovative solutions that meet the needs of our customers.

Overall, I am excited about the future of AI in the world of coding, and can't wait to see how it will continue to change the way we work and innovate.

Published: May 19, 2023

Updated: Nov 24, 2023

Software developmentDevOps