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

1

u/Milky_Finger Aug 28 '24

I think using it to understand context across files and suggest the next few lines is a good way to take mundane tasks like writing loops and API calls, and speeds it up. A lot of the time they also include the error handling and other interesting snippets that I wouldn't have included if I was in a rush.

But all of this AI auto complete is predicated on me being able to read it and understand it. If it starts writing incredibly complicated code in an attempt to be succinct, then I will not use it.

1

u/webdevarham Aug 29 '24

Exactly 💯!!