The Truth about Github Copilot // AI Programming First Look

Fireship · Beginner ·📰 AI News & Updates ·5y ago

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 Angular 4 Development and Production Environments with Firebase
Angular 4 Development and Production Environments with Firebase
Fireship
2 OAuth with Angular and Firebase Tutorial
OAuth with Angular and Firebase Tutorial
Fireship
3 Anonymous Authentication with Angular and Firebase - Lazy Registration
Anonymous Authentication with Angular and Firebase - Lazy Registration
Fireship
4 Angular Router Guards for Firebase Users
Angular Router Guards for Firebase Users
Fireship
5 Angular Firebase CRUD App with NoSQL Database Tutorial
Angular Firebase CRUD App with NoSQL Database Tutorial
Fireship
6 Upload Files from Angular to Firebase Storage
Upload Files from Angular to Firebase Storage
Fireship
7 How to Deploy an Angular App to Firebase Hosting
How to Deploy an Angular App to Firebase Hosting
Fireship
8 Sharing Data between Components in Angular
Sharing Data between Components in Angular
Fireship
9 Loading Spinners for Asynchronous Firebase Data
Loading Spinners for Asynchronous Firebase Data
Fireship
10 Angular 4 Transactional Email with Google Firebase Cloud Functions
Angular 4 Transactional Email with Google Firebase Cloud Functions
Fireship
11 Firebase Database Rules Tutorial
Firebase Database Rules Tutorial
Fireship
12 Autocomplete Search with Angular4 and Firebase
Autocomplete Search with Angular4 and Firebase
Fireship
13 Reddit Inspired Upvoting System with Angular and Firebase NoSQL
Reddit Inspired Upvoting System with Angular and Firebase NoSQL
Fireship
14 Angular Drag-and-Drop File Uploads to Firebase Storage
Angular Drag-and-Drop File Uploads to Firebase Storage
Fireship
15 Text Translation with Firebase Cloud Functions onWrite and Angular 4
Text Translation with Firebase Cloud Functions onWrite and Angular 4
Fireship
16 Custom Usernames with Firebase Authentication
Custom Usernames with Firebase Authentication
Fireship
17 Twitter-Inspired Follow Unfollow Feature with Firebase and Angular 4
Twitter-Inspired Follow Unfollow Feature with Firebase and Angular 4
Fireship
18 Simple Pagination with Firebase and Angular 4
Simple Pagination with Firebase and Angular 4
Fireship
19 How to Connect Firebase Users to their Data - 3 Methods
How to Connect Firebase Users to their Data - 3 Methods
Fireship
20 Add Toast Message Notifications to your Angular App
Add Toast Message Notifications to your Angular App
Fireship
21 Facebook-Inspired Reactions System with Angular and Firebase
Facebook-Inspired Reactions System with Angular and Firebase
Fireship
22 Learn NgModule in Angular with Examples
Learn NgModule in Angular with Examples
Fireship
23 Lazy Loading Components in Angular 4
Lazy Loading Components in Angular 4
Fireship
24 Stripe Checkout Payments with Angular and Firebase - Part 1
Stripe Checkout Payments with Angular and Firebase - Part 1
Fireship
25 Process Stripe Payments with Firebase Cloud Functions - Part 2
Process Stripe Payments with Firebase Cloud Functions - Part 2
Fireship
26 Selling Digital Content in Angular with Stripe Payments - Part 3
Selling Digital Content in Angular with Stripe Payments - Part 3
Fireship
27 Angular 4 Full Text Search with Algolia - Part 1
Angular 4 Full Text Search with Algolia - Part 1
Fireship
28 Algolia with Firebase Cloud Functions - Part 2
Algolia with Firebase Cloud Functions - Part 2
Fireship
29 Firebase Phone Authentication in Angular 4
Firebase Phone Authentication in Angular 4
Fireship
30 Top 7 RxJS Concepts for Angular Developers
Top 7 RxJS Concepts for Angular Developers
Fireship
31 Learn Angular Animations with 5 Examples
Learn Angular Animations with 5 Examples
Fireship
32 Advanced Firebase Data Filtering (Multi-Property)
Advanced Firebase Data Filtering (Multi-Property)
Fireship
33 Realtime Maps with Mapbox + Firebase + Angular
Realtime Maps with Mapbox + Firebase + Angular
Fireship
34 Angular Reactive Forms with Firebase Database Backend
Angular Reactive Forms with Firebase Database Backend
Fireship
35 Send Push Notifications in Angular with Firebase Cloud Messaging
Send Push Notifications in Angular with Firebase Cloud Messaging
Fireship
36 Top 7 Ways to Debug Angular 4 Apps
Top 7 Ways to Debug Angular 4 Apps
Fireship
37 Infinite Scroll with Angular and Firebase
Infinite Scroll with Angular and Firebase
Fireship
38 Use TypeScript with Firebase Cloud Functions
Use TypeScript with Firebase Cloud Functions
Fireship
39 Realtime Graphs and Charts with Plotly and Firebase
Realtime Graphs and Charts with Plotly and Firebase
Fireship
40 Role-Based User Permissions in Firebase
Role-Based User Permissions in Firebase
Fireship
41 User Presence System in Realtime - Online, Offline, Away
User Presence System in Realtime - Online, Offline, Away
Fireship
42 Location-based Queries with GeoFire and Angular Google Maps
Location-based Queries with GeoFire and Angular Google Maps
Fireship
43 Angular ngrx Redux Quick Start Tutorial
Angular ngrx Redux Quick Start Tutorial
Fireship
44 Angular Ngrx Effects with Firebase Database
Angular Ngrx Effects with Firebase Database
Fireship
45 Progressive Web Apps with Angular
Progressive Web Apps with Angular
Fireship
46 Angular Ngrx with Firebase Google OAuth User Authentication
Angular Ngrx with Firebase Google OAuth User Authentication
Fireship
47 RxJS Quick Start with Practical Examples
RxJS Quick Start with Practical Examples
Fireship
48 Send SMS Text Messages with Twilio and Firebase
Send SMS Text Messages with Twilio and Firebase
Fireship
49 Firebase Database Performance Profiling
Firebase Database Performance Profiling
Fireship
50 Native Desktop Apps with Angular and Electron
Native Desktop Apps with Angular and Electron
Fireship
51 Subscription Payments with Stripe, Angular, and Firebase
Subscription Payments with Stripe, Angular, and Firebase
Fireship
52 Firestore with AngularFire5 Quick Start Tutorial
Firestore with AngularFire5 Quick Start Tutorial
Fireship
53 Angular HTTP Client Quick Start Tutorial
Angular HTTP Client Quick Start Tutorial
Fireship
54 Google Sign-In with Firestore Custom User Data
Google Sign-In with Firestore Custom User Data
Fireship
55 Star Review System from Scratch with Firestore + Angular
Star Review System from Scratch with Firestore + Angular
Fireship
56 Angular Chatbot with Dialogflow (API.ai)
Angular Chatbot with Dialogflow (API.ai)
Fireship
57 Learn @ngrx/entity and Feature Modules
Learn @ngrx/entity and Feature Modules
Fireship
58 Infinite Scroll Pagination with Firestore
Infinite Scroll Pagination with Firestore
Fireship
59 Faster Firestore via Data Aggregation
Faster Firestore via Data Aggregation
Fireship
60 Contentful - CMS for Angular Progressive Web Apps
Contentful - CMS for Angular Progressive Web Apps
Fireship

The video introduces GitHub Copilot, an AI-powered tool for writing code faster, and explores its features and capabilities, including automatic code completion, predictive coding, and code synthesis. It also discusses the potential impact of AI-powered coding on the developer experience and the future of programming.

Key Takeaways
  1. Write a descriptive function name or comments to generate code automatically
  2. Define a function and let the AI predict the implementation details
  3. Cycle through different suggestions for implementing a function
  4. Set up an event listener on a button's click event to increment state
  5. Auto-complete comments and code based on the user's intention
💡 GitHub Copilot has the potential to revolutionize the way developers write code, making it faster and more efficient, but also raises questions about the future of programming and the role of human developers.

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
Up next
Blogging Is Dead! Don’t waste your time in 2026 ❌
Damini Tripathi
Watch →