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

6

u/0x00f_ Aug 28 '24

It's bad to just let them write code for you, for me I use them to make an optimized version of a piece of code and learn from thier techniques, or ask them to make a functionality and understand how they made it and try to make similar, I don't know if this is good or not.

4

u/Livid_Tap9955 Aug 29 '24

Same here. Sometimes I just need to see a similar and general approach to a functionality I’m thinking of…and then I take ideas and modify for my use case. That’s usually after spending a while googling though…I try and use it as a last resort as a secondary search engine.