-: Welcome back to this section on GitHub Copilot.
We'll explore how it's created, what it is,
and how you can use it to generate code.
GitHub Copilot is a product
that's made by a company called OpenAI.
They have built OpenAI Codex,
which provides code suggestions in real-time,
right from your editor.
GitHub Copilot is created by a company called OpenAI,
and you can access this tool using a coding editor
called Visual Studio Code.
Let's quickly have a look at GitHub's website,
which demonstrates this AI pair programmer.
As we can see, we can code and generate
a range of different types of languages.
So, everything from TypeScript to Go, to Python, and Ruby,
Copilot is able to produce high-quality code suggestions
in your editor in real-time across a variety of languages.
Also notice how we're doing different types
of code generation, i.e. generating the code from comments,
or generating the code from a function name,
as well as also in the Python example,
we are generating code from the function name,
combined with a documentation string.
So, Copilot is able to generate code
in lots of different ways, and we'll see how you can use
some of that inside of your projects.
On the right-hand side of this,
you can see this parse_expenses.py file.
As you use something like GitHub Copilot,
you can use it to generate code,
and that can be a range of functions.
It can be various types of comments within the code.
It could be classes and other aspects of your code.
More recently, GitHub copilot has produced
something called Copilot Chat,
which is very similar to ChatGPT, almost,
as if not the same as ChatGPT,
but inside of your Visual Studio Code.
One major benefit I'm finding of using
the chat functionality in VS code
is the ability to copy with the click of a button
directly into my files.
Some of the use cases here
are speeding up your coding projects, debugging code,
and learning new programming languages and frameworks.
There was a recent research study done by GitHub
where they compared a control group of developers
who didn't use GitHub Copilot,
versus developers that did use GitHub Copilot.
And there's some really interesting results.
So, if we scroll down and have a look,
and you'll see that the data,
so, the perceived productivity was 88% more productive,
and they were less frustrated with coding about 59% of them.
So, we can see that the vast majority of people,
when using GitHub Copilot, felt that they could spend
more time on satisfying work, felt more productive,
and also experienced more efficiency in their flow
in terms of faster completion.
And so this kind of goes to show that they had this group
of 45 people that used it
versus a control group of 50 that didn't.
And you can see the average time to complete a task
is almost just under half
of the people that were using GitHub Copilot.
So, I think this is a really good reason as to why
it's worthwhile to explore this type of technology.