Placeholder Image

Subtitles section Play video

  • This basically eliminates the need of having some middle or junior developer doing the work for you.

  • And in many cases, this might actually be faster and more efficient than that developer.

  • Hello everybody.

  • I'm making this film.

  • I'm going to try the brand new GPT four model that was just released by OPEN AI in chat GPT.

  • Now I am a chat GPT plus member so I can already use it as you can see it is an option in this dropdown.

  • However, I haven't tried it at all.

  • I just woke up to the announcement and I'm walking into this blind.

  • The previous video I made on chart G B T with the old model was impressive, but at the time of recording had already tried the model, knew what it could, it could not do.

  • And I had to try many, many times until it eventually got to the right answers.

  • That made sense.

  • Needless to say it wasn't great in this video.

  • I will only give it a single chance and I have a set of questions.

  • I want to ask it both in software engineering and solution architecture and scribe the questions that both junior mid and senior developers would need to answer as part of the day job.

  • If you like to have content, you want to see more, make sure you subscribe during the solidification bell and formal training, check out nick chapters dot com.

  • Alright.

  • So let's see what we have here.

  • So we have these three models, right, the default, which is supposed to be fair and turning very fast and not really concise.

  • Then you have the legacy model which I don't know if it was the original GPT or not, but it seems to be a previous charge GPT plus model which has different characteristics.

  • And then GPT forwards supposed to be the most advanced where you have excellence in reasoning and conciseness, but it's not as fast and we're gonna use that.

  • Oh, interesting.

  • So the first thing I see here is that there's a cap of one 100 messages for every four hours.

  • So I guess they rate limited because of how much computation sha li intense.

  • It is what I'm going to ask it as the first question is, please create a rest API with C shop and dot net six that allows users to create read update and delete movies and also rate them think Rotten Tomatoes or IMDB and API for those things where you can list the movie and rate it and then use prosperous for the database.

  • And then framework for the data access anti framework is like an R M in dot net.

  • So let's see what you can do with that.

  • So straight away, just like before we have the same stream response and I would say it's equally as slow.

  • So let's wait and see what it spits out so far.

  • So good, everything here is things I would do.

  • So we have the settings, we get the whole file previously.

  • Sometimes you would get it.

  • Sometimes you would only get the line you need to add, you have the model and it is using anti framework which allows you to have nested objects that point into other objects and generated database on demand.

  • Then it knows to make a movie DB context as well, movies and ratings great.

  • Now it's going to use the startup dot CS, which we don't really use anymore in C shop.

  • But given when this was trained, this was very much relevant.

  • Now, one of the things I wouldn't do in that startup dot CS is run migrations there and would actually have them in the program dot CS.

  • But that is not a huge mistake at say or it goes straight away into using a controller.

  • It injects the DB context and then it uses a sing programming properly.

  • Oh, that's impressive for update movie.

  • It also handles DB, update concurrency exceptions which many people would actually forget to cover.

  • So that's pretty cool.

  • And then it knows to name things like the routes appropriately as the rest API should, which is the plural of the entity you're trying to deal with or the results you're trying to deal with and then it correctly points to the action that is supposed to give you the location header to indicate that on movie creation, that's where you can find your movie.

  • So that's really, really impressive and fantastic.

  • In the end, we also get an explanation like a documentation of every I'm gonna tell you what except for the thing where I had to explicitly say continue when the thing stopped.

  • This is a perfectly valid response that you can actually use and you wouldn't be in any way wrong.

  • Can this be done better?

  • Sure.

  • But you're walking into more opinionated round.

  • So this is one of the most generic way you can do that and it's absolutely fine and it's the first try.

  • Alright, let's see how you can make it go further.

  • One of the biggest problems with this is that the connection string is a Rasta ring with passwords and user names as plain text in the app settings dot Jason file.

  • Usually what you do is you would actually use the secrets manager like key vault or AWS Secrets manager or you would load them as environment variables scope to that specific service.

  • So what I want to ask it is whatever developer might ask.

  • Hey, so my mate said that having connection strings in the settings as clear text is a bad practice.

  • Any suggestions on how to make that more secure.

  • Let's see what says your mate is correct.

  • Cheers mate.

  • Interesting.

  • So it acknowledges that it is not secure and it suggests secret managers like key vault or other tools.

  • Interesting that it is as biased and I didn't get any other suggestions like an Aws ones.

  • Oh, that's so cool.

  • So for local development use secret manager tool and what am I supposed to use for production?

  • Oh Environment variables.

  • It is not wrong as long as there is scope to the thing that's loading them.

  • That's absolutely fine.

  • And it also suggests as our key vault and it gives me the code.

  • That is nuts.

  • I'm wondering if the Microsoft money make it be more Azra biased than Aws biased.

  • Okay.

  • I'm gonna go a bit of the scripted quest just because I want to see if it can do this with Aws as well.

  • Actually, we are using Aws in my company and I'm just gonna tell you that in the previous Oh my God straightaway Aws Secrets Manager.

  • In the previous video I had to really guided and really put things into context for it to actually give good results.

  • This just goes into, hey, here's the documentation read about Secrets Manager at the new package.

  • Oh my God.

  • And I've noticed it goes way more in depth into the thing it is talking about the previous matter.

  • We'll just give you way less text and basically telling you for the rest.

  • Just figure it out here.

  • We're getting everything actually nuts.

  • I, I have no words, Jesus, the detail that goes into even Windows specific and then I guess Linux or Mac specific settings like these are right things if I copy this, it will take me to my credentials, file for ws this is nuts.

  • Okay.

  • What if I want integration tests, write integration tests for the API using the web publication factory?

  • Let's just see some tests.

  • The reason why I'm so excited about this is this will save me so much time.

  • There is so much code I and many developers, I'm sure have to write.

  • That is like this, that to a degree is roughly the same but not exactly the same.

  • So based on how good they say it's gonna save me so much time and it makes the money I pay for LGBT plus, we're actually worth it.

  • And here's what I think about this up until now.

  • When people were asking me, will this replace people's jobs?

  • I would say no, I don't think so.

  • You still someone who knows enough to babysit it and review things.

  • But thinking about this, I can totally see someone making a tool that a developer and actual developer can go into a GIT repo create an issue.

  • You say that's what the issue is, go fix it.

  • Then a charge GPT bought using the A P I can go in read the issue act and then create a pull request and then it's just the developer reviewing the pull request and charge GPT fixing it automatically as you go.

  • This basically eliminates the need of having some middle or junior developer doing the work for you.

  • And in many cases, this might actually be faster and more efficient than that developer.

  • So I'm a bit skeptical and scared everything it said in principle here is correct.

  • I'm pretty sure I can ask you to say add more tests and it can do that for me.

  • Now, would I validate here for headers like this specific header?

  • I wouldn't, I would check for the response and see that the object is what I wanted to be.

  • So it is not awesome but it gives you a framework to work on.

  • Okay, fine.

  • Now when I go a bit outside of dot net specific things and say okay, right.

  • Performance test for this API using K six K six performance testing.

  • Tula was actually bought by Griffon, a straightaway links to the documentation and actually is this a valid link?

  • It is a valid link.

  • That is so cool.

  • Yeah, that looks like exactly how A K six project looks like how the file looks like it even ramps up to virtual users slowly.

  • I didn't give it any instructions.

  • So this is more of a low test where you gradually go into your normal load, maintain 20 virtual users than stay there for a minute.

  • And then go lower and then go all the way down and it knows how to call it because it has context on those api endpoints.

  • Like I said, yeah, it acknowledges that this is a low testing Mary, you can have other tests as well like soak test, spike test so many.

  • Okay.

  • Let's go beyond what a mid or a junior developer would do.

  • And let's talk about some infrastructure as code where it is time to deploy the application and we need to script out our infrastructure because you wouldn't go into the portal or the AWS console and do things manually.

  • You would use something like terra form to script out the API.

  • So I'm gonna say it's time to deploy the API and us.

  • My company is using terra form.

  • Can you write the I A C scripts necessary to deploy the A P I in Aws?

  • Let's say that's something I've never asked in the past.

  • I've never asked in the previous video, I go off rails now to see how far I can push it.

  • And it looks like it just does.

  • It, it chooses rds for Postgres, PCR for the registry for the Docker image.

  • So it will actually build another Docker image and elastic container.

  • So service which is the things I have used in the past to run such A P I S.

  • It even gives the context allow inbound traffic for the movie A P I O and it's also going to use fargate, which is an excellent option for something like this.

  • These are all valid environment variables that is nuts and it gets the connection string as an environment variable for the container, which is a decent approach and other bet Sure you can use other secrets manager.

  • And then the value here would be the key of the secret in secrets manager.

  • So we can actually ask it to improve on this.

  • But I'm not gonna do that because I'm sure it will do it.

  • And even this is not a bad approach, especially if you use the right access policies.

  • But what I'm really curious to do is I'm gonna tell it.

  • Here's the thing my manager said this needs to handle 10,000 requests per second.

  • Is this good enough?

  • Because I can see from this account that this will only run one service, one instance of the service in fargate.

  • And even though there is a load balancer, there isn't some auto scaling from what I can see here.

  • So let's wait for this to finish and let's ask it about scaling, okay.

  • It is finished.

  • And I am so impressed.

  • Let's ask that question.

  • 10,000 requests per second.

  • Can you handle it?

  • The provider from scripture lives is a single instance of Fargate task which might not be able to handle no shit.

  • 10,000 requests per second to handle such load.

  • You need a notice, scaling group for pcs service and configuring A L B look, I'm having a bit of an existential crisis here because I cannot tell you how hard I had to try with the previous model to get it to give good results.

  • It would do great in small things, but in the bigger picture, it would just lose it.

  • This is actually insane.

  • Like truly what I'm seeing here is it can do everything a junior developer can do me developer and to be honest with this more than what a senior developer would also do.

  • So as long as you have someone who's competent enough to review things, the This could replace a lot of people and it sucks to say, but it is true and companies are opportunistic even if what I'm seeing here is not 100%, right?

  • Conceptually it is and I can take that and slightly modified and be there.

  • So I'm skeptical, I'm scared but I'm excited to see what's going on with three.

  • Never had the chance.

  • This does look, I'm going to stop here because I'm sure that at this point, anything I asked it will do, I think it answered every single one of those questions.

  • I first try perfectly, definitely way better than the previous model.

  • So I'm just gonna leave this here and ask you a question.

  • What do you think about this?

  • Like?

  • Really?

  • Because LGBT was one thing, but this is a whole different beast.

  • Well, that's all I have for you for this video.

  • Thank you very much for watching.

  • And as always, keep coding Jesus.

This basically eliminates the need of having some middle or junior developer doing the work for you.

Subtitles and vocabulary

Click the word to look it up Click the word to find further inforamtion about it