ChatGPT Features — Coding/Programming
This article is part of article series: ChatGPT Features
Previous article: ChatGPT Features — Corrections
With the introduction of ChatGPT, the first question everyone had in mind was, are developers obsolete? Is the prophecy in movies like terminator coming true? To be honest and unbiased, ChatGPT might be, like many of its predecessors a leap in the long journey to that dreaded future, but not that future yet.
You can switch to video version of this article
Yes ChatGPT can code. It not only read Wikipedia, it also read stackoverflow and almost all of the programming related public websites. So yes it is as good at producing code as it is in producing text. Here i must mention that there is a ton of difference in capability between ChatGPT 3 or 3.5, and ChatGPT 4 which is much more sophisticated in almost every way, including code generation. But even with the advanced version, the capability is limited to writing snippets but not systems. Reason? It has knowledge but lacks wisdom. That may hold true as of making this video, but the reason might also be that people are still learning if not struggling to come up with the right prompts to let ChatGPT spit out complicated systems. For simpler tasks, the code generation capability is excellent. It can also generate web content or small websites with ease. For skilled programmers, it is an excellent aid to speed up development of complicated systems by developing building blocks with help of ChatGPT. How long before someone digs his own grave by developing a prompt enabling full systems to be generated is anybody’s guess. The world will evolve from its current shape and new requirements would spring up. Let’s all watch what happens next.
Get Ali Aslam’s stories in your inbox
Join Medium for free to get updates from this writer.
For now you can use ChatGPT to do a lot of day to day tasks like make it write a function with defined inputs and outputs, and let it figure the algorithm to use within. You can ask it to improve, or find errors in a code snippet, or suggest an alterative or say better implementation. You can ask it why your code is failing. You can use it to create documentation for your functions. You can ask it evaluate your api implementation as a security expert. You can use ChatGPT to explore libraries or methods to accomplish certain tasks. There are hidden gems available to use all over the internet, and how better to search the most useful ones than with ChatGPT. You can reduce cost by finding an open source alternative of an expensive library you are using in your work. Yey!!!, but like all open source projects, you may loose the dedicated development team available to you with paid subscription for your enhancements.
Doing some proof of concept, ask ChatGPT to come up with scaffolding for your work and even write some example code. Point you to tutorials on the subject. Or even change the programming language of example code it found to the one you are most familiar with. It is an excellent aid for programmers in their day to day life.
But can you use the code ChatGPT writes for you in production? Don’t even think about it. ChatGPT coding is a hit or miss. While it would try to generate a code as per your requirements, it would leave some essential details out which would leave you pulling your hair out as not even a junior programmer would miss those. Why? Coz its not a human. What is programming or computer science? It’s an aid to real life workflows. A programmer writes code that kind of automates or improves on a real life task. He understands the context in which that code would be used. Anyone getting work done from freelancing sites would know what kind of mistakes happen when you get work done from programmers who have no idea about the final usage as they are not told the context of usage. Same is true for ChatGPT. Either way, the important point is that code generation is really in its infancy, and is at least a bit different from creative writing. You must always go through the code generated by ChatGPT in entirety and use your own mind. Ask follow up questions to improve it. Use the iterative prompting extensively. Ask about the edge cases and error scenarios to ensure they are incorporated in the generated code.
ChatGPT is not only a prompt you can fire off questions into. It also comes up with an amazing API and you can integrate it directly into your code. Remember you could format output to XML, JSON, HTML and other formats which are understandable by code? Sky is the limit to using that feature to your advantage. You can fire off questions or perform operations or analysis on textual input or documents and then feed the results from ChatGPT directly into your code for post processing. There are even more options available in API than you have with the prompt where you are in full control of role, context, output formatting, and repeatability. That’s right, the API allows you to configure ChatGPT to be either repeatable i.e. give the same output given the same input every time, or introduce variability to the degree you want.
That concludes our discussion on programming with ChatGPT. Coding with ChatGPT is a vast subject and we just scratched the surface here. I’ll try to come up with more content on that later on. If you found it useful, please clap/share and subscribe to my YouTube channel to be notified of upcoming content. Thank you.
Next article: ChatGPT Features — Suggestions
Article series: ChatGPT Features






