Can you explain how you use it? Every time I try to use it for programming, the output is somewhat nonsensical. I also tried copilot but that was even worse (for terraform and python)
I use for well defined tasks which I know I'd find the answers by looking at documentation (and which I know how I'd approach but can't remember the details), so instead of rummaging through libraries' docs (or API docs), looking into a language's syntax I don't use everyday (looking at you, SQL JOINs), etc. I will craft a prompt to ChatGPT to get me through the 80% of looking into docs.
It will eventually hallucinate some property that doesn't exist, but since I kinda know what I'm looking for and just need the information condensed to move further I'll then verify the API/library docs with the given output and find my way through much faster than I would by starting on my own.
To me it does not become a code generator aside from boilerplates and starting points in languages I'm not an expert, it even helps me a lot to learn a new language (like Rust) where I can get a simple skeleton out of it for a task I want to do and code on my own later, just returning to ChatGPT to ask things like "how could I open a file with write access in <language I don't normally use/I'm learning>".
It's never helped me with any business logic properly (and I don't feed it my company's code, I will write a more generalised case as a prompt, or swap to an analogy to what I'm trying to do), it probably needs a lot more context that I'm not happy nor comfortable to feed into OpenAI's training dataset.
I'm been playing with Mistral's models locally through ollama and it's quite promising what one can do with a local model that you can feed a lot of context without caring about where private data is being stored, I see a big future if those models keep evolving as code assistants.
Typical use, I need to write a script or bit of code for a language I'm not super familiar with. Examples: write a bash script that tests this and that. Write a unit tests in python for this function. How can you do this idiomatically using the C++ stdlib.
Less common: code transformation. I have this json output and I want to turn it to a different format without bothering writing a script. I give chatgpt a few examples of the transformation, and have it done for the rest. I'll still have to fix it but it can save me a bit of the time.
And finally, when I stumble on an API I don't know anything about, I can get a better grasp by asking ChatGPT some questions about it.
Again, not life changing or even a huge productivity booster, but it helps. Also, it's good to know when ChatGPT isn't going to help and avoid losing time.
It will eventually hallucinate some property that doesn't exist, but since I kinda know what I'm looking for and just need the information condensed to move further I'll then verify the API/library docs with the given output and find my way through much faster than I would by starting on my own.
To me it does not become a code generator aside from boilerplates and starting points in languages I'm not an expert, it even helps me a lot to learn a new language (like Rust) where I can get a simple skeleton out of it for a task I want to do and code on my own later, just returning to ChatGPT to ask things like "how could I open a file with write access in <language I don't normally use/I'm learning>".
It's never helped me with any business logic properly (and I don't feed it my company's code, I will write a more generalised case as a prompt, or swap to an analogy to what I'm trying to do), it probably needs a lot more context that I'm not happy nor comfortable to feed into OpenAI's training dataset.
I'm been playing with Mistral's models locally through ollama and it's quite promising what one can do with a local model that you can feed a lot of context without caring about where private data is being stored, I see a big future if those models keep evolving as code assistants.