AI is becoming more and more popular. It's already used in many areas of our lives and now it's also coming to programming. Some people are afraid that it will replace programmers. Others think that it will help us to be more productive. So the question is: should we fight AI or embrace it?
The first reaction
"AI will replace programmers"
That's what I've been hearing a lot lately. My first reaction was: "AI has to be stopped". But is it actually feasible? Probably not. Would stopping AI be the right thing to do? Probably not. Therefore I started to think more about that statement. Is it really true? If so, when will it happen? What can I do about it? Let's answer these questions.
Will AI replace programmers?
Yes, absolutely. But there is a problem with that question: it doesn't specify time. Will it happen in 2 years? 50 years? 10000 years? Eventually it's going to happen.
A better question to ask is "When will AI replace programmers?". But even that question is not specific enough. Programmers are not a homogeneous group. There are many different types of programmers. Some of them are already being replaced by AI. Others will be replaced in the future. I can also imagine that a new type of programmers could emerge: programmers who specialize in working with AI. They would be able to effectively create prompts and verify generated code.
To summarize: replacing programmers will happen, but it will be a gradual process. Some developers will be replaced sooner, others later. The best thing we can do is to prepare for that and turn this threat into an opportunity.
If we can't stop it, let's use it to our benefit
We can use AI to make ourselves more productive and to avoid doing boring and repetitive tasks. We can ask it to do some simple things, but we still need to verify the results ("code review"). Currently AI can be treated as if it was a junior developer. It becomes clear that at this point in time AI is a threat for juniors and a great tool for mids and seniors. Probably the most popular tool used by developers is GitHub Copilot.
First experience with Copilot
I've been using GitHub Copilot in my personal projects for a few weeks. It's not perfect, but it's surprisingly good. Sometimes it generates bad code, but it can also give an idea how to approach a problem. It often provides a good starting point. In some cases my reaction was "Wow, it's reading my mind!". I'm also surprised how good it is at keeping things such as naming consistent. It's also great that there's an option to block both "Suggestions matching public code" and "Using my code snippets for product improvements".
Unfortunately, there are some issues. The biggest one is that it's quite slow. I would like hints to appear almost instantly, but sometimes it takes a few seconds. Another issue is that it sometimes generates small segments of code e.g. I want a whole block of code, but in some cases Copilot suggests code line by line. This combined with it's slowness can be quite annoying.
Despite these issues I think that Copilot is a great tool. It's not perfect, but it's already good enough to be useful. I'm sure that it will become better over time.
Tips for devs and managers
Senior and mid devs
Use AI to make yourself more productive and to avoid doing boring and repetitive tasks. Familiarity with AI tools is becoming a valuable skill that may become a requirement in the future.
Junior devs
I'm sorry to say that, but AI is coming for your job. The best thing you can do is to focus on self-development (including learning AI tools) and to become a mid-level developer as soon as possible.
Future devs
If you're thinking about becoming a developer, you should know that it's going to become more difficult. Times of great demand for junior developers are likely coming to an end and you can't just go "from zero to senior". I'd recommend to reconsider your career choice. If coding is your passion, you should still go for it, but you need to be aware of the challenges that you'll face. If you've chosen programming just because it's a well-paid job, you should probably look for something else.
Managers
If you are unsure whether to allow your developers to use AI tools, you should know that not using them will put you at a disadvantage. Your competitors will be able to deliver more features in less time and for less money. AI tools such as Copilot are already good enough to be useful and they will become even better in the near future. However, I would also recommend to introduce some rules:
- Have your developers thoroughly verify the code generated by AI to make sure that it's correct and safe. Code may look good at first glance, but it may have some subtle bugs. It's also possible that it will be vulnerable to attacks.
- Don't let juniors use AI tools. They are better off learning how to code properly from seniors and mids than from AI-generated code. They may hastily accept bad generated code and learn from it.
- Review Copilot's settings and block "Suggestions matching public code" and "Using my code snippets for product improvements". And don't feel bad about blocking the latter. Copilot isn't free - you're paying for it and therefore you don't owe GitHub anything more.
Another thing you may be wondering about is whether to hire junior developers. The answer is: yes, definitely. You'll need less of them, but you'll still need them. Think of juniors as of "future mids" and "future seniors" - it's a long-term investment.
Summary
It's clear that AI is coming to programming. It will replace some developers, but it will also make others more productive. We can't stop it, so the best thing we can do is to use it to our benefit. It can make us more productive and free us from doing boring and repetitive tasks. Maybe it's not such a bad thing after all?