WEBVTT

1
00:00:01.600 --> 00:00:09.040
Now, just as with GitHub Copilot, when using cursor, you can also add comments to basically

2
00:00:09.040 --> 00:00:14.280
add a prompt, you could say, for this smart suggestion completion feature.

3
00:00:15.600 --> 00:00:21.700
So here I could say, read user input and store it in a file.

4
00:00:24.160 --> 00:00:29.760
Ask the user for more input until they're done.

5
00:00:32.080 --> 00:00:38.920
Now it suggests even more comments here for me, wow, lots of comments, and it now got

6
00:00:38.920 --> 00:00:45.640
stuck here in a mode where it just adds more and more comments, actually the same comment

7
00:00:45.640 --> 00:00:46.740
over and over again.

8
00:00:46.920 --> 00:00:49.580
And that is something that can also happen with AI.

9
00:00:49.740 --> 00:00:51.080
So it's good that it happened here.

10
00:00:52.680 --> 00:00:55.760
Might not happen for you, but AI can get stuck.

11
00:00:56.220 --> 00:01:00.220
It can get stuck with generating something you don't want.

12
00:01:01.580 --> 00:01:02.780
Now what's the way out of that?

13
00:01:03.280 --> 00:01:10.220
Well, the way out of that is to simply write some code where you overwrite whatever the

14
00:01:10.220 --> 00:01:11.780
AI is suggesting to you here.

15
00:01:13.140 --> 00:01:17.580
So for example, here I know that I'm interested in some user input, so I'll start writing

16
00:01:17.540 --> 00:01:22.860
some actual code, and now cursor suggests meaningful code again, which makes sense.

17
00:01:23.780 --> 00:01:30.640
So it wants to get the user input, append that to my output text file, and so on.

18
00:01:31.000 --> 00:01:38.860
Though it's not asking for more input until it's done, so what we could do, well, now

19
00:01:38.860 --> 00:01:43.280
it's suggesting to add a while loop, and it indented this code here as well.

20
00:01:43.620 --> 00:01:51.340
So we can do that, and now we would have a way of adding more input until we quit the

21
00:01:51.340 --> 00:01:56.920
program or until we enter done, for example, to break out of it, or we enter nothing if

22
00:01:56.920 --> 00:01:59.140
that's our exit signal, whatever we want to do.

23
00:02:00.640 --> 00:02:04.900
So again, cursor doing its job here.

24
00:02:05.380 --> 00:02:10.460
You just always have to keep in mind that you're the developer and that you can control

25
00:02:10.460 --> 00:02:12.120
and steer the AI.

26
00:02:12.500 --> 00:02:13.740
Don't trust it blindly.

27
00:02:14.880 --> 00:02:19.520
Don't get mad because you're stuck in some code generation you don't want, like with

28
00:02:19.520 --> 00:02:21.040
that wall of comments before.

29
00:02:21.200 --> 00:02:26.980
Instead, be smart, write your own code so that the AI can again pick up on that code

30
00:02:26.980 --> 00:02:29.840
and make more smart suggestions.

31
00:02:30.040 --> 00:02:34.600
That's the most efficient way of using it, and as you can see, the cursor AI is really

32
00:02:34.600 --> 00:02:39.460
powerful, really tries to help you a lot, but still, you need to control it here and

33
00:02:39.460 --> 00:02:39.740
there.

