GitHub Copilot - Your Programming Pal |
Written by Mike James |
Wednesday, 30 June 2021 |
GitHub and OpenAI have a new tool described as "your AI pair programmer". It's not quite that good, but it is a view into the future of programming and an important step in the right direction. We tend to concentrate on languages and frameworks, but tools are more important. Yes, there are programmers who use just a text editor to create their thing, but there are people who reject all modern conveniences too - we mostly classify them as cranks or, at best, eccentrics. Why we look up to these back to basics, hair shirt-wearing nuts is another question, but tools have just taken another step away from the raw text editor and another step towards making us all less essential. GitHub Copilot is an AI-based system that will take notice of what you are coding and make suggestions for what it is you are about to type. You can think of it as IntelliSense on steroids, but users are claiming that it is a big step up. The idea is all based on the sort of AI that lead to the GP-3 language system. Take a very big network and train it on a huge corpus of natural language data and it will extract the regularities. What is surprising is that that there is so much regularity in natural language that a "dumb" system like GP-3 can join in conversations and seem intelligent, simply by selecting what comes next. If capturing the regularities in natural language can be done then surely this should work for programming languages too. The answer is it seems to be the case, but programming languages are far more restricted and while a natural language utterance might be OK with a slight, flaw, a programming snippit is useless if just one character is wrong. Copilot is based on OpenAI's Codex which was trained on a large amount of publicly available code. Basically the system is trained so that it learns to complete chunks of code. You take some code, delete some and then train the AI to correctly fill in the missing part. As long as you set the model up properly, it doesn't just remember the example it learns the generalizations of the examples and so is capable of extrapolation to things that it has never seen - well that's the theory. If you have a large enough dataset and a large enough network it does seem to work, but how well is another question. At the moment it can only be used with VS Code, but that seems reasonable, and while it supports many languages the ones specifically mentioned are Python, JavaScript, TypeScript, Ruby and Go. At the moment the trial is open to everyone and it is assumed that one day soon there will be a paid-for service. If you are worried about copyright issues using code generated by an AI, the good news is that most of the time CoPilot generates code its never seen before, i.e. not in the training set. Even if it was, the idea that such short snippets of code would be enforcably copyrighted seems a bit unlikely. It is clear from the quotes that some people at least think it is good: I'm impressed by how GitHub Copilot seems to know exactly what I want to type next. GitHub Copilot is particularly helpful when working on React components, where it makes eerily accurate predictions. GitHub Copilot has become an indispensable part of my programmer toolbelt. Feross Aboukhadijeh and Trying to code in an unfamiliar language by googling everything is like navigating a foreign country with just a phrase book. Using GitHub Copilot is like hiring an interpreter. Harri Edwards // OpenAI Yes I get that. It is also when simple Intellisense is most useful. What I would say is that Copilot is nothing like having a programming copilot as in pair programming. If you have ever done any pain programming you will know that the interaction goes much deeper than suggesting blocks of code - down to "is this the best way to do this?" The relationship should be much more high-level than what Copilot is offering. So is this the death knell for programming and programmers? Probably not. What it does reveal is how much redundancy there is in code. We probably need to work with bigger blocks of implementation. In the same way that Python is often thought to be popular because it has batteries included, i.e. lots of high-level library routines, maybe we need languages that do the same. Get database stuff, sort it on name, present it to the user via a form with 10 item lines... Language development has more or less ground to a halt. We don't seem to have any new radical ideas on the scale of object- oriented code or functional programming - not that these are much of a solution in the grand scheme, just better. So if we can't make progress on languages, perhaps devising tools such as Copilot is the way to go.
More InformationRelated ArticlesKite - Smart Copilot For Programmers Kite - AI Powered Auto Completion for Python Kite Launches AI-Powered JavaScript Auto-Completion The AI In The IDE - IntelliCode In Visual Studio AI Translates From One Programming Language To Another To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info
|
Last Updated ( Monday, 27 June 2022 ) |