00:00:00
what is Vibe coding it is a new coding
00:00:03
practice in which you basically don't
00:00:05
write any code you let AI code for you
00:00:08
completely and before you throw up your
00:00:10
hands and say that's ridiculous Andre
00:00:12
Kathy the leading mind in artificial
00:00:15
intelligence just posted about it and
00:00:17
says he loves it let me show you what it
00:00:19
is and then we're going to test it out
00:00:21
and I'm going to make a simple project
00:00:23
and a much more complicated project
00:00:25
where we build the game Tetris iterate
00:00:28
and add features and then build build an
00:00:30
entire machine learning framework to
00:00:33
have ai play Tetris and I do it all
00:00:37
without writing a single line of code
00:00:40
watch how cool this is so here's Andre
00:00:43
carpo's post 3.8 million views so it
00:00:46
seems like people agree there's a new
00:00:48
kind of coding I call Vibe coding where
00:00:50
you fully give into the Vibes Embrace
00:00:52
exponentials and forget that the code
00:00:53
even exists it's possible because the
00:00:55
llms cursor composer with Sonet are
00:00:58
getting too good also I just talked to
00:01:01
composer with super whisper so I barely
00:01:03
even touch the keyboard I asked for the
00:01:05
dumbest things like decrease the padding
00:01:07
on the sidebar by half because I'm too
00:01:09
lazy to find it I always accept all I
00:01:13
don't read the diffs when I get error
00:01:15
messages I just copy paste them in with
00:01:16
no comment usually that fixes it the
00:01:19
code grows beyond my usual comprehension
00:01:22
I'd have to really read through it for a
00:01:24
while sometimes the llms can't fix a bug
00:01:26
so I just work around it and ask for
00:01:28
random changes until it goes goes away
00:01:30
it's not too bad for a throwaway weekend
00:01:32
projects still quite amusing all right
00:01:35
we're going to test it out today I have
00:01:37
a slightly different stack we're going
00:01:38
to be using wind surf instead of cursor
00:01:41
and I'm going to be using super whisper
00:01:43
just like Andre karpathy now for those
00:01:45
of you not familiar super whisper is a
00:01:47
speech detects AI tool that works
00:01:49
incredibly well all right so let's test
00:01:51
it out we're going to be using 03 midi
00:01:53
with medium reasoning and so here we go
00:01:56
I'm going to open up super whisper and
00:01:58
we're going to get started
00:02:00
build me a login authentication
00:02:04
page okay there it is build me a login
00:02:07
authentication page let's hit enter okay
00:02:09
so it's generating all right so that was
00:02:11
really fast I'll create a small flask
00:02:13
project that includes a login
00:02:15
authentication page here's what I'll set
00:02:16
up okay good readme app.py all good now
00:02:22
I'll create those files for you so they
00:02:24
should be created okay please create
00:02:27
it so get reposit found in the parent
00:02:31
folder of the workspace here we go so
00:02:32
would you like to open the repositories
00:02:34
yes then do you want to install the
00:02:37
recommended python extension sure let's
00:02:39
go ahead and do that this is the first
00:02:40
time I'm using wind surf which is why I
00:02:42
have to do this I'm going to accept all
00:02:45
changes not even think about it look at
00:02:47
all that code that was already written
00:02:49
all right now let's just ask it to spin
00:02:50
up a server let's see if it can even do
00:02:53
that spin up a server to get this app
00:02:56
running all right open the terminal so
00:02:59
it's telling me to do that so let's do
00:03:01
this CD boom set of VMV activate it
00:03:05
great we're going to install the
00:03:07
requirements fine this is all just copy
00:03:09
paste I'm not even thinking at all there
00:03:11
we
00:03:12
go all right so we ran into our first
00:03:16
issue so I'm literally just going to
00:03:18
copy it put it into here and hit enter
00:03:21
okay one file needs review I'm not even
00:03:23
going to review it accept all all right
00:03:25
so I'm simply going to install the
00:03:28
requirements again just do exactly what
00:03:30
it says and app DIY and there we go it
00:03:34
worked okay now we're going to open up
00:03:38
there it is so we have a username and
00:03:41
password login page but let's not stop
00:03:43
there let's keep going now add Google
00:03:46
authentication to this
00:03:49
page and this is kind of nice with
00:03:52
Cascade with wind surf you can actually
00:03:55
make changes to the entire project
00:03:56
instead of just one file at a time which
00:03:58
is a a little bit different than cursor
00:04:01
okay so we got an error but it's not
00:04:03
done editing so I'm just going to wait
00:04:05
okay not even going to look at the diff
00:04:08
not going to look at the changes we're
00:04:09
just going to look at the results and
00:04:11
see if it worked okay to complete your
00:04:13
setup update your dependencies by adding
00:04:15
flask great all right so I opened up the
00:04:18
folder and it restarted windsurf so I'm
00:04:21
kind of in this weird state where
00:04:22
changes were made but not all of them
00:04:24
let's just see what happens and I'll
00:04:25
have it fix it for us all right no
00:04:28
module found flask all right so I'm
00:04:30
simply going to copy paste the error I
00:04:31
already know what it is I'm not in the
00:04:33
right cond environment but let's see if
00:04:35
it tells me how to do it correctly no it
00:04:37
didn't okay so I'm just going to
00:04:39
activate the VM right here we're back in
00:04:41
there now Python app.py and I don't have
00:04:45
this flask dance okay so it looks like I
00:04:48
still have the same issue copy paste of
00:04:50
course python environment management is
00:04:53
the thing that trips me up here of
00:04:54
course it is all right so let's install
00:04:57
flask dance done let's try to run it
00:05:00
again again very little thinking just
00:05:02
kind of copy pasting looking over it and
00:05:05
we got it going okay let's head back
00:05:07
here refresh the page and it does not
00:05:09
have the Google button yet thanks to the
00:05:12
sponsor of this segment Lang Trace they
00:05:14
have been awesome Partners to us so
00:05:16
excited to tell you about them again
00:05:17
today Lang Trace is a leading AI
00:05:19
software development consulting company
00:05:21
that builds AI products to propel your
00:05:23
business forward those products include
00:05:24
an open source and open Telemetry based
00:05:27
observability and evaluations platform
00:05:29
that helps you evaluate and improve your
00:05:31
llm usage in your application it's
00:05:34
trusted by thousands of developers from
00:05:36
early stage companies all the way up to
00:05:37
Fortune 500 companies L Trace helps
00:05:39
developers collect and analyze traces
00:05:42
collect data sets and run evaluations
00:05:44
resulting in highly reliable and secure
00:05:46
AI systems again link Trace is open
00:05:48
source and open Telemetry and plugs in
00:05:51
easily with open AI mraw deep seek
00:05:54
Gemini weeva pine cone and more L Trace
00:05:57
offers endtoend observ AB ility tracing
00:06:00
everything from llms to Vector databases
00:06:03
and framework level calls like crew AI
00:06:05
llama index dspi and Lang chain with
00:06:09
Native support for crew aai which you
00:06:11
know I love Lang Trace provides a
00:06:13
custombuilt dashboard to track crew AI
00:06:15
sessions agents tasks tools and memory
00:06:19
track everything your agents are doing
00:06:21
so go from shiny demos to Reliable AI
00:06:24
products easily with Lang trce check out
00:06:27
Lang trce it is open source and if you
00:06:29
want to use their hosted version you can
00:06:31
get 20% off right now if you use the
00:06:33
link in my description and if you want
00:06:35
to learn more Join one of their coming
00:06:37
webinars where they go over everything
00:06:40
so check them out they've been a great
00:06:41
partner go start their GitHub and thanks
00:06:43
again to link Trace now back to the
00:06:44
video all right so I'm just going to
00:06:46
tell it I don't see the Google
00:06:49
authentication button although the code
00:06:51
is
00:06:53
there hit enter so by the way if you've
00:06:57
never coded before you can do this this
00:06:59
is easy all right so let's walk through
00:07:01
a few possibilities confirm that the
00:07:03
Google blueprint is properly registered
00:07:05
in your
00:07:06
application how do I properly register
00:07:09
Google
00:07:12
blueprint do it for
00:07:15
me okay let's see if it's actually able
00:07:18
to do
00:07:19
this okay so it did add a bunch of code
00:07:22
and of course I'm just going to accept
00:07:24
all okay so it says that I should see
00:07:27
the login gooogle endpoint which if I
00:07:31
enter it there I do okay uh but I don't
00:07:35
see the button all right so I'm
00:07:36
definitely doing something wrong here
00:07:38
but I'm trying not to think too much
00:07:39
about it so what I'm going to do is I'm
00:07:41
actually going to take a screenshot okay
00:07:43
so this model does not support images so
00:07:45
here's what we're going to do we're
00:07:46
going to switch the model so we're going
00:07:47
to switch to clad 3.5 Sonet I'm going to
00:07:51
say I don't see the Google off button on
00:07:55
this
00:07:56
page please add it here and I guess I
00:08:00
should have just spoken that but that's
00:08:01
okay ah I see the issue you're using a
00:08:04
template for the login page let me check
00:08:06
the template great so now we're using a
00:08:07
different model maybe this model is
00:08:08
going to be better Okay it definitely
00:08:10
feels a little bit
00:08:12
slower I'm just going to accept all and
00:08:15
there it is okay so it doesn't look
00:08:18
great little broken image there but fine
00:08:22
that's good enough all right so next
00:08:24
we're going to have it write the Game
00:08:26
Tetris and then we're going to try to
00:08:29
get it to use some machine learning to
00:08:31
play it itself let's see if we can do
00:08:33
that build me the game Tetris in
00:08:38
Python all right suggested background
00:08:40
terminal command yes go ahead and accept
00:08:43
Okay so we're going to accept all there
00:08:45
we go and yeah there's a lot of code in
00:08:47
there let's go ahead and run it what do
00:08:51
I have to do to run this
00:08:53
code all right so let's do this we're
00:08:56
going to CD into it we're going to
00:08:58
activate the VMV
00:09:00
we're going to install all of the
00:09:02
requirements and then we're going to
00:09:04
spin up the file I didn't really think
00:09:07
about that I just copy pasted all right
00:09:09
press any key to play there we go okay
00:09:13
so good pretty good let's just make sure
00:09:15
it works properly and it should
00:09:18
disappear line good okay so let's stop
00:09:20
there now there's a couple things I want
00:09:22
to add to it make sure there's a preview
00:09:26
window where we can see the next piece
00:09:27
that is coming
00:09:32
and that's all I have to do let's see
00:09:33
what happens okay so it is writing the
00:09:36
files I'm just going to accept all not
00:09:38
going to do anything except for run it
00:09:41
again and see if it
00:09:42
worked okay so I do not see a next piece
00:09:47
preview area so that's okay let's
00:09:49
quit I tried it again I don't see a next
00:09:53
piece preview area please fix
00:09:58
it and so I might have to try like Cloud
00:10:01
3.5 Sonet instead I think that's the
00:10:04
gold standard of coding Assistance or
00:10:07
coding models but let's see if we can
00:10:09
get this to work okay so definitely
00:10:11
increase the screen width that's good to
00:10:12
see I shouldn't even be looking at the
00:10:14
diff to be fair for true vibe coding but
00:10:16
that's okay I took a peak all right I'm
00:10:19
just going to accept all we're going to
00:10:21
play it and see what happens all right
00:10:24
there's the next shape look at that so
00:10:27
cool amazing amazing and it added a
00:10:30
score too which I didn't ask for but
00:10:32
great let's just make sure it works
00:10:34
again when I get rid of this line I
00:10:36
should have a score of 10 okay score of
00:10:38
10 fine good now add a pause and end
00:10:43
game button I'll accept
00:10:45
all let's go ahead and run it again
00:10:48
press any key to play oh and the pause
00:10:50
and end game buttons are in weird places
00:10:53
all right so let's just say that and get
00:10:54
it fixed the pause and end game buttons
00:10:58
appear right in the middle of the screen
00:11:00
over the Tetris game move them all the
00:11:02
way to the
00:11:05
left all right accept all and let's play
00:11:09
perfect and let's just make sure the
00:11:11
pause game works and the end
00:11:15
game okay so it doesn't work let's see
00:11:18
it pauses but does not do anything after
00:11:20
that let's get that fixed pausing the
00:11:22
game works but you can't unpause it
00:11:25
please add that and also make sure end
00:11:27
game works at any time
00:11:29
okay for some reason it didn't actually
00:11:31
make the changes let's ask it to do that
00:11:34
all right please make these
00:11:36
changes okay for some reason it's not
00:11:39
actually making the changes itself
00:11:40
that's okay we'll do that ourselves okay
00:11:43
so I'm going to copy the code kind of
00:11:45
weird that it's making me do this I'm
00:11:46
going to find the pause game and I'm
00:11:49
going to replace it with the code that I
00:11:51
have now okay all right then I'm going
00:11:53
to update this part of the code right
00:11:56
here and let's just Dent it properly and
00:12:00
I think that should be good let's save
00:12:03
it again very weird I had to do that
00:12:05
manually but that's okay and there we go
00:12:07
let's pause the game and unpause end
00:12:10
game perfect okay that's amazing all
00:12:13
right now I want to allow AI to learn
00:12:16
how to play this game let's see if we're
00:12:18
able to do
00:12:19
that okay that all works now I want to
00:12:22
allow AI to learn how to play this game
00:12:26
and play it itself now I have no idea
00:12:29
how it's going to implement this so
00:12:31
let's see so I've added a basic AI agent
00:12:34
mode has a placeholder for future
00:12:36
learning and picks random moves okay AI
00:12:39
mode great but did it actually add
00:12:42
anything you know what I'm going to do
00:12:44
I'm going to switch over to Cloud 3.5
00:12:46
Sonic maybe I'm going to have a little
00:12:47
bit better luck and maybe I won't have
00:12:49
to tell it to make the changes each time
00:12:50
it seems repetitive and unnecessary okay
00:12:53
that all works now I want to allow AI to
00:12:55
learn to play this game Tetris and play
00:12:58
itself okay okay so it's going to use a
00:13:01
popular Library called stable baselines
00:13:03
3 great so it seems like clad 3.5 son it
00:13:06
still might be the gold standard for AI
00:13:09
coders so look at this Implement dqn
00:13:11
deep Q Network agent using staple
00:13:14
baselines 3 add training and evaluation
00:13:17
code this is so cool lots of code being
00:13:19
written here so do I want to do that
00:13:22
accept Okay so it's running installing
00:13:24
right from here I didn't even have to do
00:13:26
this in terminal great I'm going to
00:13:27
accept all would you would you like me
00:13:29
to start the training process for you
00:13:34
yes all right there it goes let's see
00:13:37
what happens python train.py do you want
00:13:39
to run this command accept let's see
00:13:42
what happens so it is running in the
00:13:45
background and where do I actually see
00:13:48
here we go okay so there is an issue so
00:13:51
I'm going to copy that paste it into
00:13:55
here and see if it can fix it we need to
00:13:57
import shapes from the main file let me
00:13:59
fix it great and go ahead and run it
00:14:02
again all right so still an issue all
00:14:05
right so I'm going to accept All I'm
00:14:07
going to copy the issue I'm going to
00:14:09
paste it in again and hit enter shape
00:14:12
mismatch and how we're encoding the
00:14:13
piece information great fix it up for me
00:14:16
okay here we go accept let's try it
00:14:19
again and oh there we
00:14:23
go look at
00:14:26
that it is actually r running we're
00:14:29
getting some messages between oh yeah
00:14:32
here we go
00:14:33
rewards oh my God this is so cool okay
00:14:37
when is it going to end so I'm going to
00:14:39
accept all just to make sure all the
00:14:40
changes are accepted and in the code and
00:14:44
it seems like it's still running so I
00:14:46
don't know how long this is going to
00:14:48
take how long will the training take
00:14:50
it's running right
00:14:52
now so even as it's running I can still
00:14:55
continue to work with wind surf so the
00:14:58
AI completed about 151,000 time steps
00:15:01
out of a million so 15% complete great
00:15:05
okay so it should take approximately 4
00:15:07
and A2 minutes let me just cut ahead and
00:15:10
show you that all right here we go game
00:15:12
over total reward
00:15:14
8.89 great seems like it's done how do I
00:15:18
get it to play now all right so let me
00:15:19
modify the main game to include an AI
00:15:22
player mode accept all here we go okay
00:15:26
we got an issue so I'm going to go ahead
00:15:29
and paste it in circular import issue
00:15:31
all right great fix it up for me so
00:15:33
suggested background I don't want to run
00:15:36
that I'm going to accept
00:15:39
all and then I'm going to just run it
00:15:42
manually here we go looks like it might
00:15:45
work press any key to play oh okay we
00:15:49
did run into another
00:15:51
issue the game started but then quit
00:15:54
with this error and then I'm going to
00:15:56
paste in the error and let it fix it I
00:15:59
don't want it to do that I'm going to
00:16:00
accept all the changes I'm going to run
00:16:02
it myself and let's see okay so it
00:16:06
doesn't
00:16:08
look like the AI is actually playing the
00:16:10
game so I'm going to end the game okay
00:16:13
the game spins up now but AI isn't
00:16:15
playing it how do I get it to play oh no
00:16:18
I did train it okay so it's telling me I
00:16:19
need to train it again no I did train it
00:16:23
there should be a training file already
00:16:26
all right so it's checking maybe it
00:16:27
didn't save it okay okay there it is yes
00:16:29
it did let me fix that that's really
00:16:31
cool that I can actually look through
00:16:32
the file structure and find the file I
00:16:34
need now try running the game again and
00:16:36
press a to watch the AI play so I'm
00:16:38
going to reject I'm going to accept all
00:16:40
open it up I'm going to push
00:16:43
a and there it goes look at that that's
00:16:46
AI playing it's not that good but it's
00:16:51
definitely playing it you lost okay very
00:16:56
weird I can probably make some more
00:16:58
progress on on this but for now I'm just
00:17:00
going to leave it here that's what vibe
00:17:02
coding is all about I think this is
00:17:04
amazing I didn't write a single line of
00:17:06
code here and still I was able to get
00:17:09
the game Tetris working get an AI
00:17:11
trained up with basically very little
00:17:13
experience doing any of this so if you
00:17:15
enjoyed this video please consider
00:17:16
giving a like And subscribe and I'll see
00:17:18
you in the next one