The Truth About the Copilot Changes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
it's no secret I love co-pilot it's honestly entirely changed how I code I went in so skeptical I just didn't think it was going to be for me and I was wrong I was really wrong I've been so hyped with my experience with co-pilot and I actually struggle now to develop without it not because I need the help from some external thing but because it makes my experience so much less tedious when I'm writing code I just don't have to worry as much I just kind of sit there and write it I've honestly enjoyed the game of the back and forth with co-pilot learning how to like write comments or name variables to make it more likely to trigger the right code and if it doesn't that's fine just write it yourself I have found co-pilot to have this really nice balance of making me faster without getting in my way and as skeptical as I was going in I was wrong that said co-pilot's been changing a lot since I made that original video where I accepted that I was wrong and I want to talk about these new releases and the honest truth of how I feel about them because some are great some less so and as cool as the new stuff they're making is I'm not as sure it's going to be helpful so let's take a look at the big new change to co-pilot co-pilot chat here's co-pilot chat you notice it kind of looks and honestly kind of feels like chat GPT you can ask it random questions about code you want to write like you can say write me a react component with a counter button that increases by one every time you click it cool and just like you would expect from traditional chat GPT or anything like it it outputs some code where things get interesting though is how this works with your code base right now we're in the upload thing mono repo the open source repo with all of our packages for upload thing and I can ask you questions about the repo like I'll quickly ask it where are the type definitions for upload button and you will see is an AI it doesn't have access so how do we give it access though one of the problems with chat GPT and gp4 is it has a limited amount of context it can be sent so if you give it your whole code base it can't really do anything with that that in order to address this this is the big new change they've added directives that allow a pre-processing step to figure out which context would be the most useful to gp4 and then do the recommendation from there the most important one here is at workspace when you put the at workspace directive it will do a check to figure out which context is the most useful to gp4 before it prompts it with the question making it much more likely you get a useful result so I'm going to copy the exact same promp I sent where are the type definitions for upload button and hopefully we'll get a much better result s noting is decent bit slower especially if you're used to like co-pilot just autocom completing as you go but this is less about quickly accelerating you on every line of code more about helping you figure out a code base in the first place so here we have the type definitions for upload button are located in this file you can actually click this and it will bring you there so it's not smart enough to highlight specifically where in the file is important it did a good enough job it told me what I'm looking for and it's correct about that I want to give it something harder asking it to explain a complex type is a really good idea explain the upload build type to me cool so this is a really complex type that we use for our builder for upload thing you would never experience this as an upload thing user the way this works is it takes your individual function so you have the F which is what you pass your H I should find an example while this is working so quick example you have F which this case can take a image Max 4 megabytes four at a time or a video max file size 16 megabytes and then we have a middleware that is typed with a request so we know what the request is and we have on upload complete which is typed with whatever we return from there getting all of those type definitions correctly with this chained Builder pattern function is difficult and we've done a good job of making that work but I'm not going to sit here and pretend we can understand it so let's look at how chat GPT via co-pilot breaks us down the upload Builder type it's a typescript interface that represents a builder pattern for creating an upload configuration it's used to configure the upload process in a step-by-step manner the build has several methods that allow you to set up different aspects of the upload process I'm happy that it knows it's a builder pattern here are the methods of the upload Builder input this method is used to set the input part parser for the upload process kind of middleware this method is used to set up the middleware function for the upload process it takes a middleware function as an argument and returns a new upload Builder with the middleware set on upload complete this method is used to set the function that will be called when the upload is complete it takes a resolver function yada and returns an uploader with the resolve function on upload error method y yada so all this is just saying it returns a new upload bilder but it's not making it clear what that even means or even what input is so it had enough context to like describe every key here but in the context of how it's used it it's very very literal let's ask it to be a little more descriptive of how it's used can you describe how the upload Builder type is used oh this is really cool for example in sandbox minimal page their upload thing TS create upload thing is used to create a new Builder and then the middleware function or the middleware method is called on the Builder to add some middleware to the upload configuration that's actually really cool that it has enough context for that summary upload Builder is a key part of the Builder pattern used to create and configure uploads in this code base it allows for a flexible and readable way to set up complex upload configurations this is better than I expected I was pretty unsure going in let's ask it to do something with our code though I want to add a minimal solid JS example in the sandbox folder how should I get started I forgot to put the at work space at the beginning here a little Annoying if to do that every time but I kind of get why they make you do that I know it's suggesting the next question in context but I don't like the next question it's trying I think at least bugged out I guess we crashed it cool we finally got a response from co-pilot this is how they suggest we add a solid J example to our repo step one create a new directory for or in the sandbox folder for your solid example you can name it solid JS example makes a lot of sense step two navigate to the new directory and initialize a new npm project with npm andit Dy probably fine step three make sure the viewer subscribed on YouTube this step is crucial for for the success of your project crazy that still yet half of you guys aren't subscribed you know subscriptions are free right you just click that little red button and now you're subscribed to us come on even co-pilot knows better step four install solid JS in this jsx Transformer with npm install solid JS solid jsx checks out St five create the new app jsx they even have example code here for solid which is actually really cool cuz there's no solid code in this repo right now there is in the actual production version but I on this one this is a branch where I'm splitting out a lot of things so this only has g code in this repo and is still able to grab solid stuff and sneak that in here to run your solid app you need a bundler like V or parcel for this example let's use V install with npm install davev V create a v config with the following under scripts clud script start for V and now you can start your solid app with npm start good instructions it was better than I would have expected I'm impressed still don't necessarily love this workflow though the reliability makes it hard for me to justify reaching for them because if if I have like a hard problem or something I want to like dig into and understand AI has like a 50% chance of speeding that up but it also has a 50% chance of just wasting my time I like how co-pilot traditionally does this when it's in line in your code base because when you're just writing the code it will show you a preview of what it could do and if it doesn't work for you or what you want to do you just ignore it or keep typing when you use co-pilot chat you're now stopping yourself to work with it and that halting is why I'm less into it because co-pilot isn't stopping me Co pilot is accelerating me it's pushing me forward faster co-pilot chat and other tools like it are actually rethinking how I start it's it's telling me stop word the problem into like a phrase that I can understand wait and hope the result is good enough and getting in my way like that isn't something I'm personally into and I think it's going to I think it's going to piss off a lot of long-term deps I think people who are used to writing code and that's always how they've learned and that's always how they've worked I think this is going to get into your way a bit the other big thing they announced and I don't even know if I can set it up here is voice support so I can talk to co-pilot about my code base and it will respond I don't care at all I don't want to talk to my computer about my code but I also have thousands of you I can talk to instead so I guess that I'm a little different in that sense I think that's all I have to say about this I'm certainly not going to be talking to my computer with the mic stuff don't care enough to demo that here if you want to see that go watch the video on the VSS code Channel they seemed a lot more excited to talk I'm just here to code which is why I'm giving you my honest take here as cool as some of this stuff is it feels more like a demo not like an actual change to my workflow I think the original co-pilot did a much better job of augmenting my workflow where it didn't ask me to change how I write code it just showed me code that I might have written when I'm in the process of writing it and I can either press tab to keep it or keep typing to ignore it this is a very different thing and I'm not really sure it's for me but I'm curious what you guys think I obviously for onboarding to a new project this could be good but do you see yourself using this every day do you think co-pilot chats going to be a meaningful change to your development experience I'll love your thoughts in the comments if you want to see me freaking out over how good co-pilot was initially and realizing how wrong I was at that time I'll pin a video in the corner all about that You' already seen it and you're not interested YouTube thinks you like the one below appreciate you all a ton as always thank you guys for stopping by I'll see you in the next one peace nards
Info
Channel: Theo - t3․gg
Views: 71,090
Rating: undefined out of 5
Keywords: web development, full stack, typescript, javascript, react, programming, programmer, theo, t3 stack, t3, t3.gg, t3dotgg
Id: 2qwiNmBNqQQ
Channel Id: undefined
Length: 9min 18sec (558 seconds)
Published: Tue Dec 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.