How To Use Chat GPT To Write Code (Tutorial For Beginners)
4K views
Jul 12, 2024
How To Use Chat GPT To Write Code (Tutorial For Beginners)
View Video Transcript
0:00
Hey everybody, welcome to this new video. If you want to use chatDbd to use code, you are in the right place
0:08
And it's a thing really really easy. So, speaking about code, what we can do is to ask almost everything here in chatDbd
0:18
from how can I get some creative ideas for a 10 year old birthday to how do I make an HTTP request in JavaScript
0:29
So just for the test here, I type for example this option, hitting to send, and what happens here is an error
0:38
queued, if this issue persists please contact us through our help center and help opens. This sometimes happens
0:44
so what I want to do is to use a VPN, if this works for you, then try to reload the page, if this does not
0:52
try to make the new thread and reload the page once again. So, as you can see, I've just reloaded my page
1:01
I tried to open and close once again, we're experiencing exceptional high demand, please hang tight as we work
1:06
on scaling our systems. So here it is, it's actually really really simple. So, as you can see, I do have like a few
1:12
examples of what does the chat open AI can do for me. So let's say that I need, I see method that accepts a git as a
1:23
string and returns a base64 version of the git. So if I hit into enter, let's see what does the chat can do for us
1:34
So I just need to wait a few seconds and see what will be the answer for the chat open AI. Alright, here's one where you
1:42
could implement this method in C sharp, and here is the code. Post to input string as a git, git equal to git dot per se
1:52
I think like this is not like the most accurate way to do some coding, but here converting by bit array to base64 string
1:59
return convert to base, string base64. So here are a few things and the methods where I can start to do some code
2:08
which I could be a little easier. Let's try to do something more easier so you can understand this. So I'm going to ask the
2:15
same thing, I'm going to ask something like write a C sharp method that returns, good morning, Steven, when it's morning
2:22
good afternoon, Steven, when it's afternoon, and good evening, Steven, when it's evening. So I just need to just make sure
2:31
that the homeworks are in the right place. There we go, there we go, there we go. Let's say I just want to tap this shop and go
2:41
into enter and see if the computer can do something. What I just asked it actually, here's one way you could implement this
2:48
method in the C sharp. So public static string, get greetings, string name, get the current hour. So it's going to be sending me the
2:57
date here. If hour, this is equal to its morning returned a good morning, plus a name. If it's afternoon, good morning, plus a name
3:06
If it's evening, good evening, plus a name. Really, really great. Use this method, you will like this string greeting, get greeting
3:15
Steven. There we go. Really, really easy. And if I want, show me the new code for get greeting, I'm going to hit into enter. This is how we can
3:24
use the chat open AI to help us to code, to write some codes. So hopefully guys, it was a very useful video for you. Don't forget to like and
3:32
subscribe to this channel if this was very useful for you. Thank you so much for watching this video. This is so great to have the chat open AI
3:39
And there you have it guys. Really, really awesome. See you in the next one
#Email & Messaging
#Intelligent Personal Assistants
#Programming
#Text & Instant Messaging
#Voice & Video Chat