WEBVTT

1
00:00:01.599 --> 00:00:05.300
Now, I mentioned before that we won't finish this app.

2
00:00:05.480 --> 00:00:10.400
It's just a playground, so I won't care about the database or anything like this here.

3
00:00:11.220 --> 00:00:17.440
However, there's one thing I also want to highlight, and that's the importance of iteration.

4
00:00:20.459 --> 00:00:26.140
We get some code here, some code here, and also in the other files, and all this code

5
00:00:26.080 --> 00:00:28.180
here actually is AI-generated.

6
00:00:30.180 --> 00:00:37.700
Now you can always use AI to change this code as well, of course, and you can then use the

7
00:00:37.700 --> 00:00:42.840
output of the AI to enhance it even more with follow-up prompts if it's not exactly what

8
00:00:42.840 --> 00:00:43.300
you wanted.

9
00:00:45.260 --> 00:00:52.000
For example, here it uses slash API as a route path prefix for all my table-related routes.

10
00:00:53.920 --> 00:00:58.980
Now of course I can select this and say change slash API to slash tables.

11
00:00:59.860 --> 00:01:03.700
I can do this, and it will do that for me.

12
00:01:04.220 --> 00:01:07.680
But you hopefully see that this gets us nowhere.

13
00:01:08.120 --> 00:01:12.580
It's really not the idea to use AI for a simple change like this.

14
00:01:13.860 --> 00:01:16.580
Now this is an exaggerated example.

15
00:01:17.240 --> 00:01:22.460
Of course, you'll rarely have cases like this, but I'm 100% serious here.

16
00:01:23.200 --> 00:01:30.320
It is easy to fall into the trap of using AI for everything, especially if you used

17
00:01:30.320 --> 00:01:34.320
it to generate some code which is not doing exactly what you want it to do.

18
00:01:35.220 --> 00:01:39.500
I mentioned it before, and I'm emphasizing it here again because it is important.

19
00:01:39.840 --> 00:01:41.820
Don't forget that you're a developer.

20
00:01:42.160 --> 00:01:47.140
If you have slash API here, and you want to change this to slash tables, just do it.

21
00:01:47.360 --> 00:01:49.400
And it's not just for simple changes like this.

22
00:01:49.740 --> 00:01:54.460
If you have some change you want to make, and you know what the change is, just do it.

23
00:01:55.700 --> 00:02:01.440
Now of course, for example here, if I wanted to migrate all these imports from common.js,

24
00:02:01.920 --> 00:02:08.060
which this import format here with the require keyword is called, to ESM, which is a different

25
00:02:08.060 --> 00:02:12.680
import format you can use in JavaScript, I could also do this manually.

26
00:02:13.740 --> 00:02:15.340
But it would be a bit more work.

27
00:02:15.740 --> 00:02:20.960
I would have to rewrite all these import statements like this.

28
00:02:21.560 --> 00:02:22.480
It's a bit more work.

29
00:02:24.100 --> 00:02:30.840
So in cases like this, it can make sense to select all that code and say, migrate to ESM imports.

30
00:02:33.460 --> 00:02:38.940
And it will then hopefully go ahead and make the appropriate changes, add these imports

31
00:02:38.940 --> 00:02:45.020
at the top where they should be when using ESM, and get rid of the imports down there.

32
00:02:46.980 --> 00:02:50.240
So that's a case where it makes sense to use AI.

33
00:02:51.380 --> 00:02:57.660
However, if it would have messed up these imports here, and maybe forgot to add .js,

34
00:02:58.280 --> 00:02:59.380
just add it yourself.

35
00:03:00.900 --> 00:03:02.260
Don't iterate endlessly.

36
00:03:02.420 --> 00:03:04.140
That will not take you anywhere.

37
00:03:04.580 --> 00:03:06.360
Don't forget that you're a developer.

38
00:03:06.700 --> 00:03:08.920
Instead, use the best of both worlds.

39
00:03:09.080 --> 00:03:13.380
And this is also something that just takes some practice, but it's ultimately what will

40
00:03:13.380 --> 00:03:15.440
make you more efficient as a developer.

