5 tips to using chatgpt as your coding genie.
Chatgpt has become an essential tool in the hands of developers very quickly. We all know that it knows it’s way around trivial tasks in coding whether it be creating loops or small algorithms using if conditions etc.
We also see it’s weaknesses when it comes to generating code for libraires which had recent or new breaking changes. Or on case of complex large tasks when not explained porperly.
Without further blah blah
Let me show you my 5 tips to use chatgpt better in coding:
- Split your question into smaller tasks and ask incrementally adding one step at a time to generate code: This approach has shown to give better coding results and less hallucinations and misinterpretations when it comes to complex code blocks. This is of ourse for complex tasks involving external libraries etc
- Make the prompt as clear and detailed with specific terms and technical words possible: talk to chatgpt like you talk to a knowledgeable webdeveloper use all the terms you’d use to convey the idea. Don’t shy away from using technical terms inorder to simplify the prompt.
3. Incase of external libraries beware of out of date syntax being generated by chatgpt: Always view that as a suspect if the external library usage code generated by chatgpt shows wierd errors. In that case it would be good to check up the library’s documentation.
4. When trying to find a plan to implement a large task. It is a good idea to give the overview of the coding problem or project to chatgpt and ask for multiple ways or suggessions from it: This can spark ideas your mind might have missed.
5. Never be lazy to ask chatgpt to explain the code it generates:
Chatgpt can explain the code it generates pretty well, maintaining a good clarity of what the code is doing can help in resolving bugs in the generated code faster.
Conclusion
I don’t believe AI can replace developers that fast. But it can automate the lower level tasks in programming and thus enabling developers to leave the monotonous boring parts to AI. Chatgt if used wel can increase the performance of a developer by 2 times atleast. (That has been my experience atleast).
Thanks for reading till now, I’m Sangeeth Joseph , a fullstack freelance developer on Upwork.
Follow me for more AI updates and insights 😃.