AI coding tools like GitHub Copilot, ChatGPT and similar tools took the software development world by storm.
Some developers love them, some dismiss them, and the rest are neutral.
Personally, I enjoy using them, and I believe they can help developers of all levels, including new developers. However, there are some things to consider if you are a new developer.
With this article, I want to answer whether new developers should use AI coding tools and how to make the most of them.
Mention: This article is also useful for experienced developers, but its focus is on people new to software development.
Should new developers use them?
My short answer is yes. Developers should use any tool that makes them faster and better.
I believe AI coding tools are one example of tools that help developers code faster than ever.
But there is one crucial mention. These AI tools generate erroneous, incomplete, and inefficient code quite often. Also, they sometimes generate code that looks fine at first sight but has very subtle errors/inefficiencies. If you blindly trust them, you will get into trouble. By trouble, I mean that you will learn the wrong stuff and also build unreliable & insecure applications.
So, what should you do then?
Treat these AI tools like you treat any other resource on the internet. Would you copy & paste code from a website and blindly use it without understanding it? Do the same with these AI coding tools. They can be beneficial, but they can also be very dangerous if you misuse them.
The idea is to use them but with caution.
How to use AI coding tools
Since these tools were born, people have said they will replace developers.
My opinion is that they are nowhere near replacing developers. And the more I use them, the more they reinforce that opinion. They're just not good enough to generate correct, efficient code at the moment — at least not complex code.
But that does not mean they're not excellent tools. They're a great companion for coding.
For now, they're handy for the following use cases:
- removing the entry barrier
No more "how to get started" questions. These AI tools are super valuable for giving you ideas on how to get started with a project or tool. Even if they do not generate the correct code, they give you pointers on how to get started.
The above GIF illustrates how ChatGPT helps you to get started with Zod. It generates both the code and explanations, so you understand what the code does.
- speeding up development by generating boilerplate code
Writing the boilerplate code is one of the most tedious parts of the software development process. Thankfully, AI coding tools can help with that as well.
The above pictures show Cody AI generating the boilerplate code for a Node.js and Express application. It also helps you configure the ES module imports in your project.
- finding/solving simple bugs and errors
These AI tools are also helpful for spotting bugs and errors. You can give them the code and ask them to find possible issues with your code. Then you can ask them to solve them but do not expect to get perfect answers. Use the solutions proposed to get an idea of how you could solve the issues.
- re-factoring simple code
You can also use them to get ideas on how you can refactor and improve your code. Sometimes, they make suggestions that are not obvious to you. It happened many times for me to get ideas from these tools that were not obvious to me.
- generating documentation and tests
It's well known (unfortunately) that documentation and tests are not the highest priorities when developing software. With these tools, you can add your code as input and ask them to generate documentation and tests based on your code.
These are some of the ways you can use AI coding tools to help you with coding. I emphasize again that you should not trust them blindly. Treat them as any other resource - only use the code if you understand it.
The AI coding tools I use
At the moment of writing this article, I use:
- GitHub Copilot
- OpenAI ChatGPT
- Sourcegraph Cody AI