We all know that trying to get non-pozzed responses to anything involving hot button political/social topics from Big Tech trained AI models is a fool's errand, but I'm wondering if anyone has found them to be of any use when it comes to programming. Despite what a number of my professors say, some of whom are definitely not diversity hires, I haven't found them to be of any use. Maybe it's because I'm only asking hard or niche questions when I can't find the answer elsewhere, but I haven't gotten any help from the bots in my programming tasks. The last time I tried it invented modules to a package out of thin air. Had those modules actually existed I wouldn't have needed to ask the question to begin with. From what I've seen the most it can do is help pajeets cheat in their programming 101 classes. Has anyone here had a different experience?
You're viewing a single comment thread. View all comments, or full comment thread.
Comments (37)
sorted by:
Yes, I find it very useful for speeding up a lot of rote coding. You've got to be a good coder to start with to use it effectively, and you need to be able to break down a problem algorithmically. As long as you have those skills, GPT can be great.
As an example, I had to create a small website w/ backend recently. This was something with a very specific function and it was going to be used by small (less than 10) people, but it would be immensely helpful for solving a problem in their workflows.
My prompt to chatGPT was more or less
"Write javascript code, using modern idioms, to make restful AJAX calls using POST, and DELETE. The target URL is ______. Here is the HTML of my form:
[paste in raw html from my form]
Make sure the that AJAX code hgas full error checking and sanitization of inputs.
After getting a response to the POST, parse the return value as JSON. If the value of ___ is ____ then display message "abc def".
etc
I'll look at the code it generates, and tell it to fix any issues, and then I'll add more complexity "Now make it handle this case, where the POST value is .... " (you can honestly start to get pretty vague once you are a query or two in).
Then I can say "Generate code in _____ language use MySQL bindings to implement a backend to implement target URL _____.
.
I guess you could say I'm using it like an advanced templating engine. You can keep these queries going a long way it's pretty nice.