DEV Community

Centdam
Centdam

Posted on

Can ChatGPT write code and thus replace programmers?

The newest iteration of Open AI's XXL machine learning language model, ChatGPT, is all the rage. It's impressive, but can it really replace programmers and write codes similarly to how computers and robots have displaced some workers?

It is difficult to say, but in the previous article, we discussed the potentials and limitations of ChatGPT, as well as the major reasons why it will not replace software engineers, and we concluded by saying NO, it cannot replace software engineers.The same is applicable to programmers. But I will say that ChatGPT can be another tool in the programmers' kit for performing some tasks, like automated tasks.

Can ChatGPT write code?
ChatGPT can be used to write code. For example, this python code below was generated by chatGPT

chatgpt example code
It is true that it can generate hundreds of lines of code, but the question is, is the code correct?

The same limitations that it has can make its codes unreliable. OpenAI provides example code to help debug code, which means that it can generate errors. OpenAI went on to confirm that the generated code could be incorrect.

Stack Overflow, a popular developer question and answer website used to troubleshoot code, has banned the use of ChatGPT on the platform because of its unreliability and because the average number of answers generated by ChatGPT is too low, making it harmful to their users looking for correct answers.

Coding aside, ChatGPT lacks the human ability to understand real-world problems and solution, just like every other machine learning tool. A good programmer must understand the purpose of the program and those who will use it.

Conclusion
In Providing a solution to an issue requires a combination of critical thinking, logic, algorithms, and understanding, which ChatGPT lacks. The generation of pre-trained AI code raises some legal issues regarding intellectual property rights. It is currently unable to distinguish between code that has a restrictive or open license. If the AI takes a pre-written line of code from a repository that is protected by copyright, this could put users at risk of not complying with licensing requirements.

Top comments (0)