When I was growing up, I did not have access to the internet and information was not as conveniently available as it is today, but I had a large book titled something along the lines of Golden Volumes Encyclopedia. I loved looking through its pages, and what I enjoyed most of all was the math section. The problem with teaching myself with limited resources was, whenever I would get stuck I would spend a considerable amount of time rewording and rephrasing static sections of text until they made sense to me. This method worked but it was time consuming.
I share this experience because sometimes we need to learn a new topic in a short amount of time, and discovering ways to leverage today’s tools for research and learning is a skill in and of itself.
ChatGPT paired with studying any text is a great combination. In case you don’t know what ChatGPT is, it is basically a program that takes as input a text prompt and outputs a text response. How does it do this, you ask? Well, the gist is that being trained on basically everything ever said, it knows what gets said next.
So if you wanted to learn how to write code, why not learn to write something that already works. GitHub is a great place for finding ready to run code that can be studied. I recommend choosing for yourself something interesting and relatively simple to make the experience relevent and engaging. So let’s say I choose Microsoft SQL Server and find a repository with a Create Read Update Delete (CRUD) tutorial. The code is well documented, and I can understand the purpose of each section from its structure and comments, but I want someone to further explain the implementation. ChatGPT assists here. I copy the program from GitHub and paste it into ChatGPT’s text box.
Now before executing the prompt I should give direction for the expected response, so at the beginning of this prompt, before the code I have pasted, I write something like “Please explain the classes, methods, functions, arguments, variables, scopes, and implementation of the following code.” Here’s a tip: if accessing ChatGPT by a desktop web browser, press Shift+Return to add a newline. Once executed, the response I receive is a step by step explanation for the elements of the code. This response is a good pivot point for isolating and researching specific topics from the code. Digging into code iteratively with prompts like this allows me to quickly build knowledge on various topics. Where the response mentions the use of a particular method, and I want to know more about it, I simply prompt ChatGPT to elaborate on it’s definition and usage.
By starting with working examples of code, ChatGPT can be leveraged to provide personalized explanations by chaining together prompts. It’s a nice tool to have nowadays and one that has many beneficial uses. Please consider learning about the tools you use because it is important to understand how a tool works and what its limitations are when using it in an instrumental role.