WEBVTT

00:00.000 --> 00:02.310
-: Welcome back to this section on GitHub Copilot.

00:02.310 --> 00:05.340
We'll explore how it's created, what it is,

00:05.340 --> 00:07.830
and how you can use it to generate code.

00:07.830 --> 00:09.750
GitHub Copilot is a product

00:09.750 --> 00:11.790
that's made by a company called OpenAI.

00:11.790 --> 00:14.108
They have built OpenAI Codex,

00:14.108 --> 00:17.880
which provides code suggestions in real-time,

00:17.880 --> 00:19.620
right from your editor.

00:19.620 --> 00:22.315
GitHub Copilot is created by a company called OpenAI,

00:22.315 --> 00:25.830
and you can access this tool using a coding editor

00:25.830 --> 00:27.990
called Visual Studio Code.

00:27.990 --> 00:30.930
Let's quickly have a look at GitHub's website,

00:30.930 --> 00:33.990
which demonstrates this AI pair programmer.

00:33.990 --> 00:36.540
As we can see, we can code and generate

00:36.540 --> 00:38.880
a range of different types of languages.

00:38.880 --> 00:43.880
So, everything from TypeScript to Go, to Python, and Ruby,

00:44.820 --> 00:49.710
Copilot is able to produce high-quality code suggestions

00:49.710 --> 00:54.180
in your editor in real-time across a variety of languages.

00:54.180 --> 00:56.400
Also notice how we're doing different types

00:56.400 --> 01:00.540
of code generation, i.e. generating the code from comments,

01:00.540 --> 01:03.980
or generating the code from a function name,

01:03.980 --> 01:06.450
as well as also in the Python example,

01:06.450 --> 01:09.120
we are generating code from the function name,

01:09.120 --> 01:11.640
combined with a documentation string.

01:11.640 --> 01:13.770
So, Copilot is able to generate code

01:13.770 --> 01:16.980
in lots of different ways, and we'll see how you can use

01:16.980 --> 01:19.050
some of that inside of your projects.

01:19.050 --> 01:20.340
On the right-hand side of this,

01:20.340 --> 01:23.940
you can see this parse_expenses.py file.

01:23.940 --> 01:26.700
As you use something like GitHub Copilot,

01:26.700 --> 01:28.770
you can use it to generate code,

01:28.770 --> 01:30.810
and that can be a range of functions.

01:30.810 --> 01:33.930
It can be various types of comments within the code.

01:33.930 --> 01:36.870
It could be classes and other aspects of your code.

01:36.870 --> 01:39.630
More recently, GitHub copilot has produced

01:39.630 --> 01:42.060
something called Copilot Chat,

01:42.060 --> 01:44.910
which is very similar to ChatGPT, almost,

01:44.910 --> 01:47.670
as if not the same as ChatGPT,

01:47.670 --> 01:49.890
but inside of your Visual Studio Code.

01:49.890 --> 01:52.500
One major benefit I'm finding of using

01:52.500 --> 01:54.900
the chat functionality in VS code

01:54.900 --> 01:58.050
is the ability to copy with the click of a button

01:58.050 --> 01:59.850
directly into my files.

01:59.850 --> 02:01.410
Some of the use cases here

02:01.410 --> 02:05.520
are speeding up your coding projects, debugging code,

02:05.520 --> 02:08.400
and learning new programming languages and frameworks.

02:08.400 --> 02:11.370
There was a recent research study done by GitHub

02:11.370 --> 02:13.890
where they compared a control group of developers

02:13.890 --> 02:15.990
who didn't use GitHub Copilot,

02:15.990 --> 02:18.650
versus developers that did use GitHub Copilot.

02:18.650 --> 02:20.970
And there's some really interesting results.

02:20.970 --> 02:22.494
So, if we scroll down and have a look,

02:22.494 --> 02:24.210
and you'll see that the data,

02:24.210 --> 02:28.226
so, the perceived productivity was 88% more productive,

02:28.226 --> 02:32.460
and they were less frustrated with coding about 59% of them.

02:32.460 --> 02:34.989
So, we can see that the vast majority of people,

02:34.989 --> 02:38.040
when using GitHub Copilot, felt that they could spend

02:38.040 --> 02:41.490
more time on satisfying work, felt more productive,

02:41.490 --> 02:44.910
and also experienced more efficiency in their flow

02:44.910 --> 02:46.650
in terms of faster completion.

02:46.650 --> 02:49.500
And so this kind of goes to show that they had this group

02:49.500 --> 02:51.720
of 45 people that used it

02:51.720 --> 02:53.853
versus a control group of 50 that didn't.

02:53.853 --> 02:56.412
And you can see the average time to complete a task

02:56.412 --> 02:58.264
is almost just under half

02:58.264 --> 03:00.990
of the people that were using GitHub Copilot.

03:00.990 --> 03:03.750
So, I think this is a really good reason as to why

03:03.750 --> 03:06.453
it's worthwhile to explore this type of technology.
