5 Things Every Dev Should Know About GitHub Copilot

Developers: beware. The time they’ve been warning about has come: computer code can now be written by...a computer.

Or, almost.

As OpenAI's GPT-3 was an AI-fueled autocomplete system for creating original poems, news briefs, and stories, and their DALL-E system was an image production engine for creating original images based on prompts, their newest offering--GitHub Copilot--is a powerful autocomplete system for code. Does that mean it’s time for developers to retire? To cancel the bootcamps, the professional development, to send all nearshore coders back to their office jobs?

Not quite. But it is a big deal, and it is a new development that we should all be paying attention to, and monitoring closely.

So what is GitHub Copilot exactly? And will it actually replace developers?

When Microsoft acquired GitHub in 2018 for $7.5 billion, it was an open question what they would do with the popular code-repository site. A year later, in 2019, when they invested $1 billion in the AI laboratory and research outfit OpenAI, ideas began to gather like storm clouds: what were they up to? What was the game plan? When they purchased an exclusive license for OpenAI’s GPT-3 language model, well, then perhaps those rain clouds were gathering in a way in which we could have guessed the outcome.

And now we have the storm: whether we like it or not, we know what they’ve been up to.

GitHub Copilot is to code what GPT-3 is to raw language. It’s even built on the same system -- or a newer version of it: Codex. Like the way that the language system that underpins GPT-3 was fed millions of bits of human language, the Copilot algorithm has been fed terabytes of public code -- most of it pulled from GitHub, of course -- and a significant portion of the English language as well (that other, older, code). 

This means that when prompted (by comments, requests, or lines of code) by a developer, Copilot is poised to use its predictive AI knowledge to generate the next line -- or dozens of lines, or entire bodies of code -- to complete the developer’s design.

In other words, it doesn’t write your code for you...it just finishes your thoughts, I mean code.

As of now, Copilot works with a large number of frameworks and languages, including Python, JavaScript, TypeScript, Go, and Ruby. As it continues to learn, expand, and upgrade, it’s only a matter of time before that list expands.

5 Things Every Dev Should Know About GitHub Copilot

Are you freaked out? Already looking for a new line of work? 

Don’t be -- at least not yet. 

Below we’ll explore what you need to know about Copilot, where it’s shining, and where it still needs some work (which means you’ll still have a job; at least for now). And remember: the job of a developer isn’t just to produce lines of code that have already existed; it’s also to solve new problems and to do so in dynamic and interesting ways. So far, neither GPT-3, nor Copilot, have shown themselves to be better than humans at creating elegant solutions to new problems. They’ve just shown themselves to be pretty good at solving pretty common problems, pretty quickly.

Here, as promised, are some of the ways Copilot is shining, and some of the ways it still needs some work:

1. It’s a pair programmer

When Microsoft and GitHub talk about Copilot, they refer to it as a “pair programmer.” Maybe this is a way to calm the fears of developers worried about being rendered obsolete, or maybe it’s just a descriptive title: rather than writing code itself, Copilot is meant to work alongside devs, to help them reduce tedious tasks, and to speed up their work -- so they can get on to more important, interesting, conceptual work. When you prompt it, it completes your thought. Like predictive text on your mobile phone, but for code. It’s simple, and helpful. And not nefarious in the least.

At least that’s the intent.

5 Things Every Dev Should Know About GitHub Copilot

2. Doesn’t compile, doesn’t test

What GitHub Copilot is, right now: a great source of potential. What it isn’t: everything a dev does. For example, Copilot doesn’t compile code, and it doesn’t test it -- it just suggests solutions for code based on prompts or requests a dev types out. Copilot may produce up to ten suggestions, but human intelligence is still required to identify, implement, test, and choose the best solution.

At least for now.

3. Saving time, or taking time

One thing Copilot does well, is produce lines of code, and in particular in a specific range of languages. What it doesn’t do, is ensure these lines of code are the lines you should use. This means once the code is produced, you have to test it, inspect it, and integrate it into your program -- which takes time. What takes more time: working with Copilot, or just writing the (simple, common) code yourself?

Perhaps only time will tell.

4. Search less, produce more

As GitHub CEO Nat Friedman explains in a blog post introducing Copilot, the technology is poised to “help developers quickly discover alternative ways to solve problems, write tests, and explore new APIs” without having to search on sites like Stack Overflow. That means  

Which is a nice trick, and especially helpful if you don’t like searching.

5 Things Every Dev Should Know About GitHub Copilot

5. Work quickly in languages you don’t know (well)

Right now, Copilot, like all AI programs, works because it learns, and it learns from consuming tons and tons of code. So far, it specializes in Python and JavaScript, among a few others, which means if you don’t know Python and JavaScript well, Copilot will help get you up to speed on these languages fast. In other words, it’ll help you punch above your weight. As more languages are added, it’ll likely help more devs learn more -- faster. So that more developers, earlier in their careers, will be able to punch above their weights.

So maybe don’t cancel the bootcamp yet -- just rewrite the curriculum. 

--

If you want to stay up to date with all the new content we publish on our blog, share your email and hit the subscribe button.

Also, feel free to browse through the other sections of the blog where you can find many other amazing articles on: ProgrammingITOutsourcing, and even Management.