Hire developers Community Blog Find a dev job Log in
Close menu
Tech insights: How I Collaborate with AI to Become a More Efficient Developer
Less noise, more data. Get the biggest data report on software developer careers in South Africa.

How I Collaborate with AI to Become a More Efficient Developer

10 February 2023, by Thuto Serapelo

Recently, there has been a lot of hype surrounding ChatGPT, an AI chatbot created by OpenAI, but what is the impact of AI on software development, and how will this affect developers? Here’s how I use AI tools such as GitHub Copilot and ChatGPT to improve my efficiency as a software developer.

OfferZen_How-I-Collaborate-With-AI-to-Become-a-More-Efficient-Developer_inner-article

I have always been interested in ways to improve my efficiency and productivity in my work. After reading countless articles from experts about how AI will replace jobs, I became particularly interested in exploring the limits of AI technology. As a result, for my Master’s degree research topic, I investigated whether AI could be as creative or capable as humans. And what I learnt is that in most endeavours, it is far better for AI and humans to collaborate, leading to better outcomes than if either was working alone, including in software development.

What does AI and Machine Learning involve?

AI is a cutting-edge field in science and engineering that emerged shortly after World War II. The term “artificial intelligence” was first used in 1956, and the goal of the field of AI is not only to understand but also to create intelligent machines/software systems.

Some examples of AI include self-driving cars, virtual personal assistants like Siri and Alexa, facial recognition technology, recommendation systems used by e-commerce companies such as Amazon or Takealot, and natural language/code generation systems like ChatGPT and Github Copilot. These applications demonstrate AI’s ability to automate tasks, perform complex data analysis, and learn and adapt to new information. AI is also used in various industries, such as healthcare, finance, and manufacturing, to improve efficiency and solve problems.

AI’s progress and achievements through the years

In 1997, Deep Blue, an IBM supercomputer, made history by defeating Garry Kasparov, the world’s top chess player, marking a milestone in the development of Artificial Intelligence. Twenty years later, AlphaGo became the first computer program to defeat a professional human player at Go, a landmark achievement in the field of AI that experts believed was a decade ahead of its time.

Other notable recent achievements of AI include AlphaFold, whose developers won a US$3 million Breakthrough Prize. The same company responsible for both AlphaGo and AlphaFold also created AlphaCode, an AI code generation system that achieved an estimated rank within the top 54% of participants in competitive programming competitions with more than 5,000 participants.

All of the systems mentioned above use the same technology that is also behind ChatGPT and Github Copilot: Machine Learning and artificial neural networks.

Machine Learning and ChatGPT

Machine Learning (ML) is a subfield of Artificial Intelligence which focuses on building software programs that improve over time, similar to how humans learn. This is achieved by using algorithms based on artificial neural networks, which are modelled after the human brain. These networks are used to process data and make predictions based on that data.

ChatGPT is an AI chatbot launched by OpenAI in November 2022. It is built on top of OpenAI‘s GPT-3 family of large language models and fine-tuned with supervised and reinforcement learning techniques. GPT is a type of Machine Learning model that uses a neural network known as a transformer. These models have a set of parameters that can be adjusted to improve its performance.

In GPT, the number of parameters is large, this enables the model to “remember” more information and make more accurate predictions. GPT-3 had a total of 175 billion parameters and was trained on a dataset of billions of web pages. This has allowed ChatGPT to do a number of very impressive things, including writing code in most (if not all) documented programming languages. This has naturally led to many of us asking the same question: will AI really replace us as developers?

The opportunities that AI gives us

In my research and experience, I discovered that while AI and ML models are capable of performing a wide range of tasks and can even exhibit creative behaviour, they often work best when they are used in collaboration with a human being. This is because humans bring their own unique skills and insights to the table, and can often offer valuable perspectives that a machine alone may not possess.

Here are two of the most common ways in which I, and other developers, can collaborate with AI or use AI tools to improve efficiency and productivity:

1. Leveraging the suggestion capabilities of GitHub Copilot.

I personally use GitHub Copilot as a code completion tool to improve my efficiency and productivity as a developer. GitHub Copilot uses a large language model trained on a dataset of open-source code to generate code suggestions in real time. As I write, the model suggests lines of code that may be relevant to the task at hand, based on the context of the code I have written so far. I can then choose to accept the suggestion and continue typing, or I can ignore the suggestion and continue writing code on my own. This helps me save time and focus on more important tasks, such as the logic behind the function.

I would advise other developers to use these types of tools as guidelines, rather than relying on them entirely. Copilot, for example, has limitations in building complex solutions on its own and needs help from a human developer to rectify errors. It also struggles when working with multiple files from a single codebase, and does not understand imports across files. It also fails to consider the whole codebase when reviewing files, and even though Copilot generates valid source code, it may at times contain bugs or cause errors. Hence, it is important to always review Copilot’s generated code before using it as a developer.

2. Using ChatGPT to generate (or debug) code and other written content.

In addition to GitHub Copilot, I have also recently had success with ChatGPT, another AI-powered tool that can assist with coding tasks. ChatGPT can be used to generate code based on descriptions of what you want the code to do, or to suggest changes or improvements to existing code. It can also be used to troubleshoot problems or debug code, as it can identify errors or suggest solutions to issues.

I have found that ChatGPT is particularly useful for tasks such as finding mistakes in my code, writing test cases, and identifying patterns in large datasets. For example, if I am having trouble debugging a segment of code, I can input that code into ChatGPT along with information about what I am expecting to happen and what is actually happening. ChatGPT may then help me find the issue and suggest a solution.

ChatGPT is also super helpful when starting a new project from scratch because I can use it to generate the skeleton code and project structure using just a few prompts. In addition to generating skeleton code, I have often used ChatGPT to generate test cases, as it is capable of writing unit tests, and the risk of using its output is low - as the tests will simply fail if they are not accurate.

Recently I have started using ChatGPT to add comments to my code in order to ensure that it is well-documented before sharing it with other developers. This makes it easier for other developers working in the same codebase to understand my code.

I used to spend hours creating the skeleton code or code structure, debugging my code and writing unit tests. These tasks can be repetitive and time-consuming, taking away from more important and creative work, and so with ChatGPT, I have been able to save a significant amount of time on these tasks. I estimate that I have been able to save at least half of the time I would have spent if I did them manually. By using ChatGPT in this way, I am able to focus on more important and strategic things, thus improving my overall productivity and efficiency.

Will AI replace developers in the future?

AI and ML models can perform a wide range of tasks with speed and accuracy, and can greatly increase productivity and efficiency in many industries, including software development.

These AI tools are also useful for getting the syntax right and avoiding errors, which can be a challenge for less experienced developers or developers working with a new or unfamiliar technology stack.

Even experienced developers are leveraging these tools to become more productive. One example is Andrej Karpathy, an AI developer who worked as the director of Artificial Intelligence and Autopilot Vision at the electric car company Tesla. He has said that over the past year, 80% of his code was written by Copilot and that this has dramatically accelerated his coding, making it hard to imagine going back to “manual coding”.

Overall, AI-powered tools like Copilot and ChatGPT offer a wide range of benefits for developers, helping us increase our productivity, efficiency, and accuracy and enabling us to focus on creating more complex and advanced programs, which AI or Machine Learning systems cannot do yet.

Some limitations of AI

It lacks an understanding of deeper contexts

AI lacks the ability to understand and reason about the context and meaning of software code. For example, imagine building an e-commerce web app where customers place orders online. An AI system may be able to generate code to implement certain features, but it may not be able to understand certain aspects of the business, such as only allowing orders to be placed during business hours or only allowing orders to be delivered to certain locations.

Human developers, with their understanding of the context and the problem being solved, are essential in ensuring that the code accurately implements these business rules.

It doesn’t exhibit critical thinking

Another limitation has to do with decision-making and problem-solving, as AI is not yet capable of exhibiting human-level judgment, creativity and critical thinking. For example, when building a recommendation system for an online streaming service, an AI system may be able to analyse data and suggest recommendations, but it may not be able to understand the impact that these recommendations have on the overall user experience.

Human developers, with their understanding of the problem and the intended behaviour, are important in making decisions about what recommendations to show, and how to weigh the trade-offs between different factors.

It may rely on outdated data

Biased or outdated training data is another limiting factor for AI systems. When building a Machine Learning model to detect fraud, an AI system may be trained on old data, which could lead to the model being unable to detect fraud accurately in new or unseen data. Human developers play a crucial role in identifying and addressing these biases, ensuring that the systems they create are fair, accurate, and trustworthy.

President and co-founder of OpenAI Greg Brockman has himself recently said that; “One lesson from AI progress is it’s hard to predict the relative difficulties of various skills; one lesson from AI limitations is that humans are much more capable than we give ourselves credit for”.

Conclusion

Despite the concerns that AI may replace human jobs, including in software development, I believe that AI and Machine Learning models are most effective when they are used in collaboration with humans. By leveraging the unique strengths of both humans and AI, we can greatly improve our efficiency and productivity.

The future of AI is still uncertain and very hard to predict, but I believe that the potential benefits of AI are too great to ignore. As of this writing, the president and co-founder of OpenAI Greg Brockman has predicted that: “2023 will make 2022 look like a sleepy year for AI advancement and adoption”. I am excited to continue following the latest developments in AI and Machine Learning and to see how these technologies will continue to benefit developers.

Resources


Thuto Serapelo is an Artificial Intelligence researcher and software developer. He works as a DevOps Engineer and lectures part-time at the Tshwane University of Technology. He firmly believes in the power of technology to solve some of the world’s greatest problems and challenges as well as create value in people’s lives.

Read More

Your next developer job is waiting for you
On OfferZen, companies reach out to you with upfront role, tech stack, and salary info.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Subscribe to our blog

Don’t miss out on cool content. Every week we add new content to our blog, subscribe now.

By subscribing you consent to receive OfferZen’s newsletter and agree to our Privacy Policy and use of cookies.