Despite the momentous hype surrounding ChatGPT, it may prove to be justified for developers at least. At the speed at which new frameworks, platforms, and even languages are popping up, being able to keep up is becoming a truly daunting task.
ChatGPT could be the “cure” for this overwhelming situation. With ChatGPT as my guide, I’m picking up Python faster than I’ve ever learned anything in my life.
I set out to rely primarily on ChatGPT but did use additional documentation to verify its guidance (1). One of the difficult things in getting started is that we simply do not know what we don’t know (yet). So, I began with the simple prompt: “what core principles and concepts do I need to learn to master Python?”
Within two weeks, I went from having zero knowledge of Python, let alone ChatGPT, to leveraging it to create a basic web app using Flask and Bootstrap (2). Taking weather reports from a public API, passing them through OpenAI’s “text-DaVinci-003” model, which returns the reports in remarkably human-sounding prose.
While this modern version of the “hello world” app is simplistic, it nicely exhibits the core skillset for building solutions with API (3) integrations. It also serves as a familiar backdrop to the almost surreal experience of learning with ChatGPT for the first time.
The support it provided, for lack of a better term, was astounding. I peppered it with questions and nagged it for advice. At every stage, it was there. Explaining what my server and framework options were, showing me how to arrange my folders and files for a typical Flask setup, responding to my doubts, expounding on topics I wasn’t clear on, and finally providing highly useful code samples.
As you’ll see later, it wasn’t without its hiccups, but overall, I’m sold. I expect this tool (and others like it) to become the de facto way I work going forward.
Where ChatGPT exceeded my expectations
ChatGPT’s ability to provide code is probably its best-known feature among developers, but what really stands out is its ability to respond to follow-up questions. As simple (or silly) as that sounds, how many times have you been reading something and found you had questions that couldn’t be readily answered by the text, let alone where to start looking for clarification in the documentation? I have spent far too many hours in my career doing this sort of follow-up investigation.
With ChatGPT coming to the market, that essentially ended. The fact that I can simply ask: “Do you mean ‘x’ or ‘y’ when talking about ‘z’?” has already saved me a surprising amount of time. Being able to ask a chain of related questions is transformational when it comes to learning. We’ve entered the age of living documentation. Like having a mentor and a massive research team all rolled into one at your disposal.
“Needs to improve”
While my experience has been incredible, it is important to note this journey hasn’t always been smooth sailing. One factor is ChatGPT’s rapidly expanding popularity. During this process, I suddenly began to run into “at capacity” messages. I had to switch to a paid account to ensure I retained access. But this highlights a critical point, to make this a part of your regular workflow, you’ll need a paid account. They recently introduced ChatGPT Plus for $20 a month, which, in my mind, is worth every penny.
Don’t use ChatGPT … for coding
One area where ChatGPT struggled was producing longer coding samples. When solutions exceeded 50 lines, it almost always errored out. Maybe it was the load it was under or OpenAI explicit policies, but as I’ve since learned, I shouldn’t have asked ChatGPT for complex coding solutions. That’s where OpenAI’s “code-DaVinci-002” model comes in. ChatGPT was trained on a vast amount of textual information to give natural language responses. However, OpenAI’s documentation makes the difference clear:
“The Codex model series is a descendant of our GPT-3 series that’s been trained on both natural language and billions of lines of code.” (Emphasis mine) (4)
ChatGPT is excellent for short explanatory code samples that help you understand concepts or syntax you’re unfamiliar with. But for day-to-day coding, we’ll need to get up to speed on using the codex models. They do require more know-how, but with that comes a much finer degree of control and a deeper reservoir of coding knowledge. (5)
The key to success: “Prompt Engineering”
To take AI tools like ChatGPT to the next level, you’ll need to hone your skills in “prompt engineering.” The ability to carefully craft what you ask of them will be what differentiates average users from those who can fully wield their power. Not to fear, OpenAI has provided a ton of examples on their site to get you started. You can even sharpen your skills in a playground they’ve set up, which provides more nuanced control, such as the response’s “temperature.” A measure of how creative the AI will be when generating its responses. Using the codex models in the playground, where I can adjust this value, would have prevented the problems I ran into with ChatGPT’s coding samples.
Final thoughts
This has been a fantastic and eye-opening experience so far and I’m really looking forward to seeing how far ChatGPT and other AI tools like it can be pushed. We are at an inflection point in our profession and in learning in general. To stay relevant, we will need to reinvent ourselves and our approach to virtually every aspect of our job. Thankfully, ChatGPT will be there to guide the way.
10 Visual Studio Code extensions for Python development
Advanced ChatGPT Guide – How to build your own Chat GPT Site
Getting Started with GitHub AutoPilot
For Globant Employees: Globant U chatGPT Training
(3) Open Weather API
(4) OpenAI’s introduction to Codex models
(5) Example of codex model prompting in OpenAI’s playground
Some of the codex’s abilities OpenAI touts: “Turn comments into code, complete your next line or function in context, bring knowledge to you, such as finding a useful library or API call for an application, add comments, rewrite code for efficiency”