AI can now produce meaningful lines of code. How cool is that? But should developers be worried about becoming unemployed? Are the creators of AI-powered tools effectively software-designing themselves out of a job? And the main question is what will happen with programmers: should they be afraid of being replaced. Especially if we are talking about juniors. At the beginning of their career path they perform easier and quite repetitive tasks, writing simple code that ChatGPT can generate in just a few seconds?
Lately, there has been a large number of articles and titles asking pretty much the same question. People are comparing the latest achievement in AI, and machine learning fields in particular, to the industrial revolution. After OpenAI dropped a newer version of ChatGPT with even more advanced coding abilities, people are considering the option that there will be no need for programmers soon, especially junior ones, as it is much cheaper to ask ChatGPT to do the task!
What is AI and how does it work?
What exactly is AI? “Artificial intelligence (AI) is the simulation of human intelligence processes by machines, especially computer systems. Specific applications of AI include expert systems, natural language processing, speech recognition and machine vision”. In general, AI is trained based on analyzing large amounts of data to predict what output will look like. So its knowledge is limited to what it’s been shown.
But is it enough to fulfill the whole commercial software development process? Let’s start with some more theoretical thoughts.
Programmers vs AI
First of all, programming is a creative process. Programmers are getting business requirements as input and creating software according to it as an output. These requirements are not so obvious. So it’s challenging to cope with such creative tasks without involving human intelligence and critical thinking.
Before even starting to write code it is necessary to understand business needs, determine technical specifications and features of the program. What is more, good software isn’t just plain lines of code! There are many more things that AI still can’t afford. – Things like picking the right tools, analyzing user experience, and making design decisions. Also, understanding an exact business need.
The conclusion is that software must be created by a qualified person to fulfill the business and market needs and be easy to use and maintain.
“Since it’s [AI] based on natural language models, it’s mimicking what it has seen before in that context and doesn’t have a deeper understanding of the algorithms, data structures, or possess general problem-solving skills. It can’t truly extrapolate new solutions to unknown problems and will likely struggle when new ones are presented.”Alan Fern, professor of computer science and executive director of AI research at Oregon State University’s College of Engineering
One more thing that is quite bothersome – there is no source reference mentioned once you receive the answer from ChatGPT. So, it’s unclear whether it is quoting someone or it is its own conclusions. Still there are also a couple of other caveats related to using ChatGPT in commercial projects such as security issues and copyright problems.
Otherwise, there are a few areas where AI is already better than humans, for example playing chess or quizzes. But the latest OpenAI research demonstrates that Leetcode tasks are not that easy for AI to crack. The more complicated these tasks are, the more difficult it is for ChatGPT to complete. Although it is possible to cope with a few using ChatGPT 4.
Practical examination of ChatGPT – creating web application
Now that we have looked at the theory, let’s use ChatGPT to build a simple web application for managing hardware in an IT company. I will add only the code received from chat and try to cope with all the errors with the help of AI. To start, let’s give it the following prompt:
- Create a react app for IT company inventory management purposes (hardware), having navbar with two routes – dashboard and hardware in use, and add the following features:
- 1. list of all hardware – create mock data – with the following fields: serial number, name of the model, and quantity;
- 2. list of hardware that is now in use – create mock data – with the same fields as above plus the name, and surname of an employee using it.
- Use typescript, and react-router for routes, for state management use react built-in state management and for CSS use tailwind for styling – main colors are #f90045 and #212725
ChatGPT suggests steps to create a React app
“Sure, I can help you with that. Here are the steps to create a React app for IT company inventory management purposes:” – it answered and gave me the following instructions:
- Create a new React app using create-react-app
- Install necessary dependencies
- Create mock data for hardware inventory
- Create mock data for hardware in use
- Create the Navbar component with two routes: Dashboard and HardwareInUse
- Create the Dashboard component, which will display a table of all hardware
- Set up routing using react-router-dom
- Import tailwindcss in your index.tsx file
- Finally, add the main colors to your tailwind.config.js file
Unfortunately, the react-router version was a bit outdated, so I asked it to update App.tsx code with a newer one. ChatGPT provides all the necessary information on how to update the package and both App.tsx and Navbar.tsx components.
A couple of features are still missing! Let’s extend our app with pagination and a search box. Also, I asked to update the design to make it look better and create more mock data.
And here is the result!
Pros of Chat GPT performance
After using ChatGPT for completing the task above and in my job as a frontend developer I can tell that it is good at:
- Explaining each answer with links to the official documentation.
- Giving comments in the code to make it easier to adjust.
- Recollection, so we don’t need to provide all the context information with each prompt.
- Writing test cases.
Potential risks of Chat GPT performance
And there are several things you should be aware of before replacing your junior devs with ChatGPT.
- No folder structure, and the tool does not generate you the whole project but provides instructions and code for separate components.
- You don’t know its defaults. If you prefer to use any specific tool or package (e.g. yarn over npm) you need to be precise about it.
- The generated code does not always follow good practices.
- You should plan the project architecture and design. The more code ChatGPT generates, the easier it is to get lost.
The clue point is that even if you have such a powerful tool as ChatGPT, you still need expertise in the relevant topic. ChatGPT requires precise instructions on what you expect to get.
Can AI currently replace programmers? How will tools like Chat GPT innovate the programming process?
Even though AI will have a massive impact on the world, I think it will not replace any developer’s soon. I believe it will help programmers do their job more efficiently. AI integrations with different tools are becoming more and more available.
For the junior developers, AI can be a great support in learning new things, e.g. using ChatGPT for doing research or working with tools like GitHub Copilot or Amazon CodeGuru and analyzing the proposed solutions. More experienced developer can make use of AI while refactoring, writing tests and documentation.
There is a huge part of software development, where AI can be pretty efficient right now: low-code and no-code solutions. That could be a place to develop AI potential. There is a possibility that if creating software like this is quite repetitive and a known algorithm, one can train AI based on a company codebase, so it will be able to create a project as simple as building lego.
Still, before that happens, the company, so real programmers, need to create its own codebase, check it and teach AI to use it. What is more, technology is developing rapidly, so there will always be a necessity to update the codebase and AI algorithms.
Does ChatGPT believe it can replace programmers?
And finally let’s ask ChatGPT!
Will you replace software developers?
As an AI language model, I am designed to augment and assist software developers rather than replace them. While AI has come a long way in automating some tasks, software development is a complex process that involves creativity, critical thinking, and problem-solving skills that AI has not yet fully mastered.
AI can help software developers by providing code suggestions, identifying potential bugs, and assisting with routine tasks, which can make the development process more efficient. However, human developers are still essential for understanding user needs, making design decisions, and ensuring the software meets the desired outcomes.
In summary, AI tools like me can be a valuable resource for software developers, but we are not likely to replace them entirely. Instead, we will work together to create better software more efficiently.ChatGPT
We are in a “weak AI phase” now, and I think it will take a long time before AI will be able to fully replace programmers, learn to interpret business requirements, and make a plan on how to develop a functional product. We don’t need to be afraid of technology development, we need to learn how to use it properly.
- Wroclaw University of Science and Technology: ChatGPT has sparked a revolution. How will it change our lives?, 07.03.2023
- Ruby Chen, OpenAI: GPT-4, 14.03.2023
- Chloe Xiang, vice.com: Startups Are Already Using GPT-4 to Spend Less on Human Coders?, 20.03.2023
- Ed Burns, techtarget.com: What is artificial intelligence (AI)?, 21.02.2023
- The Paradise:
- Can AI tools like ChatGPT replace computer programmers?
- Read more at: Can IA tools lika ChatGPT can replace computer programmers?, 20.03.2023
- STX Next: Will Artificial Intelligence Replace Software Developers?, 20.03.2023
- Computerweekly.com: GitHub CEO: Artificial intelligence will not replace developers, 19.12.2022
- aws.amazon.com: Amazon Code Guru, 25.03.2023
- OpenAI: Stripe leverages GPT-4 to streamline user experience and combat fraud., 14.03.2023