In this tutorial, you will get access to an independent review of the four most popular VS Code artificial intelligence extensions in 2022. Nowadays, there are a number of extensions that promise to add some form of AI into your development workflow. These extensions include AI Doc Writer, Code Attendant, Readable, AIXcoder, and Ponicode.

Out of the available extensions, by far the most popular four are Kite, IntelliCode, Copilot and Tabnine. Each one has been downloaded over two million times. This raises the question, are they any good?

No extension is sophisticated enough to replace an actual developer, however, that does not mean they might not be useful. In this guide, you learn if any of these extensions will increase your coding productivity. Being suggested code sounds great, however, if that code contains bugs, is not optimal and needs refactoring, will these suggestions lead to better-crafted code, or, are you still better off searching Stackoverflow? Read on to find out ðŸ”ĨðŸ”ĨðŸ”Ĩ

Copilot

With over 2 million downloads, Copilot created by GitHub promises to add the power of something called OpenAI Codex into your development workflow. The difference with Copilot is that it does not simply replace your Intellisense suggestions.

After enabling this extension, Copilot will provide you with code suggestions based on code or common language that you add to your code files. As you start to add a function name, a comment, or a doc-string, Copilot will attempt to take your instructions and turn them into code. Copilot can generate code for an entire function, a class, a unit test, as well as provide per-line recommendations. Copilot will even try to autofill any repetitive code that it notices you typing!

The source of where Copilot gets the code it suggests is currently a point of contention for a lot of developers. Copilot searches public repositories on Github as the source of its suggestions. A lot of online feedback states that the tool does not respect the owners of the repositories code license. It simply scans and spider's code. If you do not agree with this, then it is up to your morals if you decide to use it.

The first thing that I would point out about the code generated by Copilot in relation to your project is that the tool does not know if the code it suggests is any good. Within your company, you will have coding standards. Copilot will not suggest code that has been written to your coding standard, it will just give you suggestions based on code it finds online. Copilot does not validate that its suggestions are lines of code that you should use, it leaves that up to you.

GitHub CEO Nat Friedman describes Copilot as a tool that can help developers quickly discover alternative ways to solve problems, write tests, and explore new frameworks.

If Copilot sounds of interest to you, the first step is to sign up for the free beta program and install the marketplace extension. After installing the extension, start coding and Copilot will provide you with some pretty complex suggestions:

Copilot random number

We can then get the AI to write a unit test for us

Copilot unit test

You can also toogle between different code suggestions:

Copilot suggestions

Copilot can create skeleton components:

Copilot skeleton components

It will also automatically give you suggestions to prevent you from having to write repetitive boilerplate code:

Copilot repetitive task

When using Copilot is is definitely worth taking 5 minutes to learn the shortcut keys:

Tab: Accept suggestion Esc : Reject suggestion Alt + ]: Next suggestion *Alt + [ *: Previous suggestion *Alt + \ *: Trigger suggestion

Getting whole function suggestions is great, however, to write code to a high standard you will often want to craft it yourself. On most of my projects we have a rule, if you need to copy some complex code from Stackoverflow, link to it in a comment so the context of the code is in source control as well. With Stackoverflow you also get actual human feedback starting if the snippet works well.

With automated suggestions, I worry that junior developers will simply apply a suggestion without understanding it. This increase in productivity could actually be a false/positive. In a code review, the code might fail inspection, wasting more of the team's time. At the end of the day, there is no shortcut for not understanding the code you commit!

  • 📄 Learn more here
  • 📁 Download here

Tabnine

With over 4 million downloads, Tabnine is a popular VS Code AI choice. Tabnine has a free option as well as a paid-for tier. In the free tier expect AI-powered short code completion to get added to your VS-Code Intellisense. If you are happy to pay $12 a month, you will additionally get whole-line/full-function suggestions, as well as natural language completions. Tabnine also promises to learn from your coding patterns & style.

If you are looking for AI on a budget, then you can leave the full-function suggestions and natural language completions to Copilot and simply Tabnine to get better Intellisense recommendations.

Tabnine uses something called the transformer network architecture which uses over 2 million source repositories to train from. Historically a lot of people complained about how much memory size the extension used, however, this was fixed in 2021.

I found Tabnine really useful when writing my book, Umbraco .NET Core Mastery. The book was written in Markdown within VS-Code. When crafting my prose, Tabnine would give me ideas on what word to use next. It kind of worked like Grammerly, but, within VS Code and in real-time not after the fact.

While typing, words and phrases that I would not have initially used would be suggested. As the suggestions had all gone through a spellchecker, the number of typos I made also decreased while using Tabmine. Instead of me typing a word manually, it was quicker to use a suggestion instead. This feature will be handy when writing readme.md files.

Out of all the extensions within this review, I found the most use from TabNine.

  • 📄 Learn more here
  • 📁 Download here

Kite

With over 3.6 million downloads, Kite is another popular AI extension. Kite started off only supporting Python, however, it now supports all the usual contenders like Javascript and C#.

In terms of capabilities, the free version of Kite is similar to Tabnine. Install it and get AI recommendations added to your VS-COde Intellisense. You can tell which suggestions have been made by Kite as they will have the word Kite next to them ðŸĪŠðŸĪŠðŸĪŠ

Kites AI recommendations

I found the suggestions made by Kite to be personalised and tailored to the specific bit of code I was working on. Based on the naming conventions I was using in the surrounding variable, function and class names, I was given suggestions for variable names and values that were in line with the intent of the code.

As well as personalised recommendations, Kite also provided recommendations for standard Javascript syntax like var and function declarations.

Personally, I found I got a lot more recommendations from TabNine compared to Kite, however, the Kite recommendations felt more personalized.

  • 📄 Learn more here
  • 📁 Download here

IntelliCode

Released by Microsoft, with over 20 million downloads, IntelliCode is the most downloaded extension on the list. The aim of IntelliCode is to add the suggestions that you are most likely to use at the top of your Intellisense. Being able to more quickly auto-complete an Intellisense suggestion is obviously a massive time saver!

IntelliCode recommendations are based on thousands of open source projects on GitHub and your Intellisense usage. With this data combined, the algorithm tries to guess what suggestion you will pick from the list. IntelliCode stars the suggestions it thinks you will use and includes them as the first items within the Intellisense suggestions.

When you start comparing the recommendations to the newer more powerful AI tools, the power of IntelliCode does not really compare. The tool does not give you the same level of AI-based personalised recommendations based on the intent of the code.

Being a long-term Visual Studio user, I have used IntelliCode recommendations and it's been really handy. Sadly, compared to the other alternatives the recommendations are not as tailored compared to Kite, Tabnine, or Copilot.

  • 📄 Learn more here
  • 📁 Download here

It is amazing how far development tools have come since I was a fresh-faced developer in the naughties. All the extensions listed in this guide are free to use in some capacity. These extensions will not do all the work for you, however, I did notice an increase in my productivity after installing them.

In general, I spent less time Googleing and reading articles and more time thinking about code. In the grand scheme of things, I am still unsure about the long-term productivity gains from this freedom of research.

In the short term, spending less time reading and Googling might be a short-term productivity win. To be a great developer, you need to understand how to craft good code. No tool will substitute the value of your own personal knowledge. Spending less time researching an answer, may mean you learn less overall.

If you use these tools to help you as a way to learn they will provide good benefits. If you use these tools as a crutch to save you from learning, it will only hinder your career in the long term.

After installing these packages, I found myself using Tabnine the most, with Copilot as a suggestion tool once in a while. I have left Copilot, Tabnine and Kite all running at the same time without any performance impact. When you run VS-Code like this you will get normal recommendations, Tabnine recommendations and Kite recommendations all within the same dropdown.

As all the tools have a free tier, there is nothing stopping you from getting the best of all worlds. As always the choice is yours, do what makes you happy. Happy Coding ðŸĪ˜