Fireship · @fireship
The Truth about Github Copilot // AI Programming First Look
Uploaded June 30, 2021 · Length 8:30
Summary
Fireship reviews Github Copilot, an AI tool that generates code based on user input, using GPT-3 and trained on 175 billion parameters.
- github copilot
- ai programming
- gpt-3
- code generation
- artificial intelligence
- machine learning
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
in the not so distant future you'll
- 0:01
likely be writing far fewer lines of
- 0:03
code than you are today
- 0:04
because artificial intelligence is
- 0:06
coming to a vs code near you
- 0:08
microsoft aka github just announced
- 0:10
copilot yesterday
- 0:11
a tool powered by gpt3 capable of
- 0:14
writing code automatically
- 0:15
all you have to do is write a
- 0:17
descriptive function name or some
- 0:18
comments
- 0:19
and it will automatically fill in the
- 0:20
implementation details for you
- 0:22
and it's not just inserting a snippet
- 0:23
this is actual novel code
- 0:25
that has never been seen before it looks
- 0:27
at the code you've already written in
- 0:28
your project as
- 0:29
context and attempts to generate new
- 0:31
code to match it perfectly
- 0:32
for example imagine you've written a
- 0:34
react component and you now want to
- 0:36
write a unit test for it
- 0:37
just write a comment describing what you
- 0:39
want to test and copilot will generate
- 0:41
the code based on your component
- 0:42
and the testing framework that you're
- 0:43
using or say you want to calculate the
- 0:45
number of days between two dates for me
- 0:47
that's an instant google search then
- 0:49
stack overflow copy and paste
- 0:50
with copilot all i have to do is write a
- 0:52
function name and it implements the
- 0:54
function body for me automatically if
- 0:56
i'm not perfectly happy with the
- 0:57
implementation
- 0:58
i can click a button to get the next
- 0:59
prediction anything that might have
- 1:01
brought you to stack overflow can be
- 1:02
autocompleted in your ide
- 1:04
and custom tailored to fit your code
- 1:06
base developers like to joke about how
- 1:08
often they google things and copy
- 1:09
answers from stack overflow
- 1:11
so you can only imagine how big of a
- 1:12
time saver this is going to be
- 1:14
i just got access to copilot myself so
- 1:16
let's dive in and see how useful it
- 1:18
really is
- 1:18
i just installed the extension and bs
- 1:20
code which required me to authenticate
- 1:22
with my github account i've got a
- 1:24
front-end vanilla javascript project
- 1:25
here
- 1:26
with files for my html css and
- 1:29
javascript you'll notice a little
- 1:30
copilot icon down here at the bottom
- 1:32
that just allows you to toggle it on or
- 1:34
off the first thing i want to try
- 1:35
is to define a function called
- 1:37
intersection of arrays
- 1:39
and see if it can complete the body of
- 1:40
that function successfully
- 1:42
we'll give the function a name of
- 1:43
intersection of o and it just predicts
- 1:45
the name of the function that we're
- 1:46
going to write and it looks like it's
- 1:48
being implemented correctly
- 1:49
but there are multiple ways we could
- 1:51
implement this function let's go ahead
- 1:52
and delete the code back to the function
- 1:54
name
- 1:54
if we hover over the automatically
- 1:56
generated code we can click next
- 1:58
to cycle through different suggestions i


