Placeholder Image

字幕列表 影片播放

由 AI 自動生成
  • 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.

    我打算試試OPEN AI剛剛發佈的全新的GPT四號模型,在哈拉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.

    現在我是一個哈拉的GPT plus會員,所以我已經可以使用它了,你可以看到它是這個下拉菜單中的一個選項。

  • 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.

    我之前用舊模型製作的圖表G B T的視頻令人印象深刻,但在錄製時已經試過這個模型,知道它能做什麼,它不能做什麼。

  • 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.

    如果你喜歡有內容,你想看到更多的內容,請確保你在固化鍾和正式培訓期間訂閱,請查看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.

    然後你有一個傳統的模型,我不知道它是否是最初的GPT,但它似乎是以前的收費GPT plus模型,具有不同的特點。

  • 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.

    然後GPT向前應該是最先進的,在那裡你有卓越的推理和簡潔,但它沒有那麼快,我們要用這個。

  • Oh, interesting.

    哦,有意思。

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

    是以,我在這裡看到的第一件事是,每四個小時有一個100條資訊的上限。

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

    所以我猜他們的評價是有限的,因為有多少計算sha li激烈。

  • 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.

    這是我要問的第一個問題,請用C店和dot net six創建一個rest API,允許用戶創建、閱讀、更新和刪除電影,也可以對它們進行評價,想想Rotten Tomatoes或IMDB和API的那些東西,你可以列出電影和評價它,然後用旺財做數據庫。

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

    然後,用於數據訪問的反框架就像點網絡中的R M。

  • 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.

    然後它知道讓電影DB的背景也是如此,電影和收視率很大。

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

    現在它要使用啟動點CS,我們在C店已經不怎麼使用了。

  • 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.

    現在,我不會在那個啟動點CS中做的事情之一是在那裡運行遷移,實際上會在程序點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.

    它注入了DB上下文,然後它正確地使用了一個sing編程。

  • Oh, that's impressive for update movie.

    哦,這對更新電影來說是令人印象深刻的。

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

    它還可以處理DB、更新併發的異常情況,很多人實際上會忘記涉及這些問題。

  • 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.

    然後它知道適當地命名一些東西,比如路由,就像其他API應該的那樣,這是你試圖處理的實體或你試圖處理的結果的複數,然後它正確地指向應該給你位置頭的行動,以表明在電影創建時,這是你可以找到你的電影的地方。

  • 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.

    這方面最大的問題之一是,連接字符串是一個拉斯特環,密碼和用戶名在應用程序設置點Jason文件中是純文本。

  • 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.

    通常你要做的是,你實際上會使用祕密管理器,如鑰匙庫或AWS祕密管理器,或者你會將它們作為環境變量加載到該特定服務的範圍。

  • 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.

    有趣的是,它是有偏見的,我沒有得到任何其他建議,如Aws的建議。

  • 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.

    我在想,微軟的資金是否使它更偏向於Azra而不是Aws。

  • 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.

    我打算走一點腳本式的追求,只是因為我想看看它是否也能用Aws做這個。

  • 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.

    實際上,我們公司正在使用Aws,我只是要告訴你,在前面的哦,我的上帝直接Aws祕密管理器。

  • 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.

    我,我無話可說,天哪,即使是Windows的具體細節,然後我想Linux或Mac的具體設置,如這些是正確的事情,如果我複製這個,它會帶我到我的證書,文件為ws,這是堅果。

  • Okay.

    好的。

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

    如果我想進行集成測試,使用網絡發佈工廠為API編寫集成測試,怎麼辦?

  • 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.

    是以,基於他們說的有多好,它能為我節省這麼多時間,它使我為LGBT支付的錢加上,我們實際上是值得的。

  • 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.

    但考慮到這一點,我完全可以看到有人制作一個工具,讓開發人員和實際的開發人員可以進入GIT repo創建一個問題。

  • 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.

    然後,使用A P I購買的收費GPT可以進入閱讀問題的行為,然後創建一個拉動請求,然後只是開發人員審查拉動請求,收費GPT在進行時自動修復它。

  • 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.

    使用K六K六性能測試對該API進行性能測試。

  • 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.

    是的,這看起來正是A K六項目的樣子,該文件看起來甚至是緩慢地提升到虛擬用戶。

  • 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.

    是以,這更像是一個低測試,你逐漸進入你的正常負載,保持20個虛擬用戶,而不是在那裡停留一分鐘。

  • 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.

    然後再往下走,然後一直往下走,它知道如何調用它,因為它有這些api端點的上下文。

  • 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.

    讓我們來談談一些基礎設施即代碼的問題,現在是部署應用程序的時候了,我們需要對我們的基礎設施進行編程,因為你不會進入門戶或AWS控制檯手動做事情。

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

    你可以使用類似terra form的東西來編寫API的腳本。

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

    所以我想說,現在是時候部署API和我們了。

  • My company is using terra form.

    我的公司正在使用terra form。

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

    你能編寫在Aws中部署A P I所需的I A C腳本嗎?

  • 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.

    它,它為Postgres選擇rds,為Docker鏡像的註冊表選擇PCR。

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

    所以它實際上會建立另一個Docker鏡像和彈性容器。

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

    是以,服務是我在過去用來運行這種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.

    它甚至給出了背景,允許電影A P I O的入站流量,它還將使用fargate,這對這樣的事情來說是一個很好的選擇。

  • 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.

    事情是這樣的,我的經理說這需要每秒處理10000個請求。

  • 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.

    因為我可以從這個賬戶中看到,這隻會運行一個服務,即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.

    每秒10,000個請求。

  • 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.

    從經文生活的提供者是Fargate任務的一個單一實例,它可能無法處理任何狗屎。

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

    每秒10,000個請求,以處理這種負載。

  • 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.

    你需要一個通知,為個人服務的縮放組和配置A L B看,我在這裡有點存在危機,因為我不能告訴你我在以前的模式下有多努力才能讓它給出好結果。

  • 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.

    就像我在這裡看到的一樣,它可以做一個初級開發人員可以做的一切事情,我開發人員,說實話,這比一個高級開發人員也會做的更多。