parallax circle item parallax circle item parallax circle item
Insights & Blogs

Examining the Ins and Outs of GitHub’s AI Copilot Tool: An Interview with Albert Gouws

AI Tools are helping change the way we think and design things. From generative prompts for teachers to diagnostic tools for medical professionals, AI is having significant and diverse ramifications across nearly every industry. 

One area that, not surprisingly, is heavily impacted by the AI boom is in the coding and developer space. Beyond just streamlining repetitive tasks and auto-completion functions, AI models are investigating code structure and providing smart, contextualised solutions. Some examples include; refactoring opportunities, generation of documentation, troubleshooting CI/CD pipelines and the clarification of more complex code snippets. 

Recently we sat down with Albert Gouws, one of our top solution architects to discuss some of the benefits and challenges in working with AI tools. In this instance, we specifically focussed on GitHub Copilot, a tool we have been using at Sandfield to complete some of the more routine developer tasks and enhancing our ability to innovate and think creatively.

Can you give us a very basic summary of what the GitHub Copilot tool is? 

GitHub Copilot is an AI tool that helps write and explain code. One common task for GitHub is for code completion. It has “learned” to accomplish this task, among others, by being exposed to thousands of code examples on the internet. This means that it is now, in a way, able to come up with solutions and suggestions by itself. 

How does “code completion” work? Is it basically a more sophisticated version of the “text auto complete” tool in google docs? 

Yes, when you are writing code, Copilot looks at the context of all of the code that you’ve written, and comes up with suggestions on what you may want to be doing next. A very simplified pseudocode example could be:

Can you describe any ways in which the Copilot tool has changed the way you or the wider Sandfield Development team work?

The process in which many developers produce code is as follow:

  1. Write code
  2. Get stuck
  3. Perform a quick Google Search
  4. Go to the top result — most likely Stack Overflow
  5. If the solution makes sense, then incorporate the suggested solution and continue writing code.
  6. If the solution is too complicated or doesn’t make sense then ask a Senior Developer and/or Technical Lead for clarification
  7. If that fails, ask an internal chat room/forum

What I’ve found is that Copilot comes in just before, or just after step 2.  It’s available right there in your IDE (Integrated Development Environment), and it either suggests something you may be wanting to do. Or, if you’re stuck, you can enter a small comment in your code stating what you’re trying to accomplish. For example: 

Copilot will then read the comment and start suggesting code based on the comment.  E.g. it may suggest an entire function that calculates the next business day.

What makes it very effective is that it’s very easy to access in the IDE, and it’s much more insightful than a normal search, so it’s almost like asking a co-worker. 

But just like a co-worker though, it may give you incorrect or weird answers at times, so care needs to be taken.


Can you provide any examples of when GitHub Copilot has freed you up from more mundane tasks so you could spend your time engaged on ‘higher value’ tasks?

One example is when converting a database table into a class. What I do is paste the table schema into the code as a comment above my class.  I then start adding properties and Copilot will quickly begin suggesting what the rest of the properties should be based on the schema in the comment.  This is a simple example but it also works in more complex contexts.


What are some personal frustrations you’ve had with working with AI tools?

When the tool suggests a huge chunk of code, I immediately get a little concerned.  It means you have to read and understand exactly what it’s doing.  In that case you run an increased risk of errors and, unless you have a very solid testing approach, you’re better off not doing it. 

I prefer the tool suggesting bite sized chunks as I go.  It’s a bit like asking it to “Build me a house” and expecting it to get everything right, including the tile and grout colours.  I’d rather it guide me through the process in segments, making sure I’m reminded of each step along the way.


Would you say that working with the Copilot tool has increased your knowledge or has it been the other way around? 

I would say that it has increased my knowledge.  I use it when working in languages I’m not very familiar with, and it helps me to quickly and effectively write scripts.  

If you do want to learn and retain the knowledge you have to be very disciplined to learn and memorise what has been suggested.  Before you put in that effort, it’s worth confirming whether that approach is, in fact, the best approach.  No point in learning a less than ideal approach and committing that to memory!


What sort of future do you see for similar tools in the long-term? What is the most impactful positive outcome you can conjure?

I think there is a future for more and more tools like this.  We need to keep in mind that it is a Tool, and it’s not going to walk in and replace every programmer. 

This specific tool is quite programming related.  It’d be really beneficial to get one that could quickly look at a UI, and instantly suggest helpful UI improvements. 

Another useful scenario you could envision, would be to help conduct user testing. It could theoretically do this by looking at the data in the existing database and comparing it against the expected values in the fields. Once it finds a problem, it could look at the code and make suggestions as to what is wrong. This would really be a massive time saver.

 

While we don’t see AI tools removing the need for human input and creativity any time soon, we do believe in utilising these tools where applicable. GitHub’s Copilot is just one example where we have found a way to harness the benefits of a new technology to our advantage. In this case, by freeing up time for our developers to work on the more complex and innovative components of technology development. 

Follow us for the latest insights