Chat-GPT assists programming and debugging

1 minute read

Published:

How Chat-gpt from Open-AI going to affect our day-to-day work?

If you need to program in your day to day work, consider having ChatGPT as part of it. If you have not tried it yet, it will be fun to give it a try! Chat-GPT can help you write and Debug code!

Here is a figure comparing conventional developer workflow.


Demo time :)

A simple task is used to test the ability of ChatGPT. The task is to ask ChatGPT to generate an index page of a folder of html web pages by automatically looping the html files of a specified folder.

I create a simulation as the following:

  1. ask chat-GPT to generate a sample html webpage file. Here is the output of that file.


  1. generate multiple coples of the sample file and put it in a folder named test_folder_html_files.

test_folder_html_files
--> sample_html_1.html
--> sample_html_2.html
--> sample_html_3.html
--> sample_html_4.html

Next, I start with


  1. Here is the generated index page after running the python code ChatGPT creates:


  1. It looks great!! However, BUG find by clicking it!

  2. I checkek and the problem for providing the path incorrectly.

  3. Debug through chatGPT by asking for fixing the problem by providing the absolute path.


Bug fixed! Index page successfully links to webpages!