I let GitHub Copilot be the Pilot for my C# code

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

> inb4 inevitable "programmer jobs are at risk"

This alarm has been sounded anytime a tool that made programming easier came along for the last 20 years. The opposite has always been true. Github copilot will not make you understand the underlying concepts of the code that it auto completes, and therefore isn't much better than copying and pasting off stack overflow in terms of writing quality software.

I've seen co workers struggle to write code, completely ignoring perfectly valid Github copilot suggestions simply because they did not understand the language or the feature they were working on properly.

Github copilot only makes your more efficient at what you know, it does not solve problems or code solutions for you.

EDIT: This is not to say that programmer jobs aren't at risk from AI - they are, just not right now and probably not before AI can automate away almost every other job.

πŸ‘οΈŽ︎ 95 πŸ‘€οΈŽ︎ u/styke πŸ“…οΈŽ︎ Nov 03 2021 πŸ—«︎ replies

If anyone out there wants to try a similar tool to this but for shorter code snippets try tabnine. It's already free and publically available, been using it for a month now and it's made me significantly faster at my job.

πŸ‘οΈŽ︎ 9 πŸ‘€οΈŽ︎ u/TorontoIndieFan πŸ“…οΈŽ︎ Nov 03 2021 πŸ—«︎ replies

I was using this earlier today while messing around on some LeetCode problems.

If you let it, it basically gives you the answers outright.

I mostly used it for filling out the annoying little helper functions that we've all had to write out a million times. Write the name, maybe a simple comment, and BAM an answer pops out that is 90% of the time correct.

πŸ‘οΈŽ︎ 10 πŸ‘€οΈŽ︎ u/vicda πŸ“…οΈŽ︎ Nov 03 2021 πŸ—«︎ replies

Benefits: Ease of entry and baseline quality of code will likely go up

Detriments: Fewer creative solutions, less job security and more risk of outsourcing, and any oversights or security flaws replicated across a wide variety of software

πŸ‘οΈŽ︎ 16 πŸ‘€οΈŽ︎ u/Pb2Au πŸ“…οΈŽ︎ Nov 03 2021 πŸ—«︎ replies

Programmers are both smart enough and dumb enough to replace ourselves with AI.

πŸ‘οΈŽ︎ 7 πŸ‘€οΈŽ︎ u/[deleted] πŸ“…οΈŽ︎ Nov 03 2021 πŸ—«︎ replies

My real comment is: this looks pretty cool.

My snarky comment would be: "what are you doing, Dave?"

πŸ‘οΈŽ︎ 3 πŸ‘€οΈŽ︎ u/DaveDegas πŸ“…οΈŽ︎ Nov 04 2021 πŸ—«︎ replies

Honestly what he's showing here isn't that impressive because all of this stuff has been done to death. There's a plethora of example project and tutorials that show exactly what you need to do implement these examples. Essentially what Copilot is doing here is guessing which code to copy paste, to be fair the guesses are good though.

The CRUD service is a poor example because in many cases you could just switch it out with a GraphQL service and then as a back-end developer you get to focus on the important stuff. And also CRUD services usually aren't all that complex.

What would be interesting to know is how Copilot performance when you're implementing complex business logic in a service.

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/FunkyForceFive πŸ“…οΈŽ︎ Nov 05 2021 πŸ—«︎ replies

It’s a tool and almost any tool needs a human element.

πŸ‘οΈŽ︎ 4 πŸ‘€οΈŽ︎ u/TheDeadlySquid πŸ“…οΈŽ︎ Nov 03 2021 πŸ—«︎ replies

this is nothing more than a glorified code snippet engine

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/Zlodo2 πŸ“…οΈŽ︎ Nov 03 2021 πŸ—«︎ replies
Captions
hello everybody i'm in this video i'm so excited because i finally got accepted into the technical preview for github co-pilot in case you don't know what github compilot is it is effectively an ai assistant when it comes to coding where it will auto complete or suggest completions for you based on what it thinks you need and it's trained on github in literally thousands of repositories it's not really officially supported in csharp on.net or right during that matter but because they added support for intellij idea which is a jetbrains id because they all share the same api for plugins you can go straight to the marketplace and install it in rider and i can now have github corp pilot in ryder which is awesome in this video i'm gonna try to see a theoretical and a practical example and see how well it does and maybe in future videos when support becomes better we'll see how it plays out i'm also gonna start using it actively from now on on every video and let it train on my uh code bases and see if i don't know a month or two months down the road it is actually better if you like a type of content and you want to see more make sure you subscribe and get a notification bell to get alerted when i upload a new video so i'm going to go here and i have nothing but what i want to do is i'm going to go ahead and create a binary search tree now this is your typical algorithmic like data structure question answer where a binary search tree is a data structure that has two lyft nodes per node and it's ordered in a very specific way from left to right you have smaller values and bigger values and that is the benefit because you can now if you have for example 10 million entries in that tree you only have to go i think 30 layers deep to find the value you want it's very efficient very fast so i just specified the the name of the binaries h3 and maybe i'm going to specify a binary set stream node or it can be just anything it can be just node right now as you can see no autocomplete because i don't think it has enough context to be like very smart about total complete but what i can do is i can open the github code pilot window and then it gives me a bunch of suggestions on what it thinks i need and i can then choose in writer what i want and this one looks pretty good this looks like a binary set stream node you have the left node and you have the right node great so we're going to go now on the binaries history and i'm going to do the same but i'm going to use the key binding for that so let's do this opens the window it will try and think what i need i i'm assuming based on the class name and yeah here we go and it generated some stuff here oh this suggestion looks good in certain note this looks decent as well let's go with this one so we have the root node it starts with nothing it does a comparison oh the values are strings so we don't want that we want the values to be integers so we're gonna have to change that but other than that it wasn't that off insert yeah find it doesn't have a delete i don't think but that's fine we can work this out why don't you like this you don't like this because oh that's a string as well maybe that's where it picked up the value thing okay so we have a binary side string now so if i go here and say bst equals new binary string and do bst dot insert why not five i'm going to insert a few things so five six nine four two let's say zero and then give it like a big number as well like 84 something like that now i want to print that and binary sets trees should be printed in order so it doesn't have a print method so let's go ahead and create a print method so oh it doesn't have a delete method either so let's accept that what is he trying to do uh sure we don't have to find men okay you drive print sure i want to do that print okay i don't really know how to code but you do fine can i print this let's run this this should be now in order zero two four five yep that's that looks like a a binary tree printed in the right order can i can i let's see how delete works bst dot delete let's say i wanna delete delete nine from here and then print it again let's do that yep nine was so stupid i'm so stupid clearly because i wouldn't know how to do this okay uh bst does i'm getting into google tomorrow let's say i want to find something so i want to find 6 if it exists let's do console.writeline find and then let's yeah i wanted to do find 9 because 9 should have been deleted and i want to say how the hell does it okay that's so weird i didn't want to print the note i want to print oh it returns a node okay so i guess if it's null good try actually good suggestion that is why don't you do this for this though as well you do that's so stupid i'm so glad i didn't script this video this is so hilarious it it works okay so i won't i won't focus too much on this because am i turning red because i'm feeling uncomfortable with how good it is i'm gonna move forward to a more practical example let's go ahead and create an api project jesus christ i have an old template i won't try to use minimal apis here because there's no way it's been trained in enough minimal api code to actually give a good example so i'm going to just create the old structured api um and let's make sure it doesn't have any nullable reference types it doesn't great so we have the weather controller and whatnot what i want to do is i want to effectively delete that and i'm gonna create a new controller i'm gonna create a people controller let's say i'm actually you know doing the job will it suggest something here no what if i tell it to like think about it oh okay some some suggestions here this looks good yes i like this i mean yeah this looks like something i could work with now i want this to be a controller base do you know what i want here i want an api controller i wish you new api controller fine so let's go ahead and create the services directory this is so stupid i love it and then let's create a models folder as well so let's go into services and create and i people service it's taking three last time and do you know what i want no i don't want to string get people but good try do you have any other suggestions yep that that one looks pretty good i'll go with that i didn't even need to think about it let's go ahead and create a person class do you know what that what yep i can work with that do you know like can you give me more maybe address i can work with that as well see yeah sure siri why not state zip it keeps going i'm gonna okay i'm gonna delete that okay he's fine i don't need that just this this works you know what i also want an id do you have an id no i don't want that okay and the id should be good if it knows that the idea is good will it generate that but with good instead let's see let's delete that and let's give it a shot so it's pre-generated so i don't think this will change no it's fine okay whatever so let's just change this to id now i wouldn't necessarily name this get person get create pests and i would just remove the people's last person thing because i'm already in an i people service situation but it's good that it you know it's content aware now i could implement missing members using the id but does it know what i want what i really really want no it does it has no idea fine uh let's implement those do you know what i want here good good try i'm gonna make it a bit easier for you i'm gonna create a private read-only dictionary of good and person and i'm going to call that people equals new now do you know what i want yes that's what i want the change the thing changed based on the context sure that's exactly what i want man this is so good uh well it is searching by name it didn't even see that yes i i never intended for that to be a method but great this would work fine now is this like domain level right like do you want to get the first person matching your name let's not worry about that create person this is so cool yes interesting it will just fully update the object and set it id i guess technically that's right you can also do a property for property mapping to that and then set that updated value but who cares this is pretty good and then delete man i'm only pressing tab in this video i don't even code anymore anyway so we have that and now we have that can it generate the rest of the methods get by id well this is a good but good try but you didn't generate no you didn't generate the attributes maybe if i try and guide it a bit yes i didn't even do anything it just automatically did it get people yeah is it a task no i knew oh it's an action result okay so this should be okay fine then yep sure this again this is a good but good try yes i want to create close enough create person if it if it could see and like try to think based on what i have in there they'll be so much better but it's not doing a bad job by no means this is nutty this is a void okay fine you wouldn't i mean you wouldn't want to return like okay here you would return create and then use the uri um or uri and here for deleted you might want to return a different response but overall this just made an api not id dispressed out this is insane you know i i really don't want to stand too much on this because i'm now just excited to see what else it can do this is really practical stuff you know the first example very generic i would expect to get it right but to build an api i like to have a credit api from scratch without needing to do anything then press tab and maybe just give it a bit of like instructions oh and and on the instructions thing you can go even further right you you don't have to to limit yourself to binary size trees if i say is buzz or something for for yeah maybe okay here you go it just generates the fizzbuzz because it understood from the comment that i wanted a fizzbuzz here you go that's so cool can i make like a game type of thing console game actually no okay so create a calculator i will you later no i don't want comments no number you know what i'll play your game let's go ahead and create a public class calculator autocompleted now all of it i don't even want to have to type a single method be smart about yeah i want yeah i'll i'll leave it here i good video that's all i have for you for this video thank you very much for watching special thanks to my patreons for making these videos possible if you want to support me as well you're going to find a link in the description down below leave a like if you like this video subscribe for more in the like edition in the bell as well i'll see you in the next video keep coding
Info
Channel: Nick Chapsas
Views: 213,107
Rating: undefined out of 5
Keywords: Elfocrash, elfo, coding, .netcore, dot net, core, C#, how to code, tutorial, development, software engineering, microsoft, microsoft mvp, .net core, nick chapsas, chapsas, clean code, dotnet, github copilot, github co-pilot, copilot, github c#, github, github copilot C#, github copilot .net
Id: XceIKXeIrD0
Channel Id: undefined
Length: 13min 59sec (839 seconds)
Published: Mon Nov 01 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.