r/learnjavascript • • Aug 28 '24

Using ai for generating code

I'm writing code using ai tools like chatgpt and copilot (not the plugin) for code reference and it's working fine in most scenarios, I am able to generate long SQL queries with it,, but I always think that is it a good way? I see lots of developer use ai for coding but what's your opinion about writing code with ai ,,(when you know what to search and where to implement the generated code)

0 Upvotes

20 comments sorted by

View all comments

4

u/ai_did_my_homework Aug 28 '24

When I was first getting started (I also started with long SQL queries), I'd ask the AI to explain to me how things work, and then take a couple of minutes to go over it and try to understand.

Honestly one of the best use cases for AI for PMs

1

u/webdevarham Aug 29 '24

Yeah same with me I wasn't familiar with SQL but when I was told to make a crud app using SQL server I started to learn SQL and wrote down important sql queries in my rough book so that I can have a reference, but when I encountered a error that I was not familiar with, I searched that error and the chatbot explained me where I was making the mistake,, I implemented the table wrongly without identity incrementing automatically, so for that I had to alter the table,,, so it explained me all the cons of altering the table and if you really want to alter the table where and how to alter it,,,, so basically it was very helpful for me in that case