My experience of using Github Copilot

 It's been a while since I posted anything here. Let's change that! :)

The first topic I want to cover is my experience using GitHub Copilot. Let's get started.

What is Github Copilot?

GitHub Copilot is an AI-powered tool designed to assist developers by providing hints, recommendations, bug fixes, and code writing based on context and guidance. The first version, available to everyone, was released in October 2021.

GitHub markets Copilot not just as a "code completion tool" but as an "AI pair programmer." This is a smart move, as it sounds intriguing and generates interest.

Github Copilot logo image

How to use Github Copilot?

  • Use simple and clear language so that Copilot can better understand your comments and intentions. 
  • Context is crucial for effective interaction with Copilot. Well-structured and readable code, meaningful names for files, classes, methods, and comments all contribute to better results.
  • The more you use Copilot, the better it understands you and the more relevant its suggestions become. Copilot learns from your actions and the suggestions you select, so frequent use can enhance the quality of its recommendations. The more you work with it, the better it adapts to your coding style.
  • It's important to describe the task or problem you want to solve in a multi-line comment at the beginning of the file.
  • Copilot performs best with small, clearly defined tasks. Break down large tasks into smaller ones, describe them, and Copilot will provide suggestions for each step. 
Binary search generation

When not to use Github Copilot?

  • Working with cutting-edge frameworks and libraries that are unfamiliar to the AI model.
  • Tackling complex, non-trivial tasks that demand innovative solutions and a high degree of creativity.

Conclusions

  • Autocomplete worked well in most cases. However, explaining and simplifying code and adding tests were less effective, so I wouldn't recommend focusing on those features.
  • Fixing code is interesting, but often developers will spot errors in the logs or by simply reviewing the code.
  • I found writing new features useful, and in some cases, it provided better answers than ChatGPT. I also really liked the chat feature since it eliminates the need to keep another tab open with ChatGPT.
  • The advanced search was also hit or miss. Sometimes it offered completely unrelated results.

Comments

Popular posts from this blog

How to design tiny url system

System design tips on how to make capacity estimation

IMAP protocol summary