Full transcript
0:00Today I'm joined by a friend that I got
0:03to know a little while ago. Uh I've been
0:06collaborating with Clerk at a hackathon
0:09for Nex.js Conf. Brandon Romano is an
0:14engineer at Clerk. I have gotten
0:16introduced to him and his work um while
0:19collaborating for educational content
0:22but also got to know him as a person as
0:26a friend at the hackathon. we got into
0:30taking so much photos of the event. Uh
0:33maybe at one point I would also share
0:35that with the folks. Um seems like we
0:38have a kind of similar interest in
0:41photography, event photography or
0:43portrait photography. Brandon, uh I'm so
0:46glad that you're joined. It's an honor
0:48to have you here and thank you for for
0:50doing this.
0:51>> Yeah, thank thanks for having me. This
0:52is I'm like very excited to be certainly
0:54talking about this topic cuz I'm like
0:56very excited about AI right now. I think
0:58the industry is really really exciting.
1:00Um and yeah, also yeah, we we definitely
1:02discovered very quickly that we were
1:04kindered spirits for sure. Um you should
1:06totally put up some of the photos that
1:07we that we uh that we took on the
1:09screen. Um but yeah, no, that was that
1:11was definitely a fun it was a fun way to
1:13>> That was a fun night. That was a very
1:15fun night and um you know um we met a
1:18lot of cool people that were were
1:21attending at the hackathon building cool
1:23stuff
1:23>> and you could see the theme was AI. I
1:27was either an AI native or they just
1:29built the whole thing with the AI. So I
1:32thought to have you on primarily looking
1:34through the lens of somebody that's just
1:37working on the back end of an
1:39authentication company or technology,
1:42but I wanted to know how you as a senior
1:44engineer
1:46um use AI. What's your day-to-day
1:48pipeline? What's your workflow? What
1:50tools do you use? How do you harness it?
1:52How do you see the advancement over the
1:53past few months? Where did you start?
1:56And how much are you using it now? And
1:58where do you seeing it going? So um
2:00let's just start with like your journey
2:02of using AI and then maybe at the end um
2:05I know you have also prepared a project
2:07so we can walk through an actual project
2:09build it from the back end and also go
2:11to the front end and show it end to end
2:13so we can kind of learn more about how
2:15you use it dayto-day.
2:17>> Yeah totally. So yeah, so so definitely
2:19from like my journey perspective, I
2:21think it was probably the about like
2:24close to the second half of 2024 is when
2:26I kind of really picked up, you know, AI
2:28tools in seriousness. Um I when GitHub
2:32Copilot originally came out, I gave it a
2:34shot and I was actually very like I was
2:37not happy with it. It felt like the the
2:39way I described it initially was like it
2:41was like a junior developer was just
2:42like screaming over my shoulder with
2:44like the bad ideas constantly. Um, and
2:47it was very distracting. Um, but you
2:50know, it's really evolved over time.
2:51Like I think probably at certainly at
2:53the start of 2025, the models were
2:55getting like really good and the
2:56harnesses were getting really really
2:57good and it and and I gave it another
3:00shot and I was like very impressed and
3:03kind of ever since then I've kind of
3:04been like slowly incorporating it more
3:06and more into into my workflow. Um there
3:10are you know days now where I will not
3:13type a single line of code and I and I
3:15delegate almost entirely to AI. Um it's
3:18quite good at working certainly in
3:20existing code bases. Um you know I do
3:22have to spend a lot of effort kind of
3:24like giving it particular directions and
3:26saying okay go and do this in this
3:28particular way and you know it goes in
3:30the wrong direction you need to correct
3:32it. Um, it's a thing that, you know, you
3:34still actively have to participate in
3:35and you still have to have the
3:37underlying fundamental knowledge of what
3:39it's actually doing to operate it in its
3:42most effective way. Um, but yeah, it's
3:44it's like profoundly changed um software
3:47development in in certainly in the tech
3:49industry. I know that, you know, we
3:51we're probably in a little bit of a
3:52bubble in the tech industry. We're very
3:54much like at the forefront of of
3:55adopting these types of tools. Um but uh
3:59it's certainly in the tech industry,
4:01it's every single developer that I'm
4:02talking to is very significantly using
4:04AI in their workflow and for very very
4:07large tasks. It's no longer just like
4:09write this function. It's like I'm
4:11building this feature like let's like
4:13come up with a plan together, you know,
4:15with the AI tool and and go and build it
4:17and you know can be pretty significant.
4:19Um so so yeah, so that's been my
4:21journey. It's like it's definitely been
4:23a story of using AI in very specific you
4:27know ways like kind of like a scalpel.
4:29Um and now it's kind of become a bit of
4:31like a you know more of like a
4:33sledgehammer that I can swing around and
4:35obviously you know with that with great
4:36power comes great responsibility. Um but
4:39it it really can get a lot done.
4:41>> Yeah absolutely. I feel like um it's
4:44very similar to my journey or and a lot
4:46of people that I talk to it starts from
4:49I don't know tab completion with GitHub
4:51copilot that's just like that and then
4:54maybe testing and trying agents here and
4:56there for a function for a little small
4:58change but then um I think what changed
5:01it for me was the plan mode in cursor if
5:03you're using um you can we it just goes
5:07back and forth and it asks questions
5:09before implementing and you could see
5:10how it's thinking or what like loop
5:12loopholes um and and holes in the plan
5:14there is and then it goes unexecuted. I
5:18think um specifically with the Opus 4.5
5:22um whomever I'm talking to they're like
5:24yeah we were using it. Yes, it it was
5:27before that that we you know we have
5:28rules, we have guidelines, we have
5:30agent.mmd, we have there's like we have
5:32harnesses that to just make it produce
5:34good work, but seems like everybody with
5:37the opus 4.5 and cloud code or open
5:40code, they're just like trusting it more
5:42and more. Um,
5:44>> yeah,
5:44>> but I feel like it's it's it's it's a
5:46very good model. It's definitely that's
5:48when I and I think a lot of my
5:49co-workers were were like, "Oh
5:53like things have kind of changed." um a
5:55little bit. Yeah. Sorry, I cut you off.
5:57>> No, no, no, no, no. Yeah, exactly. Yeah.
5:59I mean, I was talking to Tanner uh
6:02Linsley um few weeks ago and he was like
6:05the same thing. He was like um he was
6:08telling me that he was talking to his
6:09team and engineers about kind of the
6:12same experience that them being
6:14skeptical in the first not trying it or
6:16as you mentioned giving it a very short
6:18leash, not letting it just go um on its
6:21own. But then the 4.5 Opus 4.5 came out
6:25and then he was like I told them guys
6:27just give it a try and see and it just
6:30blew up their mind as well. Um but I
6:33think it's also even even if the model
6:34is good I think it is also very
6:37important how you're providing context
6:39to it. How what are your rules? What are
6:41your MCPs? Are you providing any skills?
6:43Are you providing any guidelines any
6:45best practices there? the the more you
6:49have these guard rails in place, the
6:51better the way better the quality of
6:53what you're getting. Uh and often times
6:56when I see people not getting good
6:58enough results, I'm like, "All right,
6:59maybe you're not providing good enough
7:02context or rules or skills or what is
7:04your what is it? What is in your agent
7:07MD file?" Um sometimes it's just
7:09accessing old documentation and whatnot,
7:11but there there are ways that you can
7:13make that better. And I think this is
7:14the new area of learning what everybody
7:17else is doing like yourself or other
7:19engineers in the industry and try to
7:21replicate and kind of establish best
7:23practices on how to use this.
7:25>> Yeah, absolutely. Yeah. I mean, so yeah,
7:27context is very much key. It's like it
7:29is only going to be as good as the
7:31information that you give it, right?
7:32It's really good at, you know, taking a
7:35bunch of information and processing it
7:36and coming up with, you know, an a
7:39reasonably good answer to whatever
7:41question you you propose it. But yeah,
7:42if you don't give it any context, if you
7:44don't give it those guard rails, um it's
7:47likely not going to do the thing that
7:48you want it to do. Because with with all
7:50software engineering, there's a million
7:51ways to do things, right? So which one
7:54of those ways I if you don't tell it
7:57which one of those ways to do, you know,
7:59the thing that you want it to do, you're
8:00just going to get one of those ways. And
8:02you know, maybe you might disagree with
8:03it. And if you disagree with it, you're
8:05going to have a bad experience with AI.
8:06Um so yeah, really it's definitely about
8:08the context that you provide it. Um, and
8:10you know the tooling is getting really
8:11good like as you mentioned there's you
8:13know there's there's all these you know
8:14context markdown files that you can have
8:16inside of your repo but also too just
8:18like even just the editors I think today
8:21make it super easy to provide that
8:23context like very often when I'm giving
8:25a prompt what I'll do is I'll say you
8:28know you need to do this particular
8:29thing and then I'll you know I think
8:31it's a command I don't even it's muscle
8:33memory so I don't even know that the
8:34memory is like command L or something
8:35like that where I could say like you
8:37know this reference this part of the
8:39code um and do this and I can give it
8:41very very specific directions and I can
8:42kind of like embed the context of the
8:44very disperate parts of my codebase um
8:47and kind of give it how I want it to do
8:49it and it it it is is very much um it
8:52definitely improves a the output when
8:54when you give it that right level of
8:56context.
8:57>> Yeah, I mean when you're dealing with an
8:59existing code base um what you just
9:02mentioned is is key. You're pointing
9:04you're like okay I want to build this
9:05feature and this is how I write my
9:07functions. this is how I write my
9:08endpoints. This is how I I don't know do
9:10this a specific thing. Go look at this
9:12and then implement it here which is I
9:14guess very good at just doing that
9:17versus for a new project where you're
9:19just like um there is no code reference
9:22or the way that you prefer you you just
9:24have to provide more context or rules
9:26and guidelines and guard rails for it to
9:27do it. Um, that's actually very
9:30interesting because I was talking to
9:31somebody yesterday with a a a CTO of a
9:35software company up here in Toronto,
9:37Canada, and they're like our code base
9:38is like about a million lines of code
9:40and it's just like um I guess C++ or
9:44something. It's like a ERP management
9:48like like logistics and you know
9:50inventory management kind of software.
9:51and he was like um we haven't had we we
9:55haven't been comfortable or confident
9:57that it understands our code base good
10:00enough. Uh and I also mentioned the same
10:03things that you said that you could
10:04point it at different you know um
10:06guidelines and you could create these
10:08different you know best practices or
10:09ways you're just like working or the
10:11architecture of your um you know
10:14software and then it just continues to
10:15produce that within that same system.
10:18[snorts]
10:19>> Yeah. So, so this is definitely a thing
10:21that, so if I were speaking to this
10:22person, the advice that I would tell
10:23them is that you can give the context of
10:27your architecture to, you know, the AI
10:30agent. You can and you can write a
10:31document yourself, human written. Um,
10:33and actually I have one such doc
10:35document in the uh in the codebase that
10:38I'll that I'll pull up later. Um, but
10:40basically like you know, all software
10:41projects, yes, they're complicated when
10:43you look at them from a whole. Of
10:44course, it's going to be a million lines
10:45of code. Um but you every you know every
10:49codebase you can look at it at different
10:50resolutions right you have the highle
10:52architecture and you say oh okay there's
10:54we have these [snorts] you know we have
10:56the HTTP layer and then we have a
10:58service layer and then we have a
10:59repository layer right so it generally
11:01can be kind of described generically and
11:03like here are the way that things are
11:04done here um I would say that uh these
11:08agents are actually they're quite bad at
11:10coming to those conclusions I would say
11:12generally the big picture stuff it's
11:14hard for it to get the big picture stuff
11:16because it it isn't going to crunch a
11:18million lines of code every single time
11:19you send it a prompt unless you want to
11:21use like a hundred million tokens every
11:22single time you know you send a prompt
11:24in. So you need to be able to guide it
11:26in such a way where you can give it that
11:28highle contextual information about like
11:30where are the what are the steps what's
11:33what are the layers in my application
11:34that I need to you know to look at
11:36whenever I make a change. Um and that
11:39generally will help and you can provide
11:40that in kind of like exactly like an
11:42agents.mmd file or you can just have
11:44like an architecture.mmd file and
11:45whenever you're performing a change
11:47where you're like I think it needs this
11:48you can link it to that inside of the
11:50prompt and provide that context.
11:53>> Yeah. Yeah, that makes sense. All right.
11:57Um,
11:59do you want to continue by actually
12:02diving in and walking as you're
12:04explaining like how you're setting up
12:06this project and you know different
12:08files, guidelines and whatever and I
12:10will just jump in, interrupt you if I
12:11had any questions otherwise I'll just
12:12let you uh take over.
12:15>> Yeah. Yeah, I think that that sounds
12:16good. Let me share my screen here. Um so
12:19yes so I have created a um let me share
12:23my screen first uh allow to share the
12:26entire screen share the entire screen
12:30okay cool so yeah so as I had mentioned
12:33um I've created a just like a fake
12:36project um just so we can kind of like
12:38go through and I want to you know show
12:41some real concrete examples of of going
12:43and running some prompts myself because
12:46I think seeing is believing with these
12:48types of things. Um, so the conflated
12:51example that I have put together is, uh,
12:53I'm going to be opening up a cat cafe
12:55with my cat. My cat's name is Luna. Um,
12:58and I need a system to, uh, manage
13:01tracking cats, tracking people that see
13:03them. There's going to be some adopt
13:05adoption applications. That's the goal
13:07of this cat cafe that we get cats
13:09adopted. Um, so you know to manage all
13:12of this I'm going to create a system uh
13:14to to manage the cats, the customers,
13:16the reservations and the adoption
13:18applications and then hopefully you know
13:20they're approved and then they become
13:21owners. Um, so I'm going to so in this
13:25I'll build a a backend and that's going
13:27to be the context. So you can let me
13:29know if I if I veer off in a particular
13:31direction and and you have any questions
13:33about you know particular things because
13:35I I very much have the curse of
13:36knowledge on uh on these types of
13:38things. So, like I will probably glaze
13:41over something that's really complicated
13:43underneath of the hood. And so, feel
13:45free to ask any questions at any point.
13:47Um, but so, yeah. So, I I've set up I've
13:50set up a project uh initially with with
13:53some boilerplate and a little bit of
13:55work I put into this um just because it
13:57would be extremely boring to to set up a
14:00project initially. Um but so
14:02specifically I I will say though about
14:04the project setting up process is so if
14:07you are working in a codebase AI works
14:10better in an existing codebase because
14:12it can infer what your opinions are
14:14about how things are structured and it
14:16doesn't have to make as many decisions
14:19right so in the process of setting up
14:21your codebase you actually want to how I
14:24mentioned there's kind of like the
14:25scalpel and then the sledgehammer you
14:27want to actually when you're setting up
14:28your codebase you do want to Think of it
14:31like it's a it's a scalpel operation
14:33because you're making pretty
14:35consequential architectural decisions
14:37that the uh the any future AI prompts
14:40will assume are codified inside of your
14:42codebase. So if I make some bad
14:44decisions up front about how this thing
14:46is structured. Um it it's going to be
14:49it's going to be poorly structured
14:51forever. So when you're setting up the
14:53project, you actually want to kind of
14:55like you know apply your knowledge that
14:57you have you have uh already gained as a
15:00developer. And if you have to actually
15:01go in and type some code yourself, it's
15:03not a bad thing. Um, AI really gets its
15:06power once it's kind of working within
15:07an existing codebase. Like you can
15:09totally spin up a new codebase and it
15:11can make reasonable decisions, but just
15:12make sure you review them and you agree
15:14that this is the right architecture and
15:16setup for your project. Um, so, okay.
15:18So, I'm going to I'm going to walk
15:20through very quickly some of the
15:22boilerplate uh and and the stuff that I
15:24have set up. Um, so as I mentioned, I'm
15:26going to build an API that's going to
15:27manage this. Um later on we're going to
15:29>> Brandon.
15:30>> Yeah.
15:30>> Brandon, can you make the screen a tad
15:32bit bigger? Like zoom in a little bit so
15:34that Yes.
15:35>> Yes. Okay. Perfect. Cool. Okay.
15:38>> Beautiful.
15:40>> Yeah. Yeah. Okay. Cool. Um so, okay. So,
15:45I'm going to jump through and just kind
15:46of walk through some of the boilerplate
15:49here. Um so, uh as I mentioned, so I'm
15:52building an API. Um, so this API is
15:55really really simple in terms of like
15:56its overall architecture. I have a it's
15:59just a Postgress database uh and uh and
16:02it's going to be a Go application that's
16:04going to be the uh the the code that's
16:06going to that's going to run it. Um so
16:08in it I've set up some very simple
16:10docker setup so I can go and spin up the
16:13application really easily. Um and as
16:16well I have like a source directory and
16:18I have stubbed out uh the the server. So
16:23I have got this server abstraction where
16:25I can go and say here are my routes and
16:28I can plug in those routes into my
16:30server and then go and build the
16:32services that go and contact the uh
16:35repositories which go and fetch the data
16:37from the database. Um so that's from a
16:39high level that's kind of the setup of
16:41this uh of this project. Um, so what I
16:45figured would be useful, uh, what would
16:48be helpful is I can kind of just like
16:49walk through some I could walk through
16:52building some, uh, some features inside
16:54of this and I can I'm going to start
16:56kind of small and then I'm going to kind
16:57of grow to giving it more and more
16:59responsibility.
17:00>> Sounds good.
17:01>> Um, so I think the first place that I'm
17:03going to go, so basically, so I've
17:05already built this endpoint to to create
17:07a new cat. Uh, and I've already built an
17:10endpoint to go and fetch a cat. And I
17:11did this because I wanted to give I
17:14wanted to be involved in this process
17:16and and give the codebase an example of
17:18like here's how things are are ought to
17:21be done inside of this codebase. Um so
17:23now AI can reference these other things
17:25when it's going and building uh new
17:27endpoints. Uh and it can use this as
17:30context. Um so I'm going to start really
17:32really small. So, I want to build the
17:34endpoint where I can go and fetch all of
17:36the cats um that are available for
17:39adoption or just all of the cats in
17:41general. Um so, the first thing that I'm
17:44going to have to do is um I want to
17:48let's see. I'm going to go and into my
17:51cat repository file. Let me move this
17:54out of the way. Uh I'm going to go into
17:55my cat repository. So the repository is
17:58the layer in the in my application where
18:00I am contacting the database and I'm
18:02going and say this is where I'll write
18:03my SQL queries and where I'll go and say
18:06give me all of the cats right so if I'm
18:11you know not so trusting of uh AI quite
18:15yet um I might only want to give just a
18:18single function level of responsibility
18:21right so I might want to just go and say
18:24uh you know I might want to stub out the
18:27actual function signature right so
18:28function uh r cats repository not create
18:32color I want this to be uh let's call
18:35this fetch cats right and this should
18:40return an array of
18:45models cat or an air
18:50right so I'm still very much human
18:53involvement so what I can do here And
18:56also too, I'm using cursor. I recommend
18:58cursor as a uh initial tool if you're
19:00getting started with AI. It's very it's
19:02a very similar experience to how you
19:05maybe used to write code prior to prior
19:08to using AI. Um there's obviously a a
19:11million different tools that you can
19:12use. Cursor is is quite good for this.
19:14So in cursor um what I can go and do is
19:16I can just go and say I can you know
19:18press what am what what did I press?
19:20It's muscle memory. So it's I think it's
19:22command L. Yeah, command L. And then
19:24what I do is I provide the line by line
19:27context inside of my chat. So and I can
19:29go and basically go and say implement
19:31this function.
19:33Uh I want to be able to fetch all of my
19:38cats from my database. Uh I have a spec
19:43I have a create cats table. So I have a
19:47uh a specific uh thing inside of the
19:50cats table uh called an owner ID which
19:53is basically this is like this cat has
19:54been adopted if they have an owner. Um
19:56so I want to be able to uh fetch cats as
20:01well that are available adoption. So, I
20:04want to uh be able to fetch cats who are
20:08available
20:11available for adoption,
20:14which is determined by the fact that
20:18they don't have an owner.
20:21Uh
20:23yeah, let's get let's go. Let's see what
20:25that goes and does. So, I've provided it
20:28the signature. I'm not giving it a lot
20:30of responsibility. I'm just going and
20:31saying build this repository function.
20:33Um and we'll see how it does. Um so I
20:37think right now you probably see that
20:38cursor is is pulling in some context.
20:41It's like okay let's go and understand
20:42what the cats model is like. Uh I think
20:45it reached into the create cats table to
20:48to see what the schema is to make sure
20:50that it can run that query correctly. Um
20:52so it's kind of like right now it's in
20:54its context gathering phase to be able
20:56to execute you know this type of query.
21:00Um, and so now we are building this
21:03fetch cats query. So we're gonna let it
21:05do its thing and we're gonna we'll
21:07review it.
21:09Okay, let us see how it did. Okay, so
21:13fetch cats. So okay, so there's there's
21:15a few options. Um, yep, it has the
21:17available for adoption option which I
21:19can pass in optionally filters which
21:21cats are returned.
21:24Pass nil for ops to fetch all cats or
21:26set available for adoption to filter
21:27availability. true, no owner, false, has
21:29owner. Um, cool. And it allows you to
21:31also to not fetch that. So, here is my
21:33base query.
21:36It goes and says if it's available for
21:37adoption. So, it's doing what I want it
21:38to do here. And it's going and querying
21:40that. It's scanning the rows of the
21:43database into the actual cap model. And
21:45it's returning the caps. So, cool. So,
21:47this is this did what I wanted it to do.
21:49Um, I didn't give it a lot of
21:51responsibility, right? So, if we look
21:52inside of our, you know, what did it
21:55actually go and do? uh it just modified
21:57this single file and it just did this.
22:00So I didn't have to I don't have to give
22:03AI a lot of trust because it's very easy
22:05for me to go and validate that this is
22:08the thing that I wanted it to do. So
22:12generally if you're getting started with
22:13AI or you're not using you know AI
22:15workflows currently um this is the the
22:17where I would say start start with a
22:21very small amount of responsibility
22:23because it's easy to verify. It allows
22:25you to like build up your trust that AI
22:28is kind of pretty good and can do the
22:30thing that you want it to do. Um and it
22:33kind of allows you to still remain in
22:35like really really tight control over
22:37everything. So this is kind of the first
22:40piece of the demo is just building this
22:41one particular function. So I'm going to
22:43commit this um get in
22:50and fetch cats
22:52function.
22:55All right, we're just pushing the main
22:57today um for now. Um okay, cool. So
23:02that's kind of the start of it. Um, so
23:05but what I'm actually after is I'm
23:07actually trying to fully build this
23:09endpoint. Um, so I've gained a little
23:12bit of trust that the AI did the thing
23:14that I wanted it to do. Uh, so I'm going
23:18to now just tell it to build this
23:20endpoint.
23:24All right. So I'm just going to say uh
23:27uh build this endpoint.
23:30Use
23:31the fetch cats
23:37use the fetchcast repository function
23:40uh to perform the underlying query. I'm
23:45going to also to I'm going to give it a
23:46little bit more context because I know
23:48I've used AI enough to know that it's
23:49going to try to implement pageionation
23:51because uh this is generally uh how how
23:55it goes and does it because that's best
23:57p practice. We're not worrying about
23:58best practice today. So, I'm going to
23:59say uh don't uh worry about
24:02pageionation. You can just return all of
24:06the cats
24:08that match for now. Okay. So, now we're
24:12giving it a little bit more
24:13responsibility
24:14and we are just telling it to build the
24:16entire function. And this is going to
24:18require a little bit. It's going to have
24:19to build inside of my inside of my uh
24:23application. uh I have so it's the HTTP
24:26layer and then there's a service layer
24:27and then there's a repository layer that
24:29goes and sends a request to the
24:30database. So it's going to have to go
24:32kind of up and down the stack quite a
24:33bit to be able to successfully build
24:35this endpoint. [snorts] Um it's going to
24:38have to register the the the endpoint to
24:40the uh to the router so it can actually
24:43go and handle it. Um treating available
24:46option or filter otherwise returning all
24:48cats. Cool. It seems to be doing what we
24:51want it to be doing.
24:53All right, let us review it really
24:56quickly. So, I'm oddly enough I I do not
24:59use the the review uh function. It's
25:03just like not part of my workflow. The
25:05way that I I still use git and like git
25:08diffs to to manage how like how things
25:11have changed. Um so, let us review this
25:15really quickly. So, I'm going to start
25:17with the router. This is the going to be
25:18the most simple. So, okay. So it it
25:22registered the the cats endpoint. So get
25:26cats list. So I'm going to go to the
25:28cats handler and see how it's handling
25:30that. Uh list handles get cats list cats
25:33optional query available for adoption
25:35true
25:38accepts true or accepts one. It goes and
25:42sends that to the list service which
25:47takes in the available for adoption
25:48which then goes and queries from the
25:50repository fetch cats. So cool. So this
25:52this again did what I wanted it to do.
25:55So I'm going to go ahead and uh
25:59uh commit this. You know what I actually
26:01so actually before I do that there's
26:03another general piece of advice that I
26:06have for uh for anytime you're you know
26:09integrating AI into your workflow. Um I
26:12very much think that the the need of
26:15having automated tests inside of your
26:18codebase has increased and it has become
26:21more important um for two reasons. one
26:24because you want to make sure that the
26:26contracts remain stable and you know a
26:28future AI prompt doesn't break anything.
26:31Um, but two, when you actually have
26:34support for uh you you have automated
26:37tests inside of your codebase, the when
26:39you I'm prompting to make a change
26:42inside of my, you know, my cursor uh
26:45window here and I can go and say, hey,
26:46make this change, it can actually go and
26:49run the automated tests uh inside of
26:52this context window and it can go and
26:55verify itself that it did the thing
26:57correctly. Um, so the addition one
27:00additional thing that I'm going to do is
27:01I'm going to have this write some tests.
27:05All right. Uh, so I'm going to say, can
27:07you write some tests? And I already have
27:11a uh I already have a test file here
27:14inside of my
27:16uh service test. So can you write some
27:20tests for the fetch all cats
27:23functionality in the service test file?
27:29>> [snorts]
27:29>> So what I'm understanding from your
27:31process so far just comparing it
27:34>> with um less tightly controlled way of
27:38writing which sometimes I do or maybe it
27:41happens more so in in the front end
27:43you're now writing the back end API
27:44endpoints registering services and
27:47repository I feel like um um you started
27:50small but you're tightly in control of
27:52reviewing every step of the way so you
27:54just don't let it off leash um and Then
27:57you're writing tests so to make sure not
27:59only you're reviewing it, but also tests
28:01are coming in as you're building this
28:03for your back end.
28:04>> Mhm. Correct. Yeah. And so and one of
28:07the really great things about that test
28:09part is like so you can see it right
28:10here. It's popped up. It's like okay,
28:12it's so it just wrote those tests and
28:13now it's like I'm going to I want to run
28:15those tests. So it can run those tests
28:17uh and it run in uh sandbox and it gets
28:20the output of those tests and it goes
28:22and sees the result. Let's see. Did we
28:24run into an issue? uh exceeded. So,
28:26okay. So, I think that it found Yeah.
28:29Okay. So, it found a bug in the test
28:31that it had just wrote because it was
28:33able to run it and actually execute that
28:35code. Um, so it's going to rerun those
28:38tests and make sure that it did what it
28:40wanted to do and it did it. So, the
28:42process of me going and saying now write
28:44tests for the thing that you just did,
28:47it h it gives it a little bit of like
28:50reality like it it it forces it to
28:52actually execute the code. it forces it
28:55to write a test with what its
28:56expectations are for its behavior. Um,
28:59and then and then now I've got a test
29:00there that if I make a change in the
29:02future, it can also modify the test and
29:04verify its contract. Um, so yeah, so
29:06your general summary of of of my process
29:09is kind of correct. It's like so I kind
29:10of start with a a like a shorter leash
29:13and I kind of like give it more and more
29:15and more and more. Um, I would say
29:18professionally I I have reached the
29:20point where I I'm not really doing
29:24There's some scenarios where I go and
29:25say, "Okay, do this very specific,
29:27tightly controlled thing." Um, but I
29:29would say more often than not, I've I've
29:31I've learned I can pretty safely give it
29:34a pretty pretty large leash in the code
29:36bases in which I operate professionally.
29:38Um, so uh I for the most part am I'm
29:44probably about at the level of the pro
29:46the prompting that I just provided where
29:48I'm like build this endpoint. Here's
29:50what you need to do. and I provide it
29:52like the product opinions that I want it
29:54to provide and it can go and infer from
29:57the rest of the codebase of how what I'm
29:59asking for it fits into the codebase.
30:02Um, and yeah, and I always add tests
30:04because it gives it a little bit of um
30:06it gives it a little bit more contact
30:07with reality. Um, okay. So, let's just
30:11let's just go ahead. Let's assume now
30:13that everything is right. So, we're
30:15going to add fully add uh the fetch all
30:18cats uh endpoint. Um and then, you know,
30:23I probably would also test this locally
30:26myself. So, I'm going to just like spin
30:27this up very quickly. I have um I I I've
30:31ran this locally. So, I think I have at
30:35least one cat in my database. So, now I
30:37should be able to just go and say fetch
30:39cats. And cool, it returns all an array
30:43of all of the cats inside of it, of
30:45which I only have one right now. Let me
30:46make another one for my other cat, Ray.
30:49And she is a tor.
30:53Uh, let's create a cat for Ray. Uh,
30:56they're litter mates, so they actually
30:57have the same birthday. So now when I
30:59fetch all the cats, I get both Luna and
31:02Ray.
31:04>> She didn't know you're a you're a cat
31:05person.
31:06>> Oh. Oh, I'm a cat person.
31:10Uh, I can show you photos after. Maybe
31:12you can put some up on the screen. No.
31:14Um, but yeah. No, I'm I'm a cat person
31:16for sure. Um, also too, how's the how's
31:19the size of the screen? It's feeling
31:21like really zoomed in for me, but I want
31:23to make sure it's good for good for
31:24>> I think it it's good. It's good. I know
31:27it makes it hard for you to actually see
31:29what you're doing because it's so big,
31:31but uh on on my end, it's it's very
31:33good.
31:33>> Okay, cool. Yeah, I do I do know it's
31:35Oh, sorry. Go ahead.
31:37Um, no, I just wanted to ask a side
31:39question here. Uh, and that was I
31:41realized um you're still using uh the
31:46agent in the agent mode, not the plan
31:48mode. And also you're not like selecting
31:50any specific model. Is it that like for
31:54the start or when you're tightly
31:56focusing or controlling what it is
31:58producing, you're less worried about
32:00like what model or what mode. Is that
32:02intentional or like what is um how
32:05sensitive you are to those kind of
32:07different models?
32:09>> Yeah. Yeah. So, so I I am sensitive to
32:11these models professionally, right? So,
32:13I I'm what I'm asking of of of uh of
32:17these models right now is actually
32:19really really lightweight. It's this is
32:21a really small code base. The questions
32:23that I'm asking it are really small. Um
32:26so, I just have it on auto mode right
32:27now. So, auto mode is basically it'll
32:29like pick the appropriate model. I don't
32:31know how that actually works underneath
32:33of the hood. Um, but it's generally
32:35good. So, it's that I'm on my personal
32:37license right now, so I have $20 worth
32:39of credits per month. Um, so it's just
32:41like it's it's I would say it's better
32:43in terms of like if you're trying to
32:46optimize a $20 per month cursor license.
32:49Um, I tend to do auto, but but yes, so
32:52professionally, I mean, honestly, I'm
32:54almost always using Opus 4.5. Um,
32:57there's really rare scenarios where I
33:00will actually deviate from that. So,
33:02honestly, like my I just like hardcode
33:04this. It's just always Opus 4.5.
33:06>> I see. Okay.
33:08>> Opus 4.6 did actually come out this
33:10week. Um, I g I gave it a spin for one
33:13day and I've actually switched back to
33:14Opus 4.5.
33:16>> Um,
33:17>> yeah, I have found there was I it I
33:21encountered this. So it was having a
33:24hallucination and I could not convince
33:26it out of this hallucination. It was
33:28basically assuming that there was this
33:30bug with my this underlying library that
33:32I was using and it did not exist. I was
33:34like no the bug doesn't exist like write
33:35a test proving that this bug exists and
33:37it couldn't write a test and it's like
33:38yeah but the bug still exists and I was
33:41in Opus 4.5 and I'm like okay I'm kind
33:43of losing my mind right here. Um so I
33:45switched back to and this was only I
33:47used it for just one day. Um and then I
33:48switched back to Opus 4.5 and it
33:50immediately was like oh yeah you're
33:51right. Yep. I can see from the test that
33:54the the thing that I was previously
33:56saying uh was not true. Um so that was
34:00my experience with it. It's probably uh
34:03just like a one-off thing, but uh but
34:05yeah, I'm still on Opus 4.5. I'll
34:07probably give it another spin this week
34:10and see how it is. Um but that was my
34:12initial experience with it. Yeah, there
34:14seems to be like a um
34:18um kind of have like two different sides
34:21of how people are finding 4.6. Some are
34:25just like what you said um staying with
34:28the 4.5. I'm not really surprised by,
34:32you know, 4.6 or like the people who are
34:34I I see it on Twitter. They're like,
34:36"Okay, what have you done with the 4.6
34:37that's just like blew your socks off or
34:40how is it different?" So it seems like
34:41the 4.5 is still um kind of the safe
34:44zone and trusted model for
34:46>> Yeah. Yeah. I mean definitely like so
34:49the jump from preopus 4.5 to Opus 4.5
34:53was like holy Um the jump from
34:56Opus 4.5 to Opus 4.6 so far has been
35:00like I beyond that one negative
35:02experience that I had with it. It hasn't
35:04felt like profoundly different. Um, you
35:07know, again, maybe it is contextual to
35:10the code bases in which I'm operating.
35:12Um, and maybe there's other scenarios
35:14which just like much better,
35:17but yeah, that was that was basically my
35:19my experience with it. It wasn't
35:21significantly improved. So, I'm still on
35:23Opus 4.5.
35:24>> Okay.
35:25>> Um,
35:25>> and if when you're using these models,
35:27are you um like professionally using it
35:29within cursor or do you use like cloud
35:32code to just look at terminal based?
35:34>> It depend. It depends on the task. Um,
35:37so I do I I still do like cursor. I like
35:39I like cursor because it it still gives
35:41me that like interf I've been coding
35:45well I used to write code like a you
35:48know we used to and like by hand. Um I
35:51like cursor because it gives me the it
35:54gives me this a similar experience that
35:56I'm used to which is probably this is
35:58like a very much like a legacy you know
36:01legacy developer opinion. Um, so I can
36:04still go and I could jump into files. I
36:06can say really specifically highlight
36:08code say, "Oh, this is I want you to do
36:10this very specific thing. My my prompts
36:13are really really specific often because
36:16I have opinions and I want those
36:18opinions to be reflected in the co in
36:20the output, right? I like to have the
36:21code that AI writes virtually be
36:24identical to the code that I would
36:25write. I like to look at it and say,
36:27"Yep, that's how I would have written
36:28it." And I like that to kind of be the
36:31standard of the quality of the code that
36:33I that is output with when I'm using AI.
36:36Um,
36:37>> I think that that is a not necess it's
36:40not necessary in the same way in and
36:43it's still a thing that I'm getting used
36:45to, but it's like
36:48AI there's in in the old world you used
36:52to encounter things where you're like,
36:53"Oh, there's this issue. It's not really
36:56great. Let's like put it on the
36:57backlog." And you like never would get
36:58to it. But in the new world, you're
37:00like, "Just fire off an agent, man.
37:02It'll fix it. it'll improve the thing
37:03that you wanted to do. Um, and so for
37:06those scenarios, it's like that that's
37:07when I'm I'm using more like clawed is
37:09is when I want to have like an agent. I
37:11use I'm a I used to fully operate inside
37:14of my terminal. So I'm a big Vim user.
37:16Um, uh, I so I use like T-m so I just
37:19like spin up a new T-Max pane and and
37:22fire off an agent and and you know let
37:24it go to town. Um, and it's generally
37:26quite good at that. So I would say it
37:30professionally I would say it's it's
37:32more varied than just cursor. Um you
37:35know there's times though I but I would
37:38say probably cursor is my daily driver
37:39right because it gives me that
37:41experience that I'm used to. Um maybe
37:43I'll shake that when I'm like you know
37:45I'm not really doing any you know
37:48jumping jumping in and editing things
37:50myself and I'll just fully switch over
37:52to cloud code. Um but uh but yeah,
37:55that's generally my experience. And then
37:56so to to go back on a question that you
37:58had asked earlier, um oh man, I'm going
38:01to give you such a fun time in the
38:02editing room, by the way. Like
38:04[laughter]
38:05it's you're going to have to cut you're
38:06going to have to cut this down in a in a
38:08fun way, I presume, unless you want this
38:10to be a full hour. Um um sorry. Uh so to
38:14to go back to uh you you asked a
38:16question about plan mode. Um so I do use
38:18plan mode. Um I haven't I haven't
38:21reached that yet inside of my um uh so
38:24basically so I've reached plan mode when
38:26I am not confident that it's going to be
38:29able to come up with the right plan in
38:33the first shot. Right? So the thing that
38:34I just asked it of I know it's going to
38:36be able to do it because I you you kind
38:37of you gain an intuition of what AI can
38:40do the the more that you use it. Right?
38:42And so my intuition of this codebase is
38:45I I I probably don't need to use plan.
38:48Um maybe we maybe we will we'll we'll
38:50we'll do a plan we'll do a plan thing at
38:52the end. We'll give it a really big I'm
38:53basically going to tell it build the
38:55rest of this API right at the at the
38:56very end because we're not going to be
38:57able to step through every single
38:59endpoint. We'll go through a plan mode
39:01and we'll make sure that hey is this is
39:02this going about it the the right way.
39:04Um so we will use that and yeah I use
39:06plan mode when I don't trust that it's
39:08going to come up with a good plan and I
39:10want to see what it plan is before it
39:11goes and executes. But for a lot of
39:14tasks, it's like, I know it's going to
39:15do this right because I've given it a
39:17reasonable enough scope and it's going
39:18to be able to execute based off my
39:20prompt alone. And worst case scenario,
39:22it does it wrong. I click reject and
39:24then I go into plan mode. Um, so yeah,
39:26plan mode is a really valuable tool. Um,
39:29another workflow that that one of my
39:31colleagues uh uh just just introduced me
39:33to is rather than actually using plan
39:37mode, create a file for that for a plan
39:41and actually use uh just use the the uh
39:45uh agent mode [snorts] and have it write
39:48the plan to the file. And that makes it
39:50easier where you can jump in and you can
39:52actually go and edit that file. Plan
39:53mode is like to to edit a plan I've
39:56found it's a little bit more clunky. I
39:57have to prompt it in particular way to
39:59go and edit that plan. Um, but having an
40:01actual file is really nice because you
40:03can actually if you decide you want to,
40:05you can keep that as an artifact and
40:07actually commit that plan so people can
40:09understand the context and the reasoning
40:11behind your decisions in the future. Um,
40:13I think this is going to be a more of a
40:16I think that committing the context and
40:19the reasoning and kind of some artifact
40:22of the prompts I think is going to be a
40:24thing that is going to occur in the
40:27future of like you know AI native
40:29companies like I think it's going to be
40:31like yeah like write this write this PRD
40:34for what the feature that you want to
40:36build out um and you know work with AI
40:40to build out that PRD and and point AI
40:43to that BRD and say, "Okay, now go and
40:45build it." And then also to committing
40:47that PRD because it's it's this really
40:49useful artifact of like, "Oh yeah,
40:51here's the rationale behind all of my
40:52decisions." Cuz sometimes the rationale
40:55behind your decisions, it's lost in this
40:57in this context thread and it's maybe
40:59not reflected inside of your codebase.
41:02>> Yeah, I think that you nailed it. I I my
41:04takeaway from what you said is two
41:06things. one once you start building
41:09different features inside of a codebase
41:10you develop this intuition on what the
41:13agent can do what what they're good at
41:15what they're not so you know where you
41:17can trust it and what not and the second
41:19thing is what you mentioned about like
41:21the this PRD document that you create
41:23this instead of like having using to
41:25plan mode maybe use the agent build that
41:27PRD go in and just make it as tight as
41:30you want then point DLM at it and see
41:32like this is this is a context go build
41:34this now I think I've tried it a a
41:36couple times and I think that's that's a
41:38better better way of using a like um
41:42kind of established plan rather than
41:44just using the plan mode. Yeah. Yeah. So
41:47so yeah. So anyways, it's it's it's also
41:49too like so I think that like we I think
41:51we still there's it's it's this video is
41:55going to be stale in two months because
41:56it's like the the way in which we are
41:58using AI has is changing so drastically.
42:00like I add some new tool to my to my
42:03workflow or add a new way that I'm using
42:06uh AI every single week it feels like.
42:10Um, so it's like there's it's there's
42:12it's it's it's it's
42:15in every regard it's software
42:16development accelerated, right? The the
42:19history of writing code has always been
42:21I've got to learn a new framework. I've
42:23got to learn a new language. I've got to
42:24learn a new thing. You've you always had
42:26to learn, but it was like the cycle was
42:28like a year. And the the world that
42:30we're in now, the cycle is like it's
42:32like every single week it's like, oh my
42:34god, what like what the what is what is
42:36what is Clawbot like? Oh, it's not
42:37clawbot any like it's like anyways it's
42:39there's there's this really really fast
42:41iteration that's happening right now
42:43which is like I think from a
42:45>> I think if you have the right approach
42:47and philosophy it's like you you very
42:49much if you go into this has always been
42:51true if you go into and you you're a
42:53software engineer you want you want to
42:54go into software and you want to write
42:55code you have to have a learning mindset
42:58the entire time throughout your career
43:00there has not been a month in my career
43:02where I have not encountered a problem
43:04where I had to learn a drastically new
43:07thing to be able to solve whatever
43:09problem I'm solving or you know the the
43:12world has changed and now we're using
43:14this new framework. Um you always
43:17constantly have to learn. I think the
43:19that has accelerated more. So you really
43:21have to very much accept like you know I
43:24I don't know what I don't know and I'm I
43:27you need to have to kind of really
43:28really be willing to constantly iterate
43:30and constantly like learn new things.
43:32Um, and yeah, and it's just it's just
43:34more accelerated. And that's true for
43:36everything about AI. It's just more
43:37accelerated. It's more of the same, just
43:39accelerated.
43:40>> Yeah. Yeah. That's so true. It may be
43:42harder to keep up at the speed at at the
43:46speed at which it's changing, but it's
43:48at the very core you're learning, um,
43:50you know, problem solving with new new
43:53tools now.
43:54>> Yeah. Yeah. Exactly. Um, cool. Okay. I
43:56want to do a plan I want to do a plan
43:58mode now just so we can kind of like
43:59walk through that workflow. Um, and then
44:02we can talk. I don't think I'm I don't
44:04think I'm going to I mean I could I
44:05could build out a UI so we can look at
44:07the UI and just give it give a once
44:10maybe when we're talking I'll give it a
44:11prompt. Okay, now build a UI that
44:13interacts with this API and we'll see
44:14how that works. Um, all right, cool.
44:16Okay, so I'm going to yeah, I'm going to
44:18give it I'm going to give it a plan
44:19mode. Um, and I'm going to say um let me
44:23close everything here to make it nice
44:26and clean.
44:27So, oh, let me just add this check mark
44:30here just so it knows. Um, okay. So, I'm
44:35going to I'm going to use this same
44:37thread because it's probably got some
44:38good context inside of it. So, okay. So,
44:42I now want you to build
44:46all outstanding endpoints
44:50as described
44:53in the readme file.
44:56are not yet implemented.
45:00Actually, that's what I'm just going to
45:02do that. I'm not going to give it more.
45:04I have a tendency to really really write
45:06a lot in my prompts, but it you often
45:08would be surprised. And you know what?
45:10Hold on. I'm going to stop this really
45:11quickly. We are going to
45:13>> We're going to use Opus 45. Uh
45:18uh add models. Let me just add Opus 45
45:21really quickly. We could pretend that we
45:23recorded this video before Opus 4. No, I
45:25was talking about Opus 46. All right,
45:27Opus 45 brain mode. So, we're pulling
45:31out the big the big guns here, right?
45:33We've uh we're get we're we're asking it
45:36a really big task. So, we want to use a
45:39really smart model and we did the
45:41>> with the brain icon which is
45:44>> uh thinking which I think that's
45:45actually I think that's the the the way
45:47in which uh cursor actually provides the
45:50context and it operates. I think that's
45:52a harness function and not like a
45:54different model. Um so okay so cool. All
45:57right so open 45 go ahead and build it.
46:00Okay cool. While this is working we can
46:01we could probably we could probably talk
46:04um about other things. So yeah
46:06>> so one thing I wanted to ask is like now
46:09we are doing that same kind of idea
46:11where that your readme file is like a
46:13PRD document. It's just like what I want
46:14to build it and it has enough context in
46:17what has already been done. So you can
46:18go and check those references and then
46:20kind of build the rest. I and we're also
46:23using the plan mode. So it's just like
46:25um doubled up the layer of planning with
46:28a PRD and also plan mode in cursor. Here
46:31I also see like there is an
46:32architecture.md file in in your uh
46:36source code. Is there any other context
46:38you're providing to the LLM?
46:41>> Uh so in this codebase only the
46:44architecture.md file. So I think I I
46:47think it uh I don't even know if it is
46:49reading from this file in this thread.
46:51Um I I bet it I bet it encountered this.
46:54Um but basically so yeah so basically
46:56what this architecture file is is is
46:58what I was kind of describing earlier.
46:59It's like I'm providing like the
47:01highlevel architecture of of of how I
47:05want this uh API to be structured. And
47:07so specifically this API it's like
47:09layered architecture. It's like you know
47:11I've got my at my lowest level I've got
47:14my database that stores data. Then I've
47:15got the repository layer which is the
47:17abstraction that defines how you
47:19interface with it. Then I have my
47:20service layer which can provide
47:23additional functionality on top of that
47:24and then the HTTP layer which is
47:27ultimately what the end consumer of this
47:29API is going to be interfacing with. So
47:32I have some some highlevel architectural
47:35here are the layers and also too for
47:36what it's worth this is this file I I I
47:40gave it the highle context written in
47:42really sloppy English and I had AI write
47:44this right and I verified it I made a
47:47few edits made sure that it was correct
47:49um but it was able to kind of actually
47:51go and you know write this itself so you
47:54don't have to put a lot of effort into
47:55these files but they're actually really
47:57helpful because what you can do is again
48:00like mentioning kind of like how you you
48:02you knew somebody who has like a million
48:04line codebase or whatever. It's like you
48:06don't want the agent to have to do that
48:08every single time. Go and read the
48:10entire codebase to figure out okay
48:11what's the architecture of this thing.
48:13You kind of can provide these like
48:15summarized bits of context. You can do
48:17the work up front provide that summary
48:19and then drop that summary somewhere and
48:21then it's you know a useful bit of
48:22context that can be provided to use in
48:24like other future prompts. Um, you could
48:26use that in your agents.mmd file, which
48:28I believe is automatically pulled into
48:29basically every prompt context inside of
48:32um, cursor. Um, or you can have kind of
48:35more oneoff specific things where you're
48:37like, ah, there's a specific I want to
48:39pull this in because it's relevant and
48:41you can kind of have different markdown
48:42files throughout your codebase.
48:44>> Yeah, I really like this idea of because
48:47as you mentioned, agents MD is just
48:49automatically pulled in. So if you just
48:51bloat that context is not necessarily
48:53always good. But if you're having
48:55multiple different files and put a
48:57reference inside of your agents.mmd to
49:00say hey if you want to learn about
49:01architecture here's here's where it
49:03lives. So it doesn't
49:04>> it pulls it as it needs. So this is how
49:07I do typescript or these are my types
49:09these are my I don't know different
49:11layers and you have like these different
49:13multiple files but which all of them are
49:16referenced in your agents.mmd. So it's
49:18just best of both worlds. So you're not
49:20bloating your context, but you're also
49:22giving it access to specific M markdown
49:25files when it needs to pull pull from
49:27them.
49:28>> Cool. Yeah, that that's a smart idea. Um
49:30I think there's there's repos at work
49:31where we have setups like this. Um I
49:34haven't set that up in my personal
49:35projects. I totally should because it's
49:37like Yeah, cuz I I I I think it's it's
49:39probably a reflection of how I actually
49:41do a lot of prompting. I'm I'm really I
49:43like to participate. You don't see me
49:45build do a lot of prompting like this
49:47where I'm like just do the thing. I'm
49:48like, do the thing in this particular
49:50way. As such, I often don't find myself
49:53needing to have context be automatically
49:55filled because I am often the one that's
49:58providing the context. I think this is a
50:00this is totally like an old way of
50:02operating and it's like I' I'm
50:04definitely shaking it off and I'm kind
50:06of I'm switching into trusting the the
50:09AI agents more and more to go and say,
50:11you know, things like, you know, kicking
50:12off background agents and stuff like
50:14that. That feels like a It feels like a
50:16Hail Mary sometimes when you're like,
50:17can you try to do this thing? I'm not
50:19going to even be participated
50:20participate. Just like submit a PR once
50:22you're done. Um that's definitely uh
50:25kind of like the next layer for sure. Um
50:27okay, but it's it's got a plan. So I
50:29think let's let's review this plan
50:30really quickly before we um before we
50:32continue and then we can press build and
50:34then we can we can go back to chatting.
50:36Um okay, so implement all the
50:38outstanding endpoints. Okay, so there's
50:3914 outstanding endpoints across four
50:41resource types. Here's the architecture
50:43pattern.
50:45Great.
50:48Yep. List all customers. Delete
50:50customer. Looks good.
50:53Delete.
50:56Okay. Update cat. Delete a cat. Yeah.
50:59Cool. Okay. It it appears this isn't a
51:01super complicated codebase. So it I
51:03think it came to a pretty good
51:04conclusion on how it should go and build
51:06these things. Um a lot of my So this is
51:09okay. This is another very small thing.
51:11But so one thing that I did if you're
51:13building a backend API um a lot of your
51:17product decisions come out when you're
51:19building out the database schema and
51:21then everything else on top of that is
51:23just you could largely describe it as
51:25boilerplate. Um so I I build my schemas
51:30like I'm writing my database migrations
51:33myself still like I sometimes I you know
51:36write a prompt to make it like easier
51:38here and there. Um, but there's a lot of
51:40product decisions that come, right? So,
51:42for example, here's I've got
51:44reservations. I have reservations where
51:46it's like every cat can only have one
51:49reservation per hour on and every
51:51reservation is on the hour, right? These
51:53are product decisions that AI can
51:56actually go and look at my database
51:57schema and go and say, "Oh, okay. I
51:59understand this product decision and
52:01actually design the correct API to to
52:04satisfy your requirements." So I build a
52:07lot of I still build my migrations and I
52:09still define the underlying database
52:11models um because when you're building
52:12an API you very often uh are able to uh
52:17it's able to infer these things and
52:19build and build it correctly um from
52:21that um plugin.
52:22>> True.
52:23>> Um okay cool. All right. So now we're
52:26building an entire API
52:29and then so what and then so after after
52:32this two I can send off another prompt
52:34and say just build a UI that goes and
52:36queries from this and we'll we'll see
52:38how it does. Um cool okay while this is
52:41going we'll we'll we'll let this just go
52:43and uh chat more. I think this idea that
52:47you mentioned uh starting from your you
52:50know database schema as the font
52:53foundational level for what everything
52:56else is just kind of build up build on
52:58top of um it makes um a lot of sense.
53:02you can maybe collaborate with uh AI to
53:04build that really go back and forth, but
53:07that that's where you need to probably
53:09spend the most amount of time, you know,
53:11thinking about the use case or the the
53:13business or the service layer or
53:15whatever it is that you're building and
53:17then going back into your data schemas.
53:19I think everything else just really sits
53:22on that foundation.
53:24>> Yeah. Yeah. Exactly. Um this this is
53:27this is how it's always been, right?
53:28It's every everything I I very much like
53:31I have the philosophy your database is
53:33your application um because it's the
53:35thing that breathes life into your
53:36application. It's the thing that you
53:38know persists from from time to time. So
53:40it's like yeah you it's it's a really
53:42consequential thing and and and a lot of
53:44the product decisions that you make come
53:46from this. So it's it's it's definitely
53:48a great place to like if you're going to
53:50be involved and you're building a
53:52backend be involved when you're
53:54designing out your schemas. um the APIs.
53:57Okay, you can go and do this. You could
54:00just have cursor, you know, send a
54:03prompt, build all these endpoints. It'll
54:05probably do a reasonable job. Um so,
54:08okay. So, it's still doing this, but
54:10yeah, so this is definitely a great this
54:11is definitely a great place to if you're
54:13going to participate,
54:15make sure you don't skimp out on on
54:17this. Make sure that this is in the in
54:19the right way that you want it to be.
54:25Now I know um at some point we're going
54:27to also use coding review agents and
54:32services to also look at what we have
54:34produced
54:36>> um from the back end to the front end
54:38>> uh as well. Maybe while this is building
54:40we can also talk about that part as
54:42well.
54:43>> Yeah totally. So this is definitely one
54:45part of the stack that is the AI uh
54:48stack that is very uh I think very
54:52important. Um, so one of the downsides
54:54about uh you know uh like uh AI written
54:59code is it can sometimes have bugs like
55:01this is just kind of like the reality.
55:03Um it can introduce bugs into your
55:05codebase. Uh and that is you know if
55:09you're running like a production grade
55:10application that can be a big problem.
55:12Um so we so I I use uh at work and and
55:16also to personally uh I use a tool
55:18called code rabbit which is basically a
55:22uh uh a tool that will automatically
55:25review your code um when you submit a PR
55:27to GitHub. Um this is actually this will
55:30be a great uh this will we'll make a
55:32branch and we'll submit a PR and we'll
55:33we'll let code rabbit run because this
55:35is we just gave AI like a lot of
55:36responsibility in this PR like build
55:38this whole thing. Um, so we'll see maybe
55:40if Code Rabbit can catch anything that
55:42could be improved. Um, but yeah, it's
55:44it's a really really useful part like
55:47especially so if you're at a company you
55:48haven't adopted AI yet, this is a great
55:51place to adopt it because it's not going
55:53to introduce new bugs into your
55:55codebase. is going to prevent you
55:56prevent bugs because I think that a lot
55:58of the reservation trying behind where
56:01some companies haven't quite introduced
56:03AI into their workflow is because of
56:04this resistance of some nervousness of
56:06like well if I give up you know this
56:09responsibility to the robots like what
56:11if they make a mistake like how will
56:13they you know who's responsible for that
56:16etc etc so I think that concern is it's
56:20it's actually the opposite with like an
56:22AI code review tool it's like no it's
56:24it's reviewing ing your code and it's
56:26it's it's actually it's it's
56:27surprisingly good actually. It's way
56:30better at reviewing code than I am
56:31personally. Like I can review code from
56:33a from a [snorts] design how you've
56:35designed your made your highlevel
56:38decisions. Um but yeah, like line by
56:40line code reviewing like catching like
56:42oh you've got a one-off error here or
56:44like oh you're using this this uh you
56:46know API incorrectly or something. Um
56:49I'm quite bad at you know because it it
56:52just requires like such a lot of effort.
56:54Um, okay. It's asking to uh run some
56:57tests here. So, I'm going to let it run
56:58some tests. Um, but yeah. So, so yeah,
57:01so we will we will we will submit this
57:04uh through uh a PR and I have I have on
57:06this repo I have Code Rabbit wired up.
57:08Um, so we'll see what it can do.
57:11>> Beautiful.
57:11>> Um, okay, cool. It says build it. Um,
57:15we're not going to review it. We're
57:16we're in, you know, ourselves. We're not
57:19going to review it. Okay, keep all Yeah,
57:21it got it got So, see, look at that. key
57:23business rules implemented. So, as I had
57:25mentioned, it's important to write
57:27inside of your database schema. A lot of
57:28your like, you know, you make a lot of
57:30the product decisions in the business
57:31rules. This was a this was like a
57:33business rule decision that I had
57:35written into my schema and it was able
57:37to infer this and and and apply that.
57:39>> Um, so, okay. So, cool. So, I'm going to
57:42we're going to add this. Oh, we're going
57:43to go to a branch. Uh, we're just going
57:45to call this full API.
57:51All right. Let's just add Okay. Uh
57:55uh adds the full API now. Adds
58:06uh full API.
58:09Okay. So, cool. So, let's go over to
58:14let's go over to the repo here. Um, let
58:17me let me move this over and pull this
58:21over here by itself. And let me close
58:24this down.
58:26[sighs]
58:27Okay, cool. So, let's go over to the
58:29repo here and let us uh let's submit a
58:32pull request here. Um, this is exactly
58:34the same workflow that you would
58:36normally use on a team. Um, so I'm going
58:39to submit this pull request here. Uh and
58:42look, yeah, this is uh this is a lot of
58:44code that if I submitted a PR like this
58:46to uh to one of my co-workers, they
58:49would be like, can you please break this
58:51down into multiple uh uh you know, PRs
58:54because it's so big. But now, because we
58:56have we have AI code review, the risk of
59:00a PR this large has gone down quite a
59:02bit because it's like all those like
59:03actual like bugs that like might pop up
59:05and might manifest are uh are reduced
59:09because it's going to go and check out
59:10the PR. So, look. So, okay. So, this
59:12cute little rabbit here, uh,
59:16goes and says, uh, okay, I'm going to
59:17review your PR. Uh, it might take a few
59:19minutes. It usually doesn't take a few
59:20minutes. It's usually actually very
59:22quick. Um, and, uh, if it catches any
59:25issues, it's going to add a comment
59:27inside of this PR um, and say, "Hey,
59:30have you considered this? You know,
59:32maybe, oh, this is looks like a bug."
59:34Hopefully, there's actually a bug. If
59:35there's not a bug, we can force a bug. I
59:37can introduce like a one-off error or
59:39something like that.
59:40Um
59:42and uh we'll see if we'll see if this uh
59:44catches it.
59:45>> Catches it. Yep.
59:46>> Yeah. Yeah. But but yeah, no, Code
59:49Rabbit rabbit code rabbit is really
59:50great. I um I'm uh definitely pretty
59:52friendly with the team there. Uh it's a
59:54super super talented team that's
59:55building out this product. Um the thing
59:57that's really great about Code Rabbit is
59:59they are building out a it's like a very
1:00:03focused tool, right? So you have other
1:00:05tools like like uh you know cursor has
1:00:07bugbot and you know GitHub has their
1:00:09their you know one tool uh with uh uh
1:00:13what is it called whatever their code
1:00:15review tool is called. Um anyways
1:00:17similar functionality. Yeah.
1:00:18>> Yeah. Yeah. Similar functionality. I
1:00:20really like how code rappers are really
1:00:21really focused on this one particular
1:00:24business concern. Um so it actually is
1:00:26like a really really really solid
1:00:28product. Um, so we'll see if it if it
1:00:31can uh if it can prove me right though
1:00:33and catch catch a bug. Hopefully AI
1:00:35introduced a bug and Code Rabbit can can
1:00:37do something. But it's this is such a
1:00:40simple thing I'm asking AI to do like
1:00:41these endpoints that I'm asking. It's a
1:00:43it's a green it's a green field
1:00:45codebase. It's not really simple
1:00:48complicated business concern like I'm
1:00:50willing to bet there might be no bugs
1:00:51inside of this PR. Um, so we might have
1:00:54to force one but we'll see. We'll see.
1:00:56We'll see how it goes. But I like the
1:00:58idea that you mentioned it's a very good
1:01:01entry point for businesses that are
1:01:03still skeptical um to use AI in that it
1:01:07is just it can also review codes that
1:01:11regular engineers are writing if anybody
1:01:14is writing code by hand anymore. But um
1:01:17it can sit on top of what you're doing
1:01:19at the end of the stack to just review
1:01:21the PR codes and especially when there's
1:01:23like big enough changes. Um this goes
1:01:27line by line and the level of detail
1:01:30that it can have the review on your
1:01:32codebase. Usually no
1:01:35uh human being does that level of code
1:01:37reviews. It's just more so high level or
1:01:40the PR needs to be so small that can be
1:01:42manageable to review it or it's just
1:01:44like very high level. But this thing can
1:01:46just go inside.
1:01:48>> How long to
1:01:50>> Oh. Oh, sorry. Go ahead.
1:01:52>> Um, no. I I was just gonna ask how long
1:01:54would it usually take to
1:01:56>> to kind of review a Yeah. So, this so
1:01:58this is a bigger PR. So, this might take
1:02:015 minutes. Um, but so it's certainly
1:02:03going to be way faster than a human can
1:02:05get to actually go and review your PR.
1:02:07Um, so but so one additional thing that
1:02:09that I'll like to say about this is kind
1:02:11of to add on to what you've said. This
1:02:13is an additive thing to a human a human
1:02:16review, right? If you're working on a
1:02:18team, um you you still probably do want
1:02:20a human review to approve before you
1:02:23know you you you you go and say, "Okay,
1:02:25let's merge this in." Um that's
1:02:27certainly what we what we do at Clerk.
1:02:29We don't go and say, "Oh, okay, let's go
1:02:30and merge this. Let's go and merge this
1:02:33in just because code rabbit thought it
1:02:35was good." Um it's a fully additive
1:02:37thing that can catch things that the
1:02:39human might not catch. Um, and kind of
1:02:42as you mentioned, yeah, it's it does
1:02:43that line by line. It's very distrustful
1:02:47of your code. It doesn't like when when
1:02:48a human's reviewing your code, I would
1:02:50say you often kind of take like I trust
1:02:52that this person is using these
1:02:54interfaces correctly. Like maybe that's
1:02:56like maybe the wrong posture to take,
1:02:58but it's like you know if you get a if
1:03:00you get a you know uh a 1900 line note
1:03:05like it's basically a 2000 2,000 line
1:03:07decode PR you know you're going to have
1:03:10to you're going to have to skim to some
1:03:13extent on some things like you're not
1:03:14going to be able to review every single
1:03:15line be like oh yeah how does this how
1:03:17does this specific function work and you
1:03:19have to jump say oh how does this
1:03:20function work like but code rabbit goes
1:03:22and does that it will actually trace
1:03:24basically every function function call
1:03:26that you have and it will be like oh
1:03:27yeah you're using this API correctly or
1:03:29oh no you're using this API incorrectly
1:03:31um so uh yeah it's it's definitely like
1:03:35an additive thing right don't treat it
1:03:37as like it's a replacement for human
1:03:38reviews like I think that makes I think
1:03:40that makes people especially teams who
1:03:42are nervous about AI in general um
1:03:45that's not the go that's not the goal of
1:03:46a tool like this tool like this is like
1:03:48to help you catch additional things and
1:03:50this and this this tool does help you
1:03:53catch bugs from production like we There
1:03:55are there are actual bugs that like I've
1:03:58gotten human approvals and it goes and
1:04:00says, "Oh, there's an issue." And it
1:04:02catches a and it catches a thing. Um
1:04:04like this happens quite often. Um it's a
1:04:07really really invaluable part of our
1:04:08process. Like we I'm I'm a huge fan of
1:04:11Code Rabbit.
1:04:12>> Beautiful. Yeah, they're um they're
1:04:14kindly respons uh sponsoring this video
1:04:16as well. So there's a link down in the
1:04:18description if anyone wants to check
1:04:19them out. Uh, we're going to have
1:04:22hopefully more content about how to
1:04:24integrate this into your workflow and
1:04:26use it um maybe with Brandon in future
1:04:30again, but definitely check them out.
1:04:33Awesome. Um, yeah, cool. Okay, so we
1:04:35just got we just got the response here
1:04:36from from the code rabbit review. Um,
1:04:39and okay, it's it found a few things.
1:04:40So, let's see what it found. Um, so
1:04:43okay, so a non-atomic multi-write. Um,
1:04:46so I think that uh basically we're not
1:04:48doing something in inside of a
1:04:50transaction here. So if for whatever
1:04:53reason your uh I think it's in the it
1:04:56appears to be in the adoption service.
1:04:58Maybe this is like when it's maybe it's
1:05:00like when the adoption thing is
1:05:01approved. Um and you're and at the same
1:05:03time presumably we're supposed to
1:05:05transfer the owner of the cat to the
1:05:06person. Um this can fail leaving a cat
1:05:09in limbo which would be so say it they
1:05:11would be marked as adopted but not have
1:05:13an owner. Um, so this is a major issue.
1:05:15Um, so, you know, I would actually go
1:05:17and say, "Oh, okay. Let's go let's go
1:05:20and fix this." Um, let's see here. So,
1:05:22birthday clearing uh is silently
1:05:25ignored. Um, so yeah, here's probably a
1:05:28pretty legitimate issue. Um, and then uh
1:05:32here's uh another one. Let's see what
1:05:34this is. Struck comment misleads about
1:05:35null. Um, yeah. Okay. So, like it needs
1:05:38to be it needs a little bit more like
1:05:41clarifying comments. So here's here's
1:05:43one last thing that I'll show. I'm not
1:05:45going to fix all of these because you
1:05:46know we're not going to this is not a
1:05:48real real codebase. This is just a fun
1:05:50codebase. But like these are actual real
1:05:52things that you would want to fix if you
1:05:53were in a real codebase because even
1:05:56even though the the the issues that you
1:05:58think well ah that will that case will
1:06:00never happen like you know a transaction
1:06:02ah do we actually really need a
1:06:03transaction? What are the chances that
1:06:04the database fails on the second thing?
1:06:07um when you're operating at scale in a
1:06:08real codebase and you have you know uh
1:06:10you know 10,000 requests per second to
1:06:12your API um edge cases happen all the
1:06:15time so you would actually want to fix
1:06:17this. So, here's one of the great things
1:06:19about Code Rabbit. Um, so I'm using
1:06:21cursor. Um, I can code rabbit provides a
1:06:24prompt that I can go over to cursor and
1:06:28let's see. Oh, here we are. Um, I can go
1:06:30go over to cursor. So, I can just go and
1:06:31say copy this prompt right here. Uh, and
1:06:34I can go and just drop this in here. I'm
1:06:37not even going to review it and let's
1:06:39see what happens. Um,
1:06:42I really like that feature. So it
1:06:44plugged out the issue, gave you a
1:06:47prompt, copy pasteed in your agent, it
1:06:50just pointed at the place goes and fixes
1:06:53that with enough context.
1:06:55>> Yeah. Yeah. And then so one so we'll
1:06:57we'll see. It's pro I think it's
1:06:59probably going to be able to fix it. I
1:07:00have a way to create a transaction
1:07:01inside of this codebase. Um,
1:07:05>> one thing I want to ask people while
1:07:06this is doing like how um, sensitive are
1:07:11you in checking your context current
1:07:13context window? I know cursor has this
1:07:16thing that you could turn on that it
1:07:17shows how much of the context it has
1:07:18already used like there's like a little
1:07:21radar there. Do you check that? Are you
1:07:24worried about like if you're blowing out
1:07:26the context or cuz you just keep pasting
1:07:28it in the same kind of dialogue that you
1:07:30have because it has relevant information
1:07:32in in what it has already done. Uh do
1:07:35you ever start new chats or if yes at
1:07:39what point?
1:07:40>> Yeah. So I I usually so I usually create
1:07:43a new chat every time I move into a new
1:07:45problem. Right. So it's like it's almost
1:07:47like one to one. We use a we use linear
1:07:48for our issue tracking system. um it's
1:07:51almost one one to one when I'm working
1:07:53on you know build this particular
1:07:55feature and we have a linear ticket for
1:07:57it I try to keep the same chat window
1:07:59because there's usually relevant context
1:08:02in either my prompts or what it has
1:08:04fetched before um so I'm usually not too
1:08:07terribly concerned about it the the
1:08:10um like I I do keep an eye on like what
1:08:13my costs are inside of C like I I can
1:08:15access my dashboard um the ROI on any
1:08:18given prompt for my business is it's
1:08:22it's it's not I I never encounter a
1:08:24scenario where it's like, "Oh my god,
1:08:25I'm like spending too much on tokens."
1:08:27Um uh so it's not a thing that I super
1:08:30concern myself with, but I do sometimes
1:08:33want to clear the context because I've
1:08:35moved on to a new problem and I don't
1:08:36want it to get confused that it's still
1:08:38working on the same problem. Sometimes I
1:08:39have had that happened where I moved on
1:08:41to a new problem and I haven't changed
1:08:43the window because I forgot to change
1:08:44the window. Um, specifically because we
1:08:47are just like working on like we're like
1:08:48building the API is like I would say
1:08:50what the task is like the initial build
1:08:52out of the API. I haven't changed the
1:08:53window because I think there's probably
1:08:55valuable stuff up there.
1:08:56>> Yes, makes sense.
1:08:58>> Yeah. Um, cool. Okay. So, let's see what
1:09:00it went and did. Um, so, okay. So, I
1:09:02think now it's making a uh it's
1:09:06beginning a transaction
1:09:11and it's committing the transaction at
1:09:12the end. Cool. So, let's go and add this
1:09:15um uh fix uh atomic
1:09:20uh transaction issue. This I'm just
1:09:23going to say fix transaction issue. Um
1:09:26look at me worrying about my commit
1:09:27messages on a project that does not
1:09:28matter. Um I cannot I cannot train it
1:09:32out of myself. [laughter]
1:09:34Uh okay.
1:09:37Uh okay. So, one of the great things
1:09:39about code rabbit as well is it's like
1:09:41okay cool. you have this issue,
1:09:44Code Rabbit's going to see that new
1:09:45commit come through. It's going to say,
1:09:46"Oh, you fixed that issue and it will
1:09:49resolve this conversation." Just like if
1:09:50you had a human reviewer submit a PR and
1:09:52they say, "I want you to fix XX and X."
1:09:54You submit some commits. You reerequest
1:09:56a review. The usually the person who
1:09:59submitted the concerns go and say, "Yep,
1:10:00you resolved you addressed my issue. I'm
1:10:02going to resolve this comment." Um, so
1:10:04it's exactly the same flow in in code
1:10:06rabbit as well. Um, so the great thing
1:10:09is that you do not have to learn how to
1:10:11use code rabbit. So look, it looked it
1:10:14just resolved it addressed in commit
1:10:16this and you can go and look. Okay,
1:10:18here's where it was addressed. Um,
1:10:22so yeah, so that's the great thing. It's
1:10:23you do not have to learn how to use a
1:10:25tool like this. It's just it's just uh
1:10:28it's it's it's just it's the same exact
1:10:31interface of if you were dealing with a
1:10:32human reviewer on your PR, which
1:10:34[snorts] pretty much every developer,
1:10:36they know that workflow. they know how
1:10:37it works. Um, so and know one more thing
1:10:41I I'll provide because code rabbit has a
1:10:43lot of features and this is this is a
1:10:44feature that I also like. Um, I'm just
1:10:47going to res I'm going to respond to
1:10:49code rabbit in natural English. Um, so
1:10:52there's a bunch of things that you can
1:10:53do. Um, so I can respond in natural
1:10:56English and go and say, you know, let me
1:10:58provide you some more context and it'll
1:11:00go and re-review with that context. I
1:11:02can go and say I disagree with this and
1:11:04it will go and say it'll reconsider
1:11:07based off your prompt effectively. You
1:11:09could also do another thing uh where
1:11:11code rabbit has this thing called
1:11:12learnings where basically you provide
1:11:15some feedback uh on uh uh on a on a PR
1:11:22uh on an issue that it had brought up.
1:11:24Um and you can say oh this is actually
1:11:26not a thing. Here's some context of why.
1:11:30Um, so what it goes and does is it goes
1:11:32and takes that and it goes and say, "Oh,
1:11:33okay. You've actually taught me a new
1:11:35thing about your codebase. I'm going to
1:11:36file that away so I don't bring up this
1:11:39category of issue that is actually maybe
1:11:41not a problem." Again, um, so I'm just
1:11:43I'm going to say on this one, I'm just
1:11:44going to say I'm not um concerned about
1:11:48this issue. Uh this is this is a simple
1:11:52pet project and a a case that does not
1:11:57need to be uh
1:12:01handled.
1:12:04Okay. Um and then so you give it a
1:12:08minute, Code Rabbit will respond with
1:12:10the power of editing hopefully.
1:12:15Sorry, I've I'm giving you a humongous
1:12:17editing job. Um
1:12:20or you could just make this a three-hour
1:12:21video if you want.
1:12:22>> Yeah. No, it would be it's just like
1:12:24we're walking end to end from an idea
1:12:27designing architecture and code reviews.
1:12:30It's it's super fun and useful for
1:12:33anyone who wants to use these tools.
1:12:36>> Yeah. Yeah. Um cool. So, okay. So, Code
1:12:38Rabbit is has saw this issue um come up.
1:12:42It's got the little eyes emojis, so it's
1:12:44probably thinking about it. Um, we'll
1:12:46see how it responds.
1:12:49I don't know if GitHub will.
1:12:53Yeah, look at this. Understood. I'll
1:12:54make a note of that for future reviews,
1:12:56right? So, it has this like memory
1:12:59>> and it, you know, in the future if a
1:13:01similar category of issue comes up, it
1:13:03it it won't bring it up. Um, usually
1:13:05there's scenarios where it will
1:13:06actually, you know, there's times where
1:13:07where Code Rabbit provides feedback and
1:13:09it's like it's missing context because
1:13:11it's not inside of the, you know,
1:13:12context of the PR or it didn't, you
1:13:14know, build that context. It's missing
1:13:16some context. You could provide some
1:13:17context and it goes and stores that in
1:13:19its bank is basically. Um, so that's um
1:13:22that's basically it. I'm going to I
1:13:24think I'm going to merge this PR. I'm
1:13:25I'm happy with my review. Um, I fixed
1:13:28the only thing that I was like really
1:13:30concerned about. Um, so I'm going to
1:13:32merge this PR. You know, if I was in a
1:13:33company, I'd also wait for a human
1:13:35review. Um, but uh, you know, here we're
1:13:38just rocking it solo. So, look at that.
1:13:40Luna's Cat Cafe, the API is done. Um,
1:13:43>> beautiful.
1:13:44>> If we have the time, the last thing I
1:13:46want to do is I want to build a front
1:13:48end. And I'm just going to tell cursor
1:13:50build a front end for this and see how
1:13:54it how it goes. I think that would be
1:13:56fun.
1:13:56>> Cool.
1:13:56>> Yeah.
1:13:57>> All right. So,
1:13:58>> see it come to come to life.
1:14:01>> Yeah. I'm gonna So, I'm going to spin up
1:14:02my uh I'm going to spin up my back end.
1:14:05So, it has uh it has it available to it
1:14:09itself. I don't know if it's going to
1:14:10attempt to query it, but I'm going to
1:14:12I'm going to have it running. Um, all
1:14:14right. So, this is a Do I want to make a
1:14:18new No, I don't want to make a new a new
1:14:20thread because there's useful context
1:14:21about the endpoints inside of this
1:14:22thread. So, okay. So, we've got the API.
1:14:26Um,
1:14:27I'm going to make a new folder. Oops.
1:14:30I'm going to make a new folder called
1:14:35front end. Um, do you have a framework
1:14:37of choice? What are you usually uh doing
1:14:39your front end work in?
1:14:40>> Nex.js.
1:14:41>> Next.js. Cool. Let's use Next.
1:14:43>> Recently have been dabbling into
1:14:46Tanstack start.
1:14:48>> Cool. Yeah, we like we like tanstack.
1:14:51>> We like we like Nex.js. It's uh it's
1:14:54getting a little rusty. Oops. Not ls.
1:14:56I'm not in my terminal. Um, okay. So let
1:14:59me um let me run a command here. Okay.
1:15:01So let's build
1:15:04uh a front end for this API
1:15:09in the front end. I think I need to have
1:15:13a file in here
1:15:16for cursor. Um in
1:15:21yeah it won't recognize a empty
1:15:23directory. uh let's build a front end
1:15:25for this API and it should be a nextjs
1:15:29js project. Okay. So I would say so the
1:15:32homepage
1:15:34should be a list of cats. We should be
1:15:38able to to click into a cat and make a
1:15:44reservation
1:15:47uh to book some time with the cat. Uh
1:15:52there should be an adoption form page
1:15:57where you can submit
1:15:59an adoption
1:16:02request.
1:16:04Uh
1:16:07you might have been able to infer this
1:16:09from like these fields in the schema
1:16:12even to say all right maybe maybe
1:16:13there's an adoption application here
1:16:15because there is a field for it here.
1:16:17>> Yeah. All right. Let's let's do it.
1:16:19Let's do it. Let's um let's all we'll
1:16:21the only direction we'll do is we'll
1:16:23tell it to be an X.js project. I like
1:16:24that it's next.js because I know how to
1:16:26operate next.js as well.
1:16:28>> All right. Cool. Yeah. Yeah. Yeah. You
1:16:29you're you're probably totally right.
1:16:30So, let's build a front end. So, let's
1:16:32see what what is what is it what does it
1:16:34think that uh that that Luna's cat cafe
1:16:37should be?
1:16:37>> Um
1:16:39yeah, I I'm I'm such a I'm famously an
1:16:43over commenter in my code. Um you don't
1:16:45see that here because AI doesn't over
1:16:47comment. I'm an over commenter in my
1:16:49code and I'm like an over like providing
1:16:51context to prompter uh in
1:16:54>> I can tell I can tell I mean that that's
1:16:56how you you would get good quality
1:16:58results. Um I was going to ask if you
1:17:01ever use voice to kind of like whisper
1:17:05to voice to text but with the amount of
1:17:07references you create probably it's just
1:17:09easier for you to type because you're
1:17:11just like copy pasting highlighting
1:17:12putting it that in the cont that that
1:17:14would be impossible with with the voice
1:17:16thing. Yeah. Yeah. So, so I do not, but
1:17:19I have co-workers who do um and they do
1:17:22really like that because it's like uh
1:17:24one of my co-workers literally just
1:17:26brought up um this semi- recently where
1:17:28they were like, I want to be able to,
1:17:31you know, work on a thing when I'm like
1:17:32cooking and you know, I've got my
1:17:34headphones on that have a microphone.
1:17:36Like, I want to just be able to interact
1:17:38with with uh you know, my AI agent to
1:17:41like continue working on my codebase
1:17:43while I'm cooking dinner. And it's like
1:17:45I mean that's not a that's not a
1:17:49workflow that I myself uh think is will
1:17:53be additive to my life. Like I do have a
1:17:56pretty good separation. Like I'm I'm a
1:17:57I'm a I'm at like a a desk basically a
1:18:01desktop computer when I'm at work. It's
1:18:03technically a laptop, but I have like a
1:18:04desktop setup. I like having I'm at my
1:18:06desk and I'm working and I'm not at my
1:18:09desk and I'm not working. I think if I
1:18:11started introducing that workflow into
1:18:13my life, that would not be super great.
1:18:14But it's like I think there is something
1:18:16nice about being able to kick back on
1:18:18your chair and like lean back and just
1:18:21be like, let's work, you know, really
1:18:24relaxation mode. I think there is
1:18:26something to that. Um, so I don't use
1:18:29it, but I have co-workers that use it
1:18:30and co-workers who really like it. Yeah,
1:18:33I think more um also um besides the fact
1:18:36that you can multitask or I don't know
1:18:38speak while you're doing other stuff, it
1:18:41is also sometimes that you can speak
1:18:43faster than you can type. I mean you're
1:18:44you're pretty quick but usually humans
1:18:48can speak faster. So you can just get
1:18:50more um and then sometimes this uh tools
1:18:52like Visper, they can kind of fix what
1:18:56you're you're saying. you can just like
1:18:58um blur whatever you want to say and it
1:19:01just corrects what you wanted to
1:19:02actually say and it creates a better
1:19:04kind of sentence and prompt and I have
1:19:06seen that done but with but when you're
1:19:08providing references like you are and
1:19:11copy pasting and lines and ad signs and
1:19:13whatnot you can't I'm not sure if you
1:19:15can do that with the voice yeah I mean
1:19:17I'm willing to bet that like you can d
1:19:19you still direct it in the same way
1:19:21where you could say oh yeah make sure
1:19:22you reference you know how I'm using the
1:19:25repository function inside of my cat's
1:19:28repository, right? And and it could
1:19:30probably figure out where where you're
1:19:31going. Like, but yeah, I'm Yeah, I'm
1:19:33like I've I've I've always been this
1:19:35way. I've always been just like more
1:19:36information is better. And also too,
1:19:38this is this is a pro this is a pro tip
1:19:40for uh for those of you who are, you
1:19:42know, adopting AI and in your codebase.
1:19:45AI loves comments. Just like how humans
1:19:47love comments, AI absolutely loves
1:19:51comments. it you you're basically
1:19:53providing it inline contextual
1:19:55information when it goes and says oh I
1:19:57need to read this file if you add
1:19:59comments of like the wise and like why
1:20:01are you doing things it's like it can
1:20:02gain that context right as it's reading
1:20:04the code um and I've absolutely found
1:20:07that like my uh crazy over commented
1:20:11code bases AI works way better I can
1:20:14provide shorter prompts to it and get
1:20:17the result that I want because it can
1:20:18infer all of the context so it's like
1:20:20you know you're not only just writing
1:20:22comments for humans now like comments
1:20:23are really great for AI when you like
1:20:25hey I want to provide context you know
1:20:28inline every time an AI agent basically
1:20:29runs through this file it's like add a
1:20:31comment it's the same exact same exact
1:20:33way you would comment for humans um but
1:20:35it it it
1:20:36>> it it will you yourself uh will
1:20:39experience some benefit um in a way that
1:20:42you didn't um look at this it's it's
1:20:44totally it's totally building it um
1:20:48>> run build command to test everything is
1:20:50working there Yeah, I have a I have a a
1:20:54I have a side project which is vibe
1:20:56coded vibe coded and it's like I'm
1:20:58totally I'm totally constantly impressed
1:21:00by it. I'm just like how can it do this?
1:21:02Um so okay so the API is running on port
1:21:068080. So let's go and in another
1:21:08terminal here uh let's go uh cd frontend
1:21:12and mpm rundev.
1:21:17Oh it's just opening in cursor.
1:21:19>> Yeah. All right, cool. All right, so
1:21:22>> adoptions. There was that tab in of the
1:21:25>> Yeah. Yeah. Yeah. I didn't I did not
1:21:27tell it anything. Okay, so let's go to
1:21:28cats. Let's add a cat. All right, so
1:21:31we've got Luna.
1:21:33Um, she is a tuxedo
1:21:37cat.
1:21:38Let me see. Is it sending the Yeah, it's
1:21:40sending the requests here. Just did an
1:21:42options request. Uh, okay. So, let's
1:21:45just I'm just going to Oh, this is a
1:21:47future birth. Let's not do a future
1:21:48birthday. Let's say she was just born.
1:21:50Failed to create cat. What's going on
1:21:52here? Node.
1:21:56Failed to create cat. Let me see. Can we
1:21:57inspect in here? Uh, is that I've never
1:22:01used this. No, not components.
1:22:04>> Yeah. Okay, you inspect. So, let me
1:22:05look. So, network. Let's see what's
1:22:07happening.
1:22:10>> Uh,
1:22:13what? Next.js original. Oh, is this
1:22:15doing a server side request? Let me see.
1:22:18Failed to create cat. Give me some more
1:22:20information. All right. I'm going to I'm
1:22:22just going to say uh
1:22:25whenever I attempt to create a cat, it
1:22:30fails to create the cat. Oh, you know
1:22:33what? There might be a corores issue
1:22:34because it's running options requests.
1:22:36That's all I'm getting. Um let's fix
1:22:39this.
1:22:40Uh I Let me say Oh my god. Give it the
1:22:45context. Give me the context. Why is it
1:22:48not working?
1:22:50Is it
1:22:51okay? Oh, control L. Sorry. You can edit
1:22:55this out. I want to add to chat.
1:22:58All right. I think we are. Okay. So,
1:23:01this is an issue.
1:23:03>> This is an issue with the uh back end.
1:23:05So, the back end I don't have corores
1:23:07configured. So, uh it basically this is
1:23:10like a security thing for those of you
1:23:11who are unfamiliar with corors. I mean a
1:23:13lot of people are familiar with cros
1:23:14because a lot of people run into this
1:23:16problem.
1:23:16>> Um so I need to uh I need to open this
1:23:19up.
1:23:20>> So your front end is not hosted from the
1:23:22same kind of port that your back end is
1:23:24running. So browsers are like uh having
1:23:26that issue with the course. One thing
1:23:28about Nex.js that I find really really
1:23:30useful. They have this MCP tool called
1:23:32Next Dev Tools. Uh and in NexJ 16 you
1:23:36can just run that. it it has like an MCP
1:23:38server that gives your agent a window
1:23:40into the runtime server so it can read
1:23:43the runtime issues and provide more
1:23:45context. So sometimes you could just
1:23:47type in and say hey next dev tools tell
1:23:49me what's going on and you can see that
1:23:51there's like 29 issues there next is
1:23:53showing on the browser it actually can
1:23:56read all of those provided back to the
1:23:58LLM and then that just goes walks
1:24:00through those issues one by one and
1:24:02solves them.
1:24:04>> Cool. Okay, we verified it indeed was a
1:24:06cause issue because now I'm seeing the
1:24:08total cats, the total available for
1:24:10adoption. So, let's um I don't know.
1:24:12Let's let's mess around with this uh
1:24:14with this UI. Um let's make a new cat.
1:24:18Let's call him Fubar. Uh and he's just
1:24:22uh let's say he's an orange cat. Uh and
1:24:25he was born I don't know here. Okay. So,
1:24:30cool. So, we've got Fubar. Let's look at
1:24:32Fubar. Cool. He's available for
1:24:34adoption. No reservations yet. Let's
1:24:37book a reservation with Fubar. Oh, wait.
1:24:38We don't have any customers yet. Let's
1:24:40make a customer. Um, let's make a
1:24:42customer. Let's call Moran.
1:24:45He's loves cats. Um, let's go back to
1:24:50Fubar and let's book a reservation. So,
1:24:55Ron just gave us a call and he said,
1:24:56"Hey, I'd really like to meet Fubar uh
1:24:59like ASAP." So, it's 11:35 right now.
1:25:01So, he's going to be in here by noon.
1:25:03Um, so let's book a reservation. So Ron
1:25:06is going to Ron is going to meet with
1:25:08Fubar. Um, and uh, cool. Let's say they
1:25:11met. So Ron,
1:25:14okay, so no adoptions yet. So okay,
1:25:16let's say that Ron is really happy he
1:25:19met Fubar. So Ron wants to now adopt
1:25:22Fubar and he's going to submit an
1:25:24application. Um, and the staff really
1:25:28appreciated how uh, Ron treated Fubar.
1:25:32Uh, and they're going to approve the
1:25:34adoption. Unknown cat. Oh, a bug. Let's
1:25:37see. Let's see though if if the adoption
1:25:39actually happened happened. Uh, so Total
1:25:42Cats. Okay, look at this. Total Cats
1:25:44available for adoption too.
1:25:46>> So, so Ron has now adopted Fubar. So,
1:25:51view details.
1:25:53>> It doesn't have it doesn't have uh any
1:25:56any details about who the owner is, but
1:25:58that's okay. We don't need that. Um but
1:26:00so not notably though I know it did the
1:26:02thing because he now there's only uh two
1:26:06that are
1:26:06>> available. Yeah.
1:26:08>> Cool. It's great.
1:26:09>> Let's just close that. We're not worried
1:26:11about these issues.
1:26:12>> And uh
1:26:14>> Cool. There you go. My cat cafe is is is
1:26:17ready to open for business [laughter]
1:26:21>> live. All right. Beautiful. That was
1:26:22pretty cool. We built it end to end. I'm
1:26:25talking about how you're using AI in
1:26:27different um capacities, really tightly
1:26:30controlled small tasks with context, but
1:26:34also using the plan mode, using markdown
1:26:36files for the architecture to giving it
1:26:39more room um to go and build stuff based
1:26:42on the context you're providing on how
1:26:44you're doing things. We looked at your
1:26:47PRs and the code review with code rabbit
1:26:49that just goes in and kind of finds
1:26:51issues that you may not have noticed and
1:26:54then you can chat with code rabbit
1:26:56either provide commits that fixes those
1:26:58issues it picks up on those or you can
1:27:00just comment back and say don't worry
1:27:01about this. That was a very cool part of
1:27:04this whole workflow that you could just
1:27:06implement AI into whatever it is that
1:27:08you need to whatever extent you're using
1:27:09AI, you can just use that code review
1:27:12right now and then at the end building
1:27:14an XJS front end for it that just talks
1:27:17to this backend API endpoint.
1:27:19>> Yeah. Yeah. So we did it end to end. Um
1:27:22that would absolutely have not been
1:27:24possible in a one-hour uh meeting to
1:27:27build an entire API with a front end.
1:27:29Um, like so like there's definitely a
1:27:32it's it's like a big unlock for sure.
1:27:34Like obviously, you know, maybe I it's a
1:27:37little dubious of how production grade
1:27:38it was because I didn't review any of
1:27:40it, but it's like it works. It's like
1:27:41you got a proof of concept working. Um,
1:27:43and uh, yeah, so it's definitely uh, you
1:27:46know, we're in a new era for sure.
1:27:48>> All right, folks. So, that was it. If
1:27:50you have any questions, uh, hit me up
1:27:52down in the comments. If there are
1:27:53things that you do in your workflow, let
1:27:56us know and uh, we'd love to hear back
1:27:58from you. And hopefully we'll have
1:28:00Brandon more in future videos. And we'll
1:28:02see you in the next one.