Now, I mentioned before that we won't finish this app.
It's just a playground, so I won't care about the database or anything like this here.
However, there's one thing I also want to highlight, and that's the importance of iteration.
We get some code here, some code here, and also in the other files, and all this code
here actually is AI-generated.
Now you can always use AI to change this code as well, of course, and you can then use the
output of the AI to enhance it even more with follow-up prompts if it's not exactly what
you wanted.
For example, here it uses slash API as a route path prefix for all my table-related routes.
Now of course I can select this and say change slash API to slash tables.
I can do this, and it will do that for me.
But you hopefully see that this gets us nowhere.
It's really not the idea to use AI for a simple change like this.
Now this is an exaggerated example.
Of course, you'll rarely have cases like this, but I'm 100% serious here.
It is easy to fall into the trap of using AI for everything, especially if you used
it to generate some code which is not doing exactly what you want it to do.
I mentioned it before, and I'm emphasizing it here again because it is important.
Don't forget that you're a developer.
If you have slash API here, and you want to change this to slash tables, just do it.
And it's not just for simple changes like this.
If you have some change you want to make, and you know what the change is, just do it.
Now of course, for example here, if I wanted to migrate all these imports from common.js,
which this import format here with the require keyword is called, to ESM, which is a different
import format you can use in JavaScript, I could also do this manually.
But it would be a bit more work.
I would have to rewrite all these import statements like this.
It's a bit more work.
So in cases like this, it can make sense to select all that code and say, migrate to ESM imports.
And it will then hopefully go ahead and make the appropriate changes, add these imports
at the top where they should be when using ESM, and get rid of the imports down there.
So that's a case where it makes sense to use AI.
However, if it would have messed up these imports here, and maybe forgot to add .js,
just add it yourself.
Don't iterate endlessly.
That will not take you anywhere.
Don't forget that you're a developer.
Instead, use the best of both worlds.
And this is also something that just takes some practice, but it's ultimately what will
make you more efficient as a developer.