The Truth about Github Copilot // AI Programming First Look
Key Takeaways
The video discusses GitHub Copilot, an AI-powered tool for writing code faster, built on top of OpenAI's GPT-3 model, and explores its features and capabilities.
Full Transcript
in the not so distant future you'll likely be writing far fewer lines of code than you are today because artificial intelligence is coming to a vs code near you microsoft aka github just announced copilot yesterday a tool powered by gpt3 capable of writing code automatically all you have to do is write a descriptive function name or some comments and it will automatically fill in the implementation details for you and it's not just inserting a snippet this is actual novel code that has never been seen before it looks at the code you've already written in your project as context and attempts to generate new code to match it perfectly for example imagine you've written a react component and you now want to write a unit test for it just write a comment describing what you want to test and copilot will generate the code based on your component and the testing framework that you're using or say you want to calculate the number of days between two dates for me that's an instant google search then stack overflow copy and paste with copilot all i have to do is write a function name and it implements the function body for me automatically if i'm not perfectly happy with the implementation i can click a button to get the next prediction anything that might have brought you to stack overflow can be autocompleted in your ide and custom tailored to fit your code base developers like to joke about how often they google things and copy answers from stack overflow so you can only imagine how big of a time saver this is going to be i just got access to copilot myself so let's dive in and see how useful it really is i just installed the extension and bs code which required me to authenticate with my github account i've got a front-end vanilla javascript project here with files for my html css and javascript you'll notice a little copilot icon down here at the bottom that just allows you to toggle it on or off the first thing i want to try is to define a function called intersection of arrays and see if it can complete the body of that function successfully we'll give the function a name of intersection of o and it just predicts the name of the function that we're going to write and it looks like it's being implemented correctly but there are multiple ways we could implement this function let's go ahead and delete the code back to the function name if we hover over the automatically generated code we can click next to cycle through different suggestions i actually don't see any i like here so i'm going to click the open copilot option that will synthesize 10 different possible solutions and it happens very fast like within one or two seconds but looking closer at the solutions it looks like they are all pretty much the same even though i know there are multiple different approaches to implementing an intersection of arrays the top answer on stack overflow actually has a cleaner implementation and i would have expected this to at least be an option in the results but let's move on and see if we can build a little counter app that has multiple moving parts first i'm going to define some state which is just a variable equal to zero you'll notice that it's trying to make predictions as i'm writing out this variable that is one thing that's kind of annoying it's almost a little too aggressive when making predictions it would be nice if the ai could predict when i actually want predictions also it predicts things for react and view even though i'm not in a reactor view project in any case the next thing i want to do here is grab a button from the dom i'll give the ai a hint by writing a comment and you'll notice that it actually auto-completes the comment for me it knows exactly what i want to do because it's such a common thing to do now that we have a button let's set up an event listener on the click event to increment the state each time that it's clicked now i start writing another comment i don't even type anything and it fills out that entire comment for me that's pretty crazy because it's using the context of our previous line of code to figure out what to write next i'll hit tab a couple times and you'll notice that it sets up an event listener on the button variable that we defined then it proceeds to update the state by incrementing it by 1. it also adds a modulus 3 here i'm not sure what that's about that'll just make it count to three in a loop and i have no idea where it would get the idea to do that and finally it knows that we want to show this state in the ui so it takes our button and sets the inner html to the current state that's pretty wild but now i'm going to go into the html and add the button to the dom it doesn't seem to know that my javascript is looking for a certain button but if i add a button comment it will auto-complete with the expected id and finally let's jump into our css and give it some style if i add a comment for a red button with a blue background it will start implementing that code line by line but it's generally more efficient to just go straight to the copilot and see the available options here an interesting side note is that you'll get different results here each time you go to the co-pilot even if the comment is exactly the same the results are kind of all over the place but i think it's enough to give you some starting code to work with don't expect this thing to be turning out production grade code just yet that's not going to happen until protocol 4 is implemented now if we go ahead and open our app in the browser we should get this blue button and every time it's clicked it will increment the state by the modulus of three all things considered i think copilot did a pretty good job it feels a little rough around the edges but it's by far the best ai coding experience that i've ever had but how does this thing actually work well in order to build useful ai you need a ton of data luckily over the last 12 years developers have graciously donated their time and code to help other developers on the internet while foregoing their copyright to that content primarily on the website stack overflow which was just acquired this month for 1.8 billion dollars impeccable timing for their founders to cash out just weeks before a game-changing existential threat hits the industry it also takes code from public open source github repos now because it's generating unique code i don't think it has to worry about any open source licensing requirements because this data is public microsoft can freely use it to build their ai the deep learning model behind the data is gpt-3 or generative pre-trained transformer 3 which is easily one of the most impressive ai products ever developed people describe it as amazing humbling and terrifying and it's really good at being creative based on some initial context like it can take a complex article and summarize it for a second grader or it can take an idea that you have for an ad and generate the actual ad copy under the hood it's just a massive neural network that's been trained on over 175 billion parameters to put that in perspective there are many popular pre-trained neural networks out there and none of them have anywhere close to 1 billion parameters let alone 175 billion it's developed by a company called openai that was founded by people like elon musk sam altman and other high-profile tech figures it started in 2015 as a non-profit but i think they realized they could make a shitload of money and converted to a for-profit company in 2019. now microsoft doesn't control openai but they did make a 1 billion investment in 2019 then in september 2020 they announced they had licensed the exclusive use of gpt-3 other companies can still use the api but microsoft is the only company that can truly take full advantage of the gpt3 algorithm that means microsoft will be able to build products that nobody can really compete with unless of course you can build an algorithm that's better than gpt3 don't let the name fool you openai is not open a better name for it might be something like windows ai but this is all great news for developers right ever since microsoft acquired github the developer experience has been getting better and better you can get your github repos directly in vs code github actions make continuous integration super easy and copilot will just be one more awesome feature to add to the list but it makes me wonder why does microsoft love us developers so much historically microsoft has not had a great relationship with developers just google embrace extend extinguish modern microsoft has been doing a lot of embracing and extending but who knows if they have any plans for the extinguish step now i'm just joking around here but let's imagine that the goal was to replace developers with ai programmers are expensive in short supply and one of the biggest expenses for any tech company to replace them you need a four-step plan step one is to get them to share a bunch of public information about their code in step two we use that code to create a product that makes developers happier and more productive the initial version won't be perfect but as more and more developers use it we'll collect more and more data and reinforce the existing algorithm in theory the algorithm will get so good that we'll no longer need programmers who write code maybe just technicians who can help guide the algorithm to the right place at which point your company can fire its programmers and pay a bunch of artificial azure coders by the second copilot is free for now and only available through a technical preview but they do plan to develop it into a commercial product in the future aws already has code guru for ml powered code recommendations so the big players here are already introducing paid services that will replace the jobs normally done by human coders we're currently on step 3 of the plan but again i'm just joking around here this is just a meme channel i love bill gates and microsoft and if you think they're motivated by anything beyond their genuine love for developers then you must be the kind of person who thinks two plus two equals four all i ask is that you hit like and subscribe to my channel so i can keep you updated on the latest tools hitting our industry thanks for watching and i will see you in the next one
Original Description
Learn the basics of GitHub Copilot - an AI-powered tool for writing code faster. It is built on top of OpenAI’s GPT-3 model and uses training data from public places like StackOverflow to suggest and write code automatically.
#ai #code #firstlook
🔗 Resources
Copilot https://copilot.github.com/
OpenAI https://openai.com/blog/gpt-3-apps/
GPT3 Graphics https://jalammar.github.io/how-gpt3-works-visualizations-animations/
📚 Chapters
00:00 GitHub Copilot
01:14 First Look in VS Code
04:38 The Truth about AI Programming
07:20 Replace Developers with AI
🤓 Install the quiz app
iOS https://itunes.apple.com/us/app/fireship/id1462592372?mt=8
Android https://play.google.com/store/apps/details?id=io.fireship.quizapp
🔥 Watch more with Fireship PRO
Upgrade to Fireship PRO at https://fireship.io/pro
Use code lORhwXd2 for 25% off your first payment.
🎨 My Editor Settings
- Atom One Dark
- vscode-icons
- Fira Code Font
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Fireship · Fireship · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Angular 4 Development and Production Environments with Firebase
Fireship
OAuth with Angular and Firebase Tutorial
Fireship
Anonymous Authentication with Angular and Firebase - Lazy Registration
Fireship
Angular Router Guards for Firebase Users
Fireship
Angular Firebase CRUD App with NoSQL Database Tutorial
Fireship
Upload Files from Angular to Firebase Storage
Fireship
How to Deploy an Angular App to Firebase Hosting
Fireship
Sharing Data between Components in Angular
Fireship
Loading Spinners for Asynchronous Firebase Data
Fireship
Angular 4 Transactional Email with Google Firebase Cloud Functions
Fireship
Firebase Database Rules Tutorial
Fireship
Autocomplete Search with Angular4 and Firebase
Fireship
Reddit Inspired Upvoting System with Angular and Firebase NoSQL
Fireship
Angular Drag-and-Drop File Uploads to Firebase Storage
Fireship
Text Translation with Firebase Cloud Functions onWrite and Angular 4
Fireship
Custom Usernames with Firebase Authentication
Fireship
Twitter-Inspired Follow Unfollow Feature with Firebase and Angular 4
Fireship
Simple Pagination with Firebase and Angular 4
Fireship
How to Connect Firebase Users to their Data - 3 Methods
Fireship
Add Toast Message Notifications to your Angular App
Fireship
Facebook-Inspired Reactions System with Angular and Firebase
Fireship
Learn NgModule in Angular with Examples
Fireship
Lazy Loading Components in Angular 4
Fireship
Stripe Checkout Payments with Angular and Firebase - Part 1
Fireship
Process Stripe Payments with Firebase Cloud Functions - Part 2
Fireship
Selling Digital Content in Angular with Stripe Payments - Part 3
Fireship
Angular 4 Full Text Search with Algolia - Part 1
Fireship
Algolia with Firebase Cloud Functions - Part 2
Fireship
Firebase Phone Authentication in Angular 4
Fireship
Top 7 RxJS Concepts for Angular Developers
Fireship
Learn Angular Animations with 5 Examples
Fireship
Advanced Firebase Data Filtering (Multi-Property)
Fireship
Realtime Maps with Mapbox + Firebase + Angular
Fireship
Angular Reactive Forms with Firebase Database Backend
Fireship
Send Push Notifications in Angular with Firebase Cloud Messaging
Fireship
Top 7 Ways to Debug Angular 4 Apps
Fireship
Infinite Scroll with Angular and Firebase
Fireship
Use TypeScript with Firebase Cloud Functions
Fireship
Realtime Graphs and Charts with Plotly and Firebase
Fireship
Role-Based User Permissions in Firebase
Fireship
User Presence System in Realtime - Online, Offline, Away
Fireship
Location-based Queries with GeoFire and Angular Google Maps
Fireship
Angular ngrx Redux Quick Start Tutorial
Fireship
Angular Ngrx Effects with Firebase Database
Fireship
Progressive Web Apps with Angular
Fireship
Angular Ngrx with Firebase Google OAuth User Authentication
Fireship
RxJS Quick Start with Practical Examples
Fireship
Send SMS Text Messages with Twilio and Firebase
Fireship
Firebase Database Performance Profiling
Fireship
Native Desktop Apps with Angular and Electron
Fireship
Subscription Payments with Stripe, Angular, and Firebase
Fireship
Firestore with AngularFire5 Quick Start Tutorial
Fireship
Angular HTTP Client Quick Start Tutorial
Fireship
Google Sign-In with Firestore Custom User Data
Fireship
Star Review System from Scratch with Firestore + Angular
Fireship
Angular Chatbot with Dialogflow (API.ai)
Fireship
Learn @ngrx/entity and Feature Modules
Fireship
Infinite Scroll Pagination with Firestore
Fireship
Faster Firestore via Data Aggregation
Fireship
Contentful - CMS for Angular Progressive Web Apps
Fireship
More on: LLM Foundations
View skill →Related Reads
Chapters (4)
GitHub Copilot
1:14
First Look in VS Code
4:38
The Truth about AI Programming
7:20
Replace Developers with AI
🎓
Tutor Explanation
DeepCamp AI