AI Coders to rule the world?

Marco Kotrotsos
4 min readJul 16, 2021

--

Stackoverflow just became obsolete. Us? Not so much.

I was excited to find out that my access request to the technical preview of Github Co-Pilot was accepted yesterday. I dove in right away, and after some initial ‘blank page’ syndrome, I set out testing short functions with it.

Today will be my first day using it on the job, so I’m equally excited to find out how it holds up. But in the meantime, my small experiments didn’t disappoint.

Co-Pilot is an AI-driven autocomplete function you can add to supported editors; I’m using Visual Studio Code.

https://copilot.github.com/

GitHub Copilot is powered by Codex, the new AI system co-developed by OpenAI. The people that brought you GPT-3 (and is now exclusively licenced by Microsoft) are now powering your IDE. Microsoft tweaked the model so that GPT-3 is significantly more capable of recognizing and suggesting code. It’s not bound to a certain programming language and is trained on all publicly available source code on Github.

After its release, there was some criticism about it suggesting code that was ‘most likely’ copyrighted and prohibited for reuse. Still, in general, it was well-received, and I’m sure they will work out the copyright issue.

Working with it is nothing short of magical. And I believe it will be a game-changer. Mind you, this is one of the first real useful AI-powered code autosuggestions that does more than provides small snippets of code (Tab9 is another amazing project in this space), And they are constantly improving.

For instance, the suggested code for the Fast Inverse Square Root function from Quake 2, including swearwords, is cleaned up to not include the swearwords.

Being funny for CoPilot is a hit or miss.

One huge caveat is that a lot of the time, the suggested code is far from optimized. Because every code-snippet comes from (and likely multiple) different codebases, different coding styles will be used. With great power comes great responsibility, and it is the responsibility of the developer to make sure that he takes ownership of the code co-pilot suggests and be very diligent as to the working (and formatting) of it. Don’t expect Co-Pilot to be your senior pair programmer, even though that’s how Github is pushing it.

Where CoPilot shines are ranges.

Also I found that sometimes Co-Pilot favours certain libraries or frameworks. In this case it suggested code that uses jQuery.

The way you can work around that is really amazing. Just start writing the code the way you would for a Node solution for instance. (In this case I started importing axios) And then Co-Pilot will pick up where you left off.

I now started with importing axios. And co-pilot just infers my intended platform.

Will this replace us as developers. No, absolutely not. It’s an absolutely great working technical preview and I am super impressed what they did with this. I might use it for inspiration but don't think it’s clever to just take any code that Co-Pilot suggests and expect it to be useful in a production environment right away.

I don’t think this will remain to be a free service after the technical preview. So do not rely on it too much because Microsoft (GitHub’s parent company) at some point will probably turn this into a commercial product. I hope they don’t and will keep it completely free (As we are providing the code they use to train Codex for free as well) but we’ll see.

Thank you for reading this far. If you like, please subscribe/follow below. And have a great weekend!

--

--

Marco Kotrotsos
Marco Kotrotsos

Written by Marco Kotrotsos

Tech person. I write about technology, Generative AI, the cloud, design and development.

No responses yet