ChatGPT will replace software developers

ChatGPT will replace software developers. Someday. But not today and not any time soon. But what it will do in the near future is increase the productivity of programmers who use it correctly.

The other day I had a task to find a set of rectangles that approximate a complex geo polygon. While working on this I had to write a function that will divide a large bounding box into smaller bounding boxes. An extremely boring thing to do, so I asked ChatGPT to do it.

Image

I tested the function, and sure enough, it works just like I wanted. Instead of spending 15 minutes or perhaps even more writing it, I spent just about 30 seconds. The bounding box is perfectly divided into smaller boxes as you can see in the screenshot below.

Image

And this is where ChatGPT will boost the productivity of developers at the moment—acting as an assistant writing all sorts of functions and algorithms. Why would I waste my valuable time writing uninspiring and tedious stuff when I can hand over it to ChatGPT and focus my attention on the more important stuff that AI can't do instead of me?!

As they like to say on Twitter, AI will not replace you, a person using AI will replace you. The more I use AI, the more I'm inclined to believe in this. Having such a smart assistant at your disposal at all times is a really incredible and powerful way to boost your productivity.

In some cases ChatGPT will give you a wrong answer, so always review the answer you get, go through the code, and get a sense of what it does. You should never run untested code, whether you copied it from Stackoverflow or ChatGPT. AI tools at the moment are not a replacement for human judgment and expertise.

OpenAI API

The more I'm using ChatGPT in everyday work the more I want to explore the API and get a better insight into all possibilities. So I spent a weekend building a simple tool that helps me to analyze code and find bugs using ChatGPT API. I built this web app using React and OpenAI API in a few hours, and I plan to expand the functionality as I learn more about useful ways to utilize AI.

To show you how the tool works, I copy and pasted a code snippet that shows how to zip files in Drupal, and I clicked on the Explain code button. And here's the result:

Image

That looks like a pretty good explanation of what the function is doing. This works well for more complex functions as well, so it's of great help when you don't want to spend your brain power unraveling tangled code.

Now let's update the same code and make a simple typo. Let's see if ChatGPT will detect the error when I click on the Find bugs button.

Image

And that's a wrap. If you have any comments or suggestions drop me a message, and I will get back to you soon!

About the Author

Goran Nikolovski is a web and AI developer with over 10 years of expertise in PHP, Drupal, Python, JavaScript, React, and React Native. He founded this website and enjoys sharing his knowledge.