Are generative AI tools going to replace Software Engineers?

Generative AI has been all the rage since the introduction of ChatGPT at the end of 2022. While ChatGPT wasn’t the first generative AI nor even the only concept for AI, it was the first to be widely publicized and make its way into the hands of several people and get widespread use. It also brought together multiple generative AI concepts into a single place where a user can prompt the AI in casual, human language, to generate code, blog posts, and images. Of course, many people interested in software engineering were particularly affected by the ability of someone without any programming experience to prompt ChatGPT to generate some code that they could run and see how it works, leading many to believe that software engineering is on the way out and will be completely replaced by generative AI. Being a software engineer and being really interested in AI (even before ChatGPT), I have been curious to try the tools out there and talk about the possibilities.

Writing code using ChatGPT

Because ChatGPT came in strong and is currently the most popular generative AI tool, soon after, many YouTube videos, blog posts, and news articles came out talking about doomsday for software engineers as well as plenty of “gurus” jumping on an opportunity to sell courses to inexperienced people on making millions in the stock market building trading bots using ChatGPT. Of course the comments section were filled with people excited with the prospect of replacing software engineers and having a perceived lower barrier to entry to write code.

To look into expanding my horizons and determining how I could take advantage of this newest technology, I decided to put it to task to build something I was interested in. In short, my background is in full-stack web development (React, .NET C#, SQL Server), but I wanted to build a simple Android app to track my spending. This seemed like a really good task for ChatGPT.

As I started looking at prompts to give ChatGPT on building an Android app, it became apparent that I couldn’t just tell it to build the entire app. I didn’t have a clear and concise way to casually explain to ChatGPT how exactly I wanted each part to function, so I decided to break down my prompts into individual pieces. As I tried prompting ChatGPT to build large portions of the app, it did not generate code that worked correctly or didn’t even compile, let alone follow best practices as far as design and clean code.

As I went through this exercise, I found that I had to keep breaking the problems down to smaller and smaller pieces until ultimately, I was just asking for ChatGPT to build out single programming constructs which required background knowledge in software engineering rather than just describing the app as it is understood from the end user. Just building out the app without any software engineering knowledge leaves code that is not extensible or able to interact with any other specific systems that might need to be used for building the app. The only way to get a useful piece of code was to actually understand how to engineer software to actually ask, very specifically, what you need ChatGPT to generate.

While getting generated pieces of code, I was surprised at how much didn’t work out the gate and required more research to ensure it was built correctly. I couldn’t just take the code at face value but had to actually verify it worked and review the generated code to ensure it didn’t have security issues or design flaws that would make it difficult to work with later.

While going through this exercise, you’re likely thinking about the additional difficulty I ran into using ChatGPT. I found that prompting ChatGPT for generating code was very difficult when it had no context for the rest of the code that was already written. ChatGPT was a prompt being interacted with in a browser and had no access to the code I had already written with the prompts provided. As such, it took extra work to integrate the code it generated and quickly broke down to me asking for code examples for building certain components in Android (since I didn’t have a background in writing apps in Android). As such, ChatGPT ultimately became more of a faster way of referencing Android documentation aside from the fact that a lot of the code still wasn’t quite right. To be fair, I was using the older ChatGPT 3.5 and not ChatGPT 4.0, but the issues above still hold, which is that ChatGPT ultimately is a way to speed up looking through documentation. So on that hand, it’s a very useful tool, but a far-cry for replacing any software engineer.

A better way to use Generative AI

Shortly after ChatGPT came out, I spent some time researching other AI tools to help write code. Even though ChatGPT often seems like the first tool, there have been several AI tools already available for software engineers to plug right into their IDEs where their code was able to be used as context for the AI to generate. These provide the same functionality as ChatGPT, but instead of needing to navigate out of your IDE to prompt the AI for a code sample, you’ll get suggestions directly in your IDE as well as the ability to write a prompt to the tool directly in the code file for it to generate a piece of code for you.

After trying several of these tools out (as well as collaborating with other software engineers on the tools available), we landed on using GitHub Co-Pilot. It integrates easily with the IDEs we commonly use (like VS Code and Visual Studio) and provides support for all the languages and technologies we use. Just like I mentioned about ChatGPT above, it ultimately saves time on documentation and looking up other pieces of code that I need to reference. It does save engineers time, and I believe it should be considered as one of the essential tools for engineers to use.

While these tools are excellent to increase productivity, there is an incentive for people to use it like a crutch. Specifically, it is being used as a crutch when someone is not spending the time they should be in learning about a system, technology, library, or any other construct that they just trust to be correct from whatever generative AI tool they are using. Generative AI is not perfect and still needs to be checked and code-reviewed to ensure that it meets the team’s code specifications as well as design and security best-practices.

Conclusion

AI is not going to replace software engineers. To use things like ChatGPT and GitHub Co-Pilot, you need a solid engineering background, especially as the software you’re building gets large and/or needs to be integrated properly with other software or systems. Those declaring that AI will replace software engineers soon don’t have a firm understanding of software engineering. The people with the loudest voices about it replacing software engineers have no actual software engineering experience or very limited experience.

That being said, software engineers should readily embrace the technology as it will help those dedicated to their roles be more productive and learn more as AI is able to help provide working examples of certain programming constructs and speed up reading through documentation. It’s not a panacea nor the ultimate tool, but it is something that should be embraced as AI becomes more prevalent.

Ultimately, I don’t believe a software engineer will be able to replaced by AI until we’ve developed AGI (Artificial General Intelligence) where a computer can think and problem-solve like a human. Generative AI, as it stands, is impressive, but does not have the ability to think like a human but to generate statistical likelihoods based on the models it has been trained on. Even so, having spent a number of years in the software industry, my guess is that if AGI were ever to be developed, it would be treated similarly to how outsourcing software engineers is today. Healthy companies will likely include it as part of their staffing needs but will not use it to completely replace their entire engineering force since the company still needs employees that they can have more invested in the company and put in positions of oversight for AGI and outsourced engineers to ensure engineering efforts are properly organized and follow proper code quality.

Leave a Reply

Your email address will not be published. Required fields are marked *