GitHub Copilot - a pair programming match made in heaven?

GitHub Copilot - a pair programming match made in heaven?

If you are in the tech space, you may have read about the splash AI is making when it comes to software development and data analytics. Just last year, we saw how it was possible for a user in PowerBI to build complex DAX queries using natural language, courtesy of the OpenAI GPT-3 model. And more recently, at Microsoft Build 2022, we saw the announcement of Express Design, a way of making low code application development even easier by converting images or Figma files into a working canvas PowerApp design.

No alt text provided for this image

Well, just earlier this week, GitHub Copilot also became generally available in what has been hailed as an AiPPaaS or AI Pair Programmer as a service, a term I obviously made up, but hey, it has a nice ring to it so let's stick with it. Copilot is only available, for now, to individual developers with a company option to be rolled out later this year. It is a paid service and subscriptions start at $10 USD per month or $100 USD per year. There is a 60 day free trial and it can also be free for verified students or maintainers of popular open source projects.

So firstly, what is Copilot and what is pair programming? Pair programming is the technique whereby two developers write code together, usually for the same component or module at the same time and on the same machine. The idea is that pair programming, when done right, can improve both communication and collaboration and therefore code quality. It can also be used as a mentoring technique for more junior developers. Copilot will therefore act as your pair programmer (hence the name), looking at your code and offering up suggestions, from single lines of code to entire functions. In short, it is pretty much IntelliSense on steroids.

No alt text provided for this image

Copilot is powered by Codex, another OpenAI model just like GPT-3 that has been trained on public or open source code and natural language. It is an extension that can be installed in your development environment that will send your codebase to the GitHub Copilot service along with context. Context refers to the comments within your code, other files within the same project/folder and even URLs. The OpenAI Codex will then synthesize the inputs and return you the top snippets of code that best matches what you are writing.

No alt text provided for this image

Privacy is obviously a contentious topic here and you, as the developer have several choices when it comes to how your code/data is collected and used. For example, you can choose whether to allow your code snippets to be retained by GitHub and shared with Microsoft and Open AI to better improve the service. You can also submit a request to delete all the data associated with your GitHub identity. Here is a link to the privacy section of Copilot FAQs. At the end of the day, it comes down to a risk assessment exercise as to whether you should leverage Copilot.

No alt text provided for this image

From my testing using Visual Studio Code and building a simple non prod ReactJS app, setup is extremely easy and all you need to do after installing the extension is to authorize GitHub if not done already.

As I typed, you can see Copilot getting to work and providing suggestions based on what I was typing. I was super impressed by the speed of the service. Suggestions usually only take 1-2 seconds to show up which is great as the last thing you want is lag on a service like this.

No alt text provided for this image

If you hit Ctrl+Enter, another window will open up and you can then browse through the top suggestions and accept the solution that best fits what you are developing. No doubt this feedback loop will also be used to further refine the Codex model.

No alt text provided for this image

At a developer, it is important to understand what the code you are borrowing / importing is doing. So whilst it is extremely easy and tempting to hit Tab to add a line of code here or there, care and discipline must be taken to understand exactly what the code is doing especially when importing entire functions. With this said, this service may not be entirely suitable to a junior developer who is trying to improve their programming as it can result in a dependence on the service and create bad habits.

For other developers, it is easy to forget the many variations of syntaxes especially when programming across different languages and libraries. Often times, Google is your best friend and I can see how Copilot would be quite useful here as you would no longer need to leave your IDE to look for reference material.

No alt text provided for this image

I will be interested to see if Copilot for companies will behave differently and have a different layer of controls when it is released later this year. For now, Copilot is available as an extension for many flavours of IDEs from Visual Studio, Visual Studio Code, JetBrains and Neovim so be sure to check it out.

No alt text provided for this image

要查看或添加评论,请登录

Eric Cheng的更多文章

  • Unleashing the Power of LLM: The Art of Prompt Design and Fine Tuning

    Unleashing the Power of LLM: The Art of Prompt Design and Fine Tuning

    Recently, I came across a requirement whereby I needed to implement Named Entity Recognition (NER) to extract the model…

    1 条评论
  • Building an AI Technical Assistant: Leveraging ChatGPT and Embeddings

    Building an AI Technical Assistant: Leveraging ChatGPT and Embeddings

    Without saying, there has been a great deal of activity and buzz surrounding OpenAI and more specifically ChatGPT. This…

  • The importance of APIM

    The importance of APIM

    Many organisations, regardless of industry and size, will have data spread across a number of disparate systems and…

    2 条评论
  • Cloud Defender for DevOps

    Cloud Defender for DevOps

    Microsoft Defender for Cloud is Microsoft's integrated security solution for cloud security posture management (CSPM)…

  • Partitioning your Cosmos DB

    Partitioning your Cosmos DB

    One of the exciting announcements from last year's Microsoft Build was that the Cosmos DB serverless tier was becoming…

  • PowerApps Wrap

    PowerApps Wrap

    Unless you have been living under a rock, you would have heard about PowerApps. PowerApps is Microsoft's low code…

    4 条评论
  • Creating a NSW COVID rules chatbot

    Creating a NSW COVID rules chatbot

    Chatbots are becoming increasingly common (or even the norm) across many industry verticals. Imagine having an…

  • Pokémon, Custom connectors and the Power Platform

    Pokémon, Custom connectors and the Power Platform

    I guess it's comes to no surprise that the Power Platform comes loaded with connectors. I'm not even going to list the…

  • Overview of D365 Customer Voice

    Overview of D365 Customer Voice

    If you have been involved in managing customer feedback within the Microsoft ecosystem, chances are you have probably…

  • A glimpse into Azure Digital Twin

    A glimpse into Azure Digital Twin

    So far, I have only been using a single AZ3166 to send telemetry data back to an IoT Central application. In the real…

社区洞察

其他会员也浏览了