ChatGPT: Will it replace .NET developer jobs?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
cat gbt is a new artificial intelligence model from open AI we're going to test to see how it writes.net code and whether our jobs has.net developers are at risk remember to hit the red subscribe button or go to youtube.com around the code to subscribe to our YouTube channel learn.net depends the injection and blazer webassembly with round the coats online courses go to roundthecode.com courses okay so let's get this thing a go so let's try and get it to write an e-commerce system with orders products and customers with asp.net core so build an e-commerce system with orders customers and products in asp.net core and I think we'll build it as a web API we'll put asp.net core web API and see what happens okay so it's having a think about it okay so yeah set up the development by installing.net core yep about a web API project in Visual Studio yet defining models as well so some suggestions about database SQL Server MySQL nosql Entity framework as well so far it's telling us the steps but it hasn't actually written us any code yet because it's going through a high level overview of what we need to do okay so it's given us a high level so it's told us to so it sold us to build the development environment install.net core SDK told us to build the web API project in Visual Studio to find the models think about databases my sequel seek server Entity framework as well integrate that the controllers and then yeah testing the API logic as well through test driven development okay so that's um can you write the classes for the models now remember here I'm not actually going to tell it about our previous conversation I'm hoping it's going to remember it so let's give it a go let's see if it can refer to the models as the models that it suggested in the last response ah here we go yeah here we go okay so it's generated this code here and I question the way it's done the orders so obviously the ID customer ID is fine but it's added a load of lists here like it's storing all the product IDs within the order which is a little bit strange I thought they would create an order item quantities as well why would you I suppose you'd need a list because it's related to the product IDs but that it almost it almost seems like it needs an order item here so I question some of the code for that customer again shipping address I'm surprised that is just one property as well but having said that if I was to put this into a net application I can't see any reason why that wouldn't compile so it's pretty good there I mean I'd also question why we've got public sets as well when a lot of these would potentially be read only but anyways it's it's a good start let's see if we can get it to split the order products into order items so split all the products into a new class called order items okay this is already better it's created a list of order items and now it's split the order items up into product ID quantity and price which is a lot better way of doing it and then it's just a recap in the classes that I'd already created for us yeah so we can already see here as well I just wanted to question it as to why it used a list over I list I just want to see how it responds to that yeah so it's a Concrete implementation of I list makes it easier to use and more convenient than an interface yeah quite it says up here the element access is faster which is quite a key thing because it already knows that it's a list and the memory overhead is lower compared to other implementations that use linked lists and some other data structure but it does say about mocking implementation of I list I suppose if you're inheriting list then I list may be potentially a better way of doing it but that's a good explanation so it's created the classes let's see if it can actually um create the controllers and we're going to be specific here for orders customers and products let's see how it gets on with this I was just questioning what was this R unit of work but I think that's something that's get yeah it looks like it's the service that's getting the data because I was like I've seen that when it was right and that's like what's this eye unit of work and it's like ah yeah that's where it's getting the data like there it's getting all the orders there that's getting the particular order by ID and head and creating an order so let's have a look at this then so yep it's using uh dependency injection there bringing in whatever this eye unit of work is we've come to the conclusion it's something to do that's something that's um trying to get the data for the um orders and everything else in there we're getting the orders that's relatively straightforward I mean I would question that that could probably all go on one line I don't know why you need to create a new instance but I'm picking there a little bit it's got the it's got the API controller attribute the amount of times I've forgotten about that is unbelievable and yeah it's got the right HTTP verb as well so getting the order again if it's if it can't find the order just return and not found yep can't see that's I can't see anything wrong with that if we go to create an order so again maybe question why we need two lines there why the commit can be as part of the ad async Maybe and then yeah it's returning the particular order but that looks good and yeah so it's using the HTTP post HTTP put for the update of the order I would arguably say you could potentially use a patch as well if you're just doing a partial update if you're only changing one bit but no that's pretty good it's doing a check on the ID as well making sure it's correct making sure it can be found and then yeah it's implementing customer order items um and then yeah committing the work I mean I'd say we could probably return some sort of response there just to ensure that it has been updated we can actually return a response to her as executing that and then delete yeah always a relatively simple one again maybe question why we need two methods there but again nitpicking then we got yeah customer controller getting the customers ah this is where it's gone a little bit wrong though it's sort of stopped halfway through right it's literally it's got to a point and then it's just given up maybe it's due to the um load that it's under but uh can you complete the question it's like it's just stopped halfway through and you complete the question as you stopped halfway through see if we can do it this time now it gets stuck it's got stuck again so maybe I'm asking it a little bit too much when it comes to writing the controllers that's okay let's see if we can get it to write some tests to next unit so yeah this is going through and testing our controllers but it's mocking up the unit of work which we've already established is where it's getting the data and then it's coming up with the orders making sure that it's returning an okay type so this is good for testing our controllers yeah okay so yeah in this instance it's returned a new order it's ensuring that when we call the get Autumn method in that controller it's returning an okay 200 response again it's got stuck so it's got part way through let's managed to do this test here so updating the order returning a bad request when the IDS do not match and that that looks like it's worked fine and it's literally just got stuck here but it seems to have a set limit on how much code it can write now again it could be down to the load I mean it's a Sunday afternoon there might be a lot of people using it testing it out I know it's become very popular but yeah it's um it's obviously coming very stuck what I'm going to get it to do now though is I'm going to get it to Define please can you define the classes in unit of work because so far it's just used it as an implementation I want to see how it sort of works it out so we can actually use it properly let's see how it gets on oh now it's some experiencing experiencing an error now maybe I'm breaking it a little bit let's give it another go so please can you define the classes in unit of work oh no I'm I think I'm breaking it I think I'm breaking it okay I'm gonna have to wait a bit okay I'm gonna I'm gonna eat off a bit on it I'm gonna ask what front end technology should I use no it's still it's still good still too many requests I just need to give it time to armed out to slow down sort itself out okay I keep on trying all these requests but it seems like there's just too many requests at the moment for it to deal with what we can do though is we can use Visual Studio I'm going to go ahead and create a visual studio project we're going to test out some of the code right we'll select web API pulling it around the code dot chat GPT so good dot Net 7 and yeah we'll leave the rest of that and we'll go ahead and create it okay so let's go so it can really complete the orders but if we go up I wanted to see first of all if this all works so we'll just put it all in one file I know it's bad practice but it will speed things up a bit we just put it in classes folder right a new class and we will call it office I'm just going to copy that all in so yeah that's relatively straightforward I wasn't expecting it to have any major issues and I'm sure if we build it now it will build absolutely fine and we can see there yep one succeeded so I failed we know that it's built go ahead and create that order controller that it managed to create for us let's go back to the window let's go down and find it here we go now one thing it won't do is compile the i unit interface you can see here oh a bit of a typo there it's not going to compile that but can we see any other issues with it that's a bit smaller so you can see it so yeah we've got an issue there with the eye unit work other than that seems to be compiling pretty well I don't see any other potential issues so yeah it's certainly a very good guide let's see if we can get it to work again and see if it's um see if the demand has slowed down now and this um unfortunately there's too much demand at the moment it's unable to keep up with with the requests as impressive as it is chat TPT is only really used as a guide at this stage it needs the.net developer to question its code quality therefore our job says.net developers aren't our immediate risk but what about the future thanks very much for watching and hit a like on the video
Info
Channel: Round The Code
Views: 4,326
Rating: undefined out of 5
Keywords: chatgpt examples, chatgpt review, chatgpt answers, chatgpt .NET, is chatgpt threat to human jobs?, chatgpt openai, chatgpt playground, openai gpt, openai login, openai model, chatgpt write code, artificial intelligence, artificial intelligence model, artificial intelligence .net, chatgpt coding
Id: 9SLOyGI3X18
Channel Id: undefined
Length: 16min 20sec (980 seconds)
Published: Sun Dec 18 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.