GitHub Copilot is Unbelievably Awesome!

GitHub Copilot is Unbelievably Awesome!

What is it?

GitHub Copilot is an artificial intelligence tool that writes entire functions for you in many programming languages based on the context of your code. It uses an artificial intelligence technology called GPT3, which stands for Generative Pre-Trained Transformer. It’s a natural language processor that uses big data to predict what you will be writing, so they can do things like answer questions or write sentences for you.

How it works!

Copilot uses a new algorithm based on GPT3 called codex, which focuses on software source code. Although it works with many popular programming languages and frameworks, it’s especially good with languages that have lots of publicly available code like Python, JavaScript, Ruby, and others.

Microsoft, who owns GitHub, made a $1 billion investment in the company that created codex called OpenAI. The code written by Github Copilot is synthesized from public sources such as existing GitHub repositories. As more and more people use the tool, it will also train codex and help it provide better solutions.

Let’s

You can activate it by starting to write a function with a meaningful name, and Copilot will attempt to create that function for you. Or when a detail comment is provided, which will be used to query the codex. The code it produces is not just copied from open source. It’s brand new code generated by the algorithm, and it’s surprisingly accurate.

Github Copilot suggesting code from function name.
Github Copilot suggesting code from function name.
Github Copilot auto-completed function from the meaningful function name
Github Copilot auto-completed function from the meaningful function name

Here we can see from the above images how Github Copilot can auto complete the code just from function name. Of course, the function name should be meaningful.

To demonstrate this, I have started typing the function name “random”. And immediately after that, Github Copilot suggested an auto complete for that code in grey.

Long-Term Thoughts

In the long term, this will greatly impact our future as developers. It will not only help us code faster, but also make our code clean, efficient and free of bugs and errors. AI is finally stepping up the game for developers. There’s more to come as this is not where we stop. More features to Copilot or a separate and new AI powered tool all together will open so many doors! And the potential for this is virtually endless.

Conclusion

Think of it as the next generation of auto-complete. While GitHub Copilot is currently in its infancy, it could change the way you code in the future.

Leave a Reply