Getting myself a coffee

How GPT-3 Can Help You Learn & Write Code (Even If You’ve Never Written a Line of Code Before)

Vladimir de Ziegler
4 min readMar 9, 2023

--

By now, we all know about GPT-3’s amazing ability to write text and code. Yet, few people know how little coding experience you need to fully exploit it.

As someone who has completed a coding boot camp (Le Wagon), I know just enough to appreciate how ignorant I am about coding. But with GPT-3, I am using code in my day-to-day commercial role in ways I would have never envisioned before.

My Experience with GPT-3 and Coding

I discovered the power of GPT-3 for coding when I was stuck trying to clean an Excel file. I was getting overwhelmed by the number of variables and constraints I had to account for in order to map out company names with their corresponding emails. I had spent hours trying out a combination of formulas. I was about to accept that I would have to eventually do it manually. Then, I decided to give it one more shot, using GPT-3.

I was quite skeptical about my ability to even execute the code so I decided to write a GPT-3 prompt that would hopefully be super easy to implement. It went as follows:

“Create a script using Python that links company names and company emails together found in this excel file “share path to excel file”. Create a new tab in the same Excel sheet, where you add two columns (A for company names and B for contact emails). Link them together based on any of the following criteria:

Company name lies one row higher and to the left of its corresponding email

Company name can be found within the domain name of an email

Company registration code can be found in one column to the right of the company email. This should match the registration code found in the same cell as the company name.

If none of the above works, still add the email to column B, and write “na” in column A

print “finish” once you’re done.”

Then the magic operated.

Within five minutes, GPT-3 had generated a script that did exactly what I needed it to do. A new tab where I would get all the company names in column A, and their corresponding contact emails in column B. The results were 90% accurate. I was able to import the list of contacts into Hubspot and send an email campaign that met my outreach targets for the quarter in just one afternoon.

How You Can Use GPT-3 for Coding

Even if you’ve never written a line of code before, you can still use GPT-3 to write scripts that will help you get things done more efficiently. Here are some steps to get you started:

  1. Learn the basic terminal/console commands: (Link to 15’ mins course) This will allow you to execute your code. GPT3 will tell you which libraries to download and which languages to use.
  2. Download the language of your choice: Here is a link to download python
  3. Download a text editor: For example “Sublime Text”. This makes it much easier to structure, amend the code (e.g. you want to change the link to your excel file, URL, etc.), and run the code.
  4. Take an intro class into the coding language of your choice: If you’re really unfamiliar with coding, taking an intro class can help you get a rough idea of the essential concepts around coding (e.g. variables, data & control structures, syntax, etc.). Python is the best option in case you’re interested in data wrangling or web scraping.
  5. For those who want to skip the back and forth between the text editor and console, opt for an Integrated Development Environment. Pycharm works well with Python. It is essentially a text editor with superpowers.

That’s it! By following these steps, I guess that in 2–3 days you can start harnessing the power of coding with GPT-3.

My next article will cover how you can use GPT3 for web scraping.

Leave a comment if you have any particular use case you want to explore next.

--

--