Copilot X Is Here and I Just Tried It in VS Code

Copilot X Is Here and I Just Tried It in VS Code


Copilot X Is Here and I Just Tried It in VS Code

Are you curious about the next generation of AI tools for code generation? Introducing Copilot X, an advanced enhancement to the well-regarded GitHub Copilot. This video offers a detailed exploration of the capabilities and use cases of Copilot X and its key component, Copilot Chat.
As an evolved iteration of GitHub Copilot, Copilot X brings new potential for generating larger portions of code, refactoring classes and methods, and providing coverage with unit tests. It demonstrates how AI is increasingly shaping the landscape of programming and code development.
Witness firsthand how Copilot X interacts seamlessly with Visual Studio Code and learn about its context-aware conversation feature, a remarkable tool that lets you refine requirements until you reach an acceptable portion of generated code.
Please note that, despite the impressive capabilities of Copilot X and Copilot Chat, they do not replace the vital role of a developer in writing code. Rather, they serve as powerful allies, aiding in efficiency and accuracy.
Join me in this video to discover how Copilot X and Copilot Chat can contribute to your programming toolkit. Explore their unique features and learn how to integrate them into your development process.

Become a patron and help maintain this channel: https://www.patreon.com/ZoranHorvat

Thank you so much for watching! Please like, comment \u0026 share this video as it helps me a ton!! Don’t forget to subscribe to my channel for more amazing videos and make sure to hit the bell icon to never miss any updates.🔥❤️

✅🔔 Become a patron ► https://www.patreon.com/ZoranHorvat
✅🔔 Subscribe ►    / @zoran-horvat  
⭐ Learn more from video courses:
Beginning Object-oriented Programming with C# ► https://codinghelmet.com/go/beginning
⭐ Collections and Generics in C# ► https://codinghelmet.com/go/collectio
⭐ Making Your C# Code More Object-oriented ► https://codinghelmet.com/go/making-yo
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
⚡️ Have a look at our other Videos :

👉 Using GitHub Copilot to Write Complex Code | Step-by-step Tutorial ►    • Using GitHub Copilot to Write Complex…  
👉 Coding with GitHub Copilot - Beginner to Master | VS Code Demo ►    • A Comprehensive Guide to GitHub Copil…  
👉 What is Covariance and Contravariance in C# ►    • What is Covariance and Contravariance…  
How to Initialize a Clean ASP.NET Core Project with Entity Framework Core and Identity ►    • How to Initialize a Clean ASP.NET Cor…  
👉 The Null Conundrum: A Guide to Optional Objects in C# ►    • How to Avoid Null Reference Exception…  

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
⭐ CONNECT WITH ME 📱👨

🌐Become a patron ► https://www.patreon.com/ZoranHorvat
🌐Buy me a Coffee ► https://ko-fi.com/zoranhorvat
🗳 Pluralsight Courses ► https://codinghelmet.com/go/pluralsight
📸 Udemy Courses ► https://codinghelmet.com/go/udemy
📸 Join me on Twitter ► https://twitter.com/zoranh75
🌐 Read my Articles ► https://codinghelmet.com/articles
📸 Join me on LinkedIn ► https://www.linkedin.com/in/zoran-hor
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
👨 About Me 👨
Hi, I’m Zoran, I have more than 20 years of experience as a software developer, architect, team lead, and more. I have been programming in C# since its inception in the early 2000s. Since 2017 I have started publishing professional video courses at Pluralsight and Udemy and by this point, there are over 100 hours of the highest-quality videos you can watch on those platforms. On my YouTube channel, you can find shorter video forms focused on clarifying practical issues in coding, design, and architecture of .NET applications.❤️
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
⚡️RIGHT NOTICE:
The Copyright Laws of the United States recognize a “fair use” of copyrighted content. Section 107 of the U.S. Copyright Act states: “Notwithstanding the provisions of sections 106 and 106A, the fair use of a copyrighted work, including such use by reproduction in copies or phono records or by any other means specified by that section, for purposes such as criticism, comment, news reporting, teaching (including multiple copies for classroom use), scholarship, or research, is not an infringement of copyright.” This video and our youtube channel, in general, may contain certain copyrighted works that were not specifically authorised to be used by the copyright holder(s), but which we believe in good faith are protected by federal law and the Fair use doctrine for one or more of the reasons noted above.

⭐For copyright or any inquiries, please contact us at [email protected]

#githubcopilot #vscode #csharp


Content

0.48 -> Copilot X is here, adding many new  capabilities to the GitHub Copilot AI tool. 
6.54 -> It can now write larger portions of code  at once, refactor your classes and methods,  
12.9 -> and even cover them with unit tests. But as you will quickly learn,  
18 -> Copilot X is not magical. It will still be your job to write that code. 
24.96 -> I will now show you the first steps of using  Copilot Chat inside Visual Studio Code. 
30.48 -> You will see how you can make it run and what  you can expect when you try it for the first  
35.64 -> time on a realistic business application. The journey begins at this address. 
41.22 -> Copilot X is a set of AI  tools on top of the Copilot. 
46.62 -> Some of those X tools are introduced on this  page and I expected more will come in the future. 
53.34 -> And all these tools require the basic  Copilot to be already installed. 
59.4 -> Remember, Copilot is a paid tool, so  you need to figure that out first. 
64.56 -> I have a couple of videos already on  Copilot and in this video I will only  
70.14 -> talk about Copilot X and, more specifically,  Copilot Chat as the most prominent example of  
78.12 -> those tools added to the Copilot. This is what Chat will look like. 
83.28 -> You will see it in a minute in Visual  Studio Code, when I will start using it. 
88.62 -> As it says, it is the context aware conversation. You can chat with it, refine your requirements and  
96.42 -> let it write a larger portion of code  before applying it to your code base. 
100.98 -> Copilot Chat is still in the preview stage. It is not released yet publicly,  
107.22 -> and you can sign up for the wait list. I will get back to this point in a minute. 
112.62 -> Before that let me show you some other  tools that are advertised on this page. 
117.6 -> Another tool, that will supposedly  write the documentation for your code. 
123.18 -> I have enlisted there as well and, when they  let me in, I might show you what it does. 
129.12 -> The next tool documenting pull requests. Now, beware of this one. 
134.28 -> It will supposedly write the details about  your pull requests based on what you have  
140.58 -> changed in that pull request. That is another waitlist. 
144.84 -> I didn't enlist to this yet and  it is per repository this time. 
150.96 -> And there will be some command line  support, so you will be able to ask  
155.46 -> Copilot X to help you at the terminal. So, your journey with Copilot X and  
162.84 -> Copilot Chat will start here. If you want to try it, press this  
167.58 -> button here and sign up for preview. I did that some two months ago,  
173.4 -> maybe a week less, I don't remember well. And I'm in as you can see, I am in,  
180.18 -> and I am eager to start using it. This is my copy of Visual Studio Code. 
186.84 -> These are the extensions I have here. There must be the Copilot extension  
191.88 -> somewhere there, yes, here it is. And remember, you must have the Copilot  
196.44 -> installed in your Visual Studio Code before  you start using Copilot Chat, for example. 
203.22 -> All those additional tools work  on top of the basic Copilot tool. 
208.56 -> I'm not going to give you any advice on that. It is your personal preference whether you will  
214.5 -> use these tools that are working with code, that  are potentially exposing your code to public. 
220.92 -> I'm not giving you any advice on that. Consult within your company, do whatever you  
225.9 -> must before you opt to use any of these tools. Now, assuming that you did choose to use them,  
233.88 -> you will add Copilot Chat extension to your  Visual Studio Code, hoping to get that chat. 
242.22 -> Now, here's the extension. It is pre-release, as you can see. 
247.44 -> It offers release but if you try to install  it, it will break, nothing will install. 
253.98 -> So, I will install the  pre-release version instead. 
258.78 -> Here it is. And, where is my chat? 
263.82 -> There should be a chat tool  here, but there is none. 
266.88 -> It turned out that it doesn't work with  the regular Visual Studio Code, yet. 
273.18 -> But it does work with Visual  Studio Code Insiders build. 
278.52 -> So, what you will need to do, if you  want to try Copilot Chat, is to install  
286.26 -> VS Code Insiders side by side with  regular VS Code and use it there. 
293.04 -> This is the page from which I  have downloaded it, installed it,  
297.48 -> and here it is, the VS Code Insiders build. And let me search for Copilot Chat again. 
304.32 -> Here it is, the pre-release version. I'm installing it and here is the  
310.44 -> novelty - the chat tool. That is Copilot Chat. 
315.6 -> And I already have an idea what I want to ask it. Let me show you. 
321 -> There's a lot of code in this  application I have opened and,  
324.96 -> for example, it has classes modeling money. I have developed these classes in the previous  
330.72 -> video dedicated to the Null Object pattern. You can watch that video. 
335.1 -> And that's how these couple of classes  and the interface appeared in this code. 
340.38 -> But these classes are flawed and I want  Copilot Chat to help me find and fix the flaw. 
347.52 -> Now, instead of explaining that further,  let me use Copilot Chat for that. 
356.1 -> Let me start: Please explain how  IMoney, NoMoney and Money types work. 
362.34 -> What is it saying? Sorry, but I can only assist  
365.34 -> with programming related question. What my question was? 
368.82 -> This gave me a moment of thinking. I was confused but I think I  
375.66 -> figured out what's the problem. Let me repeat the question, adding  
382.08 -> "in this project". This begins to look better. 
387.42 -> Alright, I will move this window to the editor. And here's what it says: IMoney is an interface  
396.18 -> in the bookstore, etc., etc., that defines a set  of methods for performing arithmetic operations  
404.16 -> on monetary values. That's nice. 
407.58 -> NoMoney is a class that implements the IMoney,  etc., representing a zero monetary value. 
413.7 -> It is a Singleton class. And the Money is a  
417.66 -> concrete class that implements the IMoney  interface and represents a monetary value. 
422.34 -> It has a constructor, etc. In summary, IMoney is an interface  
426.9 -> that defines a set of methods for performing  arithmetic operations on monetary values. 
432.66 -> Alright, I can accept this explanation  of what these classes are doing. 
437.52 -> What Copilot Chat has missed to mention  here, I think, I don't see it mentioned,  
445.26 -> is that Money class should not be used when  the amount is zero, because it is adding  
453.24 -> constraints on the currency and currency  is not relevant when there is no money. 
460.74 -> That's why I have the other class,  NoMoney, in the first place. 
465.36 -> Let's get to the point. Now, I'm going to start asking questions. 
471.36 -> This code has a problem when  Money class is instantiated  
476.22 -> with zero amount and non-empty currency. That is meant to be an instance of NoMoney,  
484.74 -> but Money constructor allows creation  of clearly impossible Money objects. 
493.08 -> Can you please suggest a fix? Let's see. 
497.46 -> And, here, it is suggesting some code. The first look is positive, it looks good. 
503.04 -> I see that the Copilot has separated  constructor from the factory. 
508.44 -> That is a nice idea. That is precisely what  
511.92 -> I had in mind, to introduce a factory which  will select whether to instantiate one class  
517.8 -> or the other, depending on the argument values. There would be some work to do to brush this up. 
523.44 -> It is a good starting point. Thank you, Copilot. 
528.12 -> I'm trying to be polite to machines because  once they take over they might leave me alive. 
533.7 -> More! - what else you can do with Copilot Chat? 
537.96 -> You can use it on an entire file. You can open a source code file, go to the  
545.46 -> chat and start asking questions about that file. For example, you can ask it to refactor your code. 
551.22 -> I might make a video in the  future about that alone. 
554.64 -> Now, before I show you the next feature  of Copilot Chat - writing unit tests - I  
561.96 -> want to ask you for a favor. If you liked this video,  
565.08 -> then please press the Like button. That will help other viewers find it. 
569.16 -> And if you want to support my channel  and help it remain free for everyone,  
576.72 -> you can become a sponsor. You can visit me at Patreon. 
581.28 -> There is the link in the description. Please visit me there and become sponsor of  
586.38 -> this channel if you like it so much, thank you. Now let's continue. 
590.94 -> You can also apply commands to the chat window  like a slash and then typing in "clear". 
597.6 -> Or, test - the chat window is helping  me with these commands: it's "tests". 
603.72 -> It will write the tests for the class that is  opened at the same time in the editor window. 
610.02 -> Copilot has just written some unit tests for me. Let me check it out. 
614.52 -> I see its point. Here, it's testing construction logic, alright. 
620.22 -> And here is the test for adding money. I'm not entirely satisfied with what I see here. 
627.3 -> I would write it differently. But a good point about Copilot  
632.34 -> Chat is that now you can continue talking to  it about that same code it just generated. 
639.42 -> Can you please group related  tests into theories using XUnit? 
646.86 -> I want more test cases but less methods. And here, it's doing that. 
653.94 -> This is a different set of tests this time. I like it but I see a problem here. 
660.78 -> Let me ask Copilot about that. So, I'm continuing this conversation,  
665.28 -> I'm trying to get the code that will  be both good in what I'm asking it  
671.28 -> to be and syntactically correct, of course. I believe the code will not compile because  
676.8 -> attribute parameters must be compile-time  constants, for example currency USD. 
683.4 -> Can you please fix that? Let me see,  
689.64 -> Copilot has changed the source, not to the tests. 
695.58 -> And I saw some enum above, whoa whoa why,  what's happening, why is it doing it that way? 
702.84 -> Okay, so, I will stop here. I see that there will be a lot of  
706.74 -> work to put it back on track, onto what I wanted  it to do, not what it might find, just to compile. 
715.92 -> There will be a lot of work to do alright. Let me stop this with another polite message:  
722.52 -> Not like that, but thank you for trying. What is it? what is it saying? 
730.62 -> Oh, the tool is becoming passive aggressive now. What did you mean by "fix that"? 
737.22 -> Well I meant you fix it! Alright, before I start fighting with the machine,  
743.82 -> what Copilot said here is actually right. What did I mean with "can you please fix that"? 
750.78 -> What would you do as a programmer  if somebody told you "go fix that"? 
756.3 -> You would probably come up with some  code that supposedly fixes that. 
761.88 -> And then that someone else says  "oh that's not what I meant". 
765.96 -> Alright, but what did you mean? What did I mean when I said "fix that"? 
771.78 -> That gives us a hint about  AI tools that generate code. 
779.7 -> Those tools do not read your mind. 
783.96 -> You must specify your requirements,  and you must specify them well. 
789.24 -> Sometimes so deeply and so precisely that  it turns out that it is easier to write code  
797.52 -> than to specify it to the tool. Now start thinking about that. 
802.5 -> There will be more videos about Copilot Chat. I like the first look of it. 
807.18 -> You can try it. Obtain access, install it and play with it! 
811.92 -> Try it out on your pet code, you don't  have to use it in production code, yet. 
817.74 -> Just try it out, see what it can do for you. Like this video, subscribe to my channel,  
823.2 -> become the sponsor at Patreon  and see you in the next episode.

Source: https://www.youtube.com/watch?v=8tz7h6G4vXc