Programming using ChatGPT
I thought that once ChatGPT was launched, it may be a pretty awesome tool, especially for those of us who love to code. Currently I am working on a project where I use it extensively.
My usual workflow involves starting with a simple boilerplate code that I can originally could easily find online, but I would have to go through a lot of links before I could even the one I can actually use. I could spend at least 1 or two hours depending on the complexity of what I was looking to implement.
Then, when ChatGPT came along, I thought I would try to give it a whirl. I put what I wanted, and then ChatGPT incorporated my question, and within seconds, it produced a code. I tried it and it worked. It saved me a lot of hours that normally would be wasted in searching on Google, clicking on what Google thinks is relevant, filter through the information on endless blogs, etc.
But, to be fair, Google has been a tool we coders have used, and probably many will still use, but they would be missing out on the opportunity to save time, learn faster, because it's like a co-worker, a colleague, be it whatever you want to name this ChatGPT! For me, it's a tool and I love what it is doing for me.
Therefore, if you're looking to use ChatGPT to create some code for your own project, here are a few things you can do, as I did. First I start with a minimal code that is enough to compile or run, a simple "hello world" example. Then I ask ChatGPT to incorporate little changes, like add a function, rename variables and do other things you would normally do when developing your code. The amazing thing about ChatGPT is that it remembers your code and sometimes gives you only the changes needed to be made together with an explanation where to insert them. Additionally, if you find yourself not understanding the code produced by ChatGPT, just simply ask it to explain the code and it will do exactly that.
You will notice that once you've given ChatGPT your prompt, you can ask it to generate any code for you. In fact, if you don't like what it spits out, then just generate another response! Keep in mind that the code generated by ChatGPT may not be perfect, so you may need to tweak it a bit or modify it to get it working exactly how you want.
Hope this helps!