Skip to content

My Thoughts About GitHub Copilot

GitHub Copilot is an AI code assistant which helps you to write code and increases your productivity. Copilot is currently in closed beta (preview), but you can get yourself into waitlist and hopefully get invitation in just few months. I think I got my invitation like in six weeks.

Copilot can be installed to Visual Studio as an extension and the extension is available at the Visual Studios own marketplace. Extension has currently (4.6.2022) three stars and I think that is related to its nature to rely on networking. The extension doesn’t give clear information if it is lacking the network connection and therefore unable to give any advices.

After you have installed the extension, it will ask you to log in with accepted GitHub Copilot account (the one that you used to get into waitlist).

GitHub can be installed from Visual Studio marketplace
GitHub Copilot extension as available at the VS marketplace. Current rating sits at three stars.

The extension adds little Copilot icon to the bottom row of Visual Studio. By clicking the icon we can choose few settings:

  • Enable settings can be used to enable/disable suggestions.
  • Open Copilot opens the suggestion window which can be used to compare different approaches for code.
Copilot settings can be accessed by clicking the icon at bottom.
Clicking Copilot icon opens list of actions.

I have used the Copilot for five days now and used it mainly on C# projects. If you are using Visual Studio for programming with Copilot, then you will have three level of “code assistance” enabled. The levels are:

  1. Intellisense. Good old Intellisense that gives code suggestion based on the structure of program.
  2. IntelliCode. IntelliCode is AI powered helper and it has been in Visual Studio for awhile now. The most common place to use the IntelliCode is when you use methods from existing types and the Visual Studio shows the most commonly used methods at the top of the intellisense list.
  3. GitHub Copilot for more powerful code helper.
IntelliCode suggestions are marked with star in intellisense dialog.
IntelliCode suggestions are marked with star.

Copilot seems to work surprisingly well with IntelliCode and contrary to what I initially thought it would. After few days of usage the Copilot is almost unnoticeable part of Visual Studio. It gives minor hints all the time and most often they are correct. I don’t use Copilot to write big block of codes like for example for initializing httpclient to get some data from URL, because usually I already have helpers/methods for those purposes and I mainly use those. The minor things that Copilot gives are more valuable for me.

Copilot suggestions are grey block of codes.
Example of Copilot suggestion based on method name and parameters.

The main selling point for Copilot is that it can write you huge block of codes based on comments or method name, but in real use with existing code base, that is not what you want. You want to use existing classes, methods and services and for that the Copilot works really well. It learns from your existing code base and starts giving suggestion based on your own code too. It is not only using GitHub public projects for code suggestions and that makes it so powerful.

Summary

I think Copilot is a great tool. Copilot can give code suggestions based on your existing code base and that really improves the productivity, because it reduces the amount of keystrokes you need to do and also finds the code samples for you. You don’t have to leave from code file to search for sample code of how to build business objects correctly so often anymore, because Copilot shows you the sample. That reduces jumping between files and improves the productivity.

After preview the Copilot will definitely be a paid product, but I’m more than happy to pay few bucks a month to improve my productivity even by 1%.