Copilot is released: A few thoughts
After a year in beta phase Copilot, Microsoft’s AI guided coding, has been released. Anyone can now subscribe to the service for 10 dollar a month or a 100 dollar a year. The question is of course is it worth it?
AI Pair programming
On the official website of GitHub, Copilot is introduced as
“Your AI pair programmer”
I was a beta-tester for a few months, and I think this gives a somewhat wrong impression. With the word AI, people generally think of highly intelligent thoughts. With pair programming we think of working together on a problem, share thoughts and come to solutions.
Copilot isn’t intelligent at all and only comes with suggestions. In this sense, it’s just an extension of the ‘intelligent’ code completion we can find in most IDE’s of today. The code Copilot suggests, is based on a match between the code you are typing and a pretrained model on available public code.
Does Copilot provide good suggestions? Sometimes it does, sometimes it doesn’t (mostly it doesn’t). The programmer really must be critical of what it uses and what it doesn’t.
Copilot is not magic, it’s just a tool.
Still, I had some wow-moments. Especially when I was adding log statements, Copilot suggested the log statement I was thinking of. This saved me a bit of typing. Coplit didn’t however save me one search on Stack Overflow as one might think.
I think currently, AI is similar to VR. On first usage, people are blown away, but then reality sinks in.
A small example
I found Copilot useful, just as I find intelligent refactoring, search and replace, code completion and other IDE functions useful. But its capabilities are not beyond that.
It’s useful, especially when you write repetitive lines of code or standard constructions like if-else. Then Copilot makes suggestions so that you don’t have to type it. In most other cases, the tool isn’t of any help.
A small example. Last month, I was upgrading my Java project that uses the integration framework Apache Camel. My goal was to upgrade from Camel 2 to version 3. There is actually a migration guide to follow here.
Copilot doesn’t really have knowledge about the world, so it doesn’t know what Apache Camel is, or that there is a migration guide. You can also not tell it to read the guide and come up with useful suggestions. It just suggests code based on the things it already ‘learned’.
Camel has components like the HTTP and Quartz component. They were however deprecated in Camel 2 and followed by HTTP4 and Quartz2. With the introduction of Camel 3, the deprecated ones were removed, and their successors renamed to the original names HTTP and Quartz.
So what did Copilot suggest here? It suggests HTTP5 and Quartz3. It just inferred that in most cases a sequence of numbers is used. These were unhelpful and just wrong suggestions. It maybe true that on new public code (my code?) that it can suggest the correct code in the future.
Often programming isn’t about most cases, but about a specific case. It’s like you find an answer on Stack Overflow, but you still need to adapt the answer to your own code.
Copilot is a useful to the programmer toolbox. Maybe not 100 dollar a year useful yet, but I am still curious enough how it will develop in the coming years. I think it will be valuable, but am not to worry about my job as (pair) programmer yet.