
To be honest, this is an article I should have written long ago, and I don’t know why I have procrastinated for so long.
But it seems that my readers have never urged me to write such an article, which has provided a good reason for my delay.
Why do I say I should have written this article long ago?
Mainly because at the end of last year, OpenAI launched a globally explosive product, ChatGPT.
Before that, I never thought OpenAI would have any connection with Microsoft. It wasn’t until I looked up OpenAI’s equity structure that I found out Microsoft holds a staggering 49% stake, making it the largest single shareholder of OpenAI.
This explains why Google and Baidu were so alarmed when they saw ChatGPT. Moreover, Musk even complained on Twitter that OpenAI has deviated from its original open-source intention and has become a profit-driven entity controlled by Microsoft.
In fact, the collaboration between OpenAI and Microsoft is indeed very close.
Shortly after the launch of ChatGPT, OpenAI provided its more advanced GPT-4 to Bing, and after experiencing the new Bing’s capabilities internally, we were indeed greatly shocked.
Additionally, the new Bing is deeply integrated with the Edge browser. During that time, several of my colleagues worked overtime on weekends to quickly release a version of the Edge browser with new Bing features.
It felt quite strange to have a product I worked on suddenly involved in the world’s hottest topic. When I scrolled through Douyin and saw some tech bloggers introducing the new Bing features, I even saw the homepage interface of the new Edge browser that I had worked on.
Actually, at that time, I wanted to write an article to introduce ChatGPT and the new Bing. However, since we had internal experience qualifications, our leaders specifically stated in an email not to leak screenshots to the outside. Although external bloggers were already able to experience the new Bing, I thought about it and decided to refrain from doing so to avoid any potential issues.
Now that ChatGPT has developed to this point, I don’t know what direction it will continue to take in the future. I even feel that this wave of AI hype may pass in a while.
Unexpectedly, shortly thereafter, Microsoft launched another bombshell product, Microsoft 365 Copilot. This time, it applies the capabilities of GPT-4 to the Office domain.
As we all know, the functions of the Microsoft Office suite are profound, and most users may not even use 10% of its features.
With Microsoft 365 Copilot, you no longer need to search online for advanced Word usages, complex Excel formulas, or exquisite PPT production methods. You just need to tell Copilot what you want in words, and it will automatically generate everything you need according to your requirements, allowing every user to easily unlock the remaining 90% of Office’s features.
This is a development direction I completely did not anticipate, because although ChatGPT is powerful, it currently can only handle text-based Q&A problems, which may not be enough to bring about earth-shattering changes to previous work modes.
However, Microsoft 365 Copilot directly extends AI into a brand new field, which may lead to a productivity revolution. To exaggerate a bit, it could even be the beginning of a new industrial revolution.
I am optimistic about AI.
Microsoft 365 Copilot has indeed attracted a lot of attention recently, but what I want to introduce today is not it. In fact, Microsoft launched another version of Copilot two years ago, called GitHub Copilot.
To prevent some friends from not knowing, let me clarify that Microsoft acquired GitHub in 2018.
So what is GitHub Copilot?
In simple terms, it is an AI-powered tool that allows programmers to complete their coding work more easily and efficiently, thereby improving productivity.
We all know that GitHub is not an AI company. Therefore, GitHub Copilot is actually powered by OpenAI’s Codex.
So what is Codex? It is an AI interface developed by OpenAI that has the ability to program using human natural language models. In simpler terms, it allows us to write code using human language; you tell it what functionality you want, and Codex will automatically translate it into the corresponding programming language.
This feature was later integrated into ChatGPT, and I believe many friends have already experienced ChatGPT’s powerful programming capabilities, which are actually supported by Codex working silently behind the scenes.
My colleagues have repeatedly recommended GitHub Copilot to me many times, but I had not used it for a long time. The reason is still laziness, being too lazy to try and learn some new things, which is indeed a bad habit.
Eventually, I couldn’t resist the temptation of being able to use GitHub Copilot for free as a Microsoft employee, so I started using it, which led to this article.
Yes, GitHub Copilot does not have a free version; the personal version costs $10/month, and the enterprise version costs $19/user/month.
However, you don’t need to be discouraged too quickly; the personal version has a 60-day free trial period, so I think it’s worth experiencing and understanding.
After completing the purchase, the next step is to go to the IDE store you commonly use to download and install the GitHub Copilot plugin, which is supported by all JetBrains IDEs, Microsoft’s VS Code, etc.
Once the plugin is installed, we can experience GitHub Copilot’s powerful programming capabilities.
As mentioned earlier, Codex can use human natural language for programming, so let’s try it out.
Create a new Android project and open activity_main.xml; we describe our requirements through comments:
As you can see, after describing the requirements, GitHub Copilot automatically provides code suggestions based on our needs. At this point, simply pressing the Tab key will display these suggestions.
If this function had been introduced half a year ago, it would have shocked most people. However, now that everyone has experienced ChatGPT’s powerful programming capabilities, such a level of code suggestion may no longer be surprising.
But it must be said that although GitHub Copilot and ChatGPT are both powered by Codex, GitHub Copilot has its advantages because it has a more complete code context environment, which ChatGPT lacks.
Yes, if you look closely at the image above, you will find that GitHub Copilot knows we are writing layouts in ConstraintLayout, so the code suggestions it provides are written according to the syntax rules of ConstraintLayout.
If we place the same comment in the Compose environment and describe it again, the result is shown in the following image:
Therefore, GitHub Copilot can always provide corresponding code suggestions based on the current coding environment. These codes may not always be completely correct, but based on my observations, they are usually quite valuable references.
Speaking of code correctness, recently Wenxin Yiyan was just released, and I saw a blogger on Douyin who asked it to write a piece of PHP code to generate 10,000 8-digit invitation codes, and the result was as follows:
The most ridiculous part is that this blogger actually claimed that this code was completely correct, which is truly laughable.
This shows that whether it is ChatGPT or Wenxin Yiyan, no matter how powerful its capabilities are, it still requires someone knowledgeable to steer the ship. An outsider may not even be able to distinguish right from wrong, so saying it can replace programmers is still premature.
However, I am indeed curious whether Codex can handle this problem well. I verified it through GitHub Copilot, and you can see the correctness for yourself.
Besides actively telling GitHub Copilot what code to write, it often automatically provides some thoughtful suggestions when we are coding, making your coding work easier.
We all know that GitHub Copilot can only make intelligent code recommendations based on machine learning training from big data; it cannot understand our business requirements.
For example, recently when I was writing a layout in Compose, I wanted each child element’s width to fill the parent layout.
GitHub Copilot cannot know my intended requirements, so the initial suggestions it provided were not what I wanted.
However, once I completed the first child element, it seemed like GitHub Copilot suddenly understood my needs, and it was able to provide accurate suggestions for each subsequent child element, as shown in the following image:
This situation is quite common because in most cases, we don’t need to actively think about how to use GitHub Copilot; it always provides timely suggestions that make you smile during our coding process. I can’t provide too many specific scenarios, but once you’ve used it, you will definitely understand what I’m talking about.
In addition to improving coding efficiency, GitHub Copilot can also be used to quickly complete some tedious tasks that many programmers are often reluctant to do, such as writing comments or writing unit tests.
Writing detailed comments for your code is a very good habit, but not many programmers can truly do this; most find writing comments too troublesome.
GitHub Copilot can automatically generate corresponding comments based on the logic of the code; we may only need to slightly guide and adjust the generated content, making these originally tedious tasks very easy.
Here, I will use the previously generated code for generating 10,000 8-digit invitation codes as an example; this time we let GitHub Copilot automatically help us generate comments based on the existing code logic, as shown in the following image:
As you can see, the effect is still very good. I only need to provide slight wording guidance, and GitHub Copilot immediately understands my intent and completes the remaining comments.
My colleague jokingly said before that when he writes code, his thought process is sometimes grasped by GitHub Copilot, and what if the co-pilot’s skills are better than the captain’s?
Indeed, I believe there is currently no programmer in the world whose skills are higher than Codex, but no matter how good the co-pilot’s skills are, it can only provide suggestions; the final decision and ensuring code correctness still rely on us.
Having seen all this, I believe you can already appreciate the powerful features of GitHub Copilot. But does it have any drawbacks?
This is certainly not possible.
First of all, GitHub Copilot cannot always provide accurate suggestions; there are not a few instances where it gives completely wrong suggestions. ChatGPT also has many similar situations, and I believe everyone who has used it can feel this.
In addition, I personally feel that the most frustrating aspect of GitHub Copilot is that all its data comes from cloud-based big data training, and it lacks the ability to learn locally.
Let me give you an example: everyone must be using input methods every day. If we have some frequently input words, after typing them many times, the input method will be more inclined to prioritize the ordering of these words. This should be a very basic capability, right?
However, GitHub Copilot does not have such a function. Certain code templates unique to my local environment, even if I type them repeatedly, GitHub Copilot still does not know what I want when I switch to another file because its cloud training does not cover these locally unique codes.
From a working principle perspective, I completely understand this situation. However, every time it happens, I do feel that it is not smart enough.
Alright, that’s all I wanted to introduce about GitHub Copilot.
What are your thoughts after reading this?
Everyone may have different opinions. My personal opinion is that GitHub Copilot is great, but I may not be willing to pay $10 a month for it.
Because GitHub Copilot only improves work efficiency; I don’t think it can help improve my programming skills. On the contrary, after using GitHub Copilot, many codes that originally required thinking and analysis can now be omitted.
However, if you are a business owner, I would strongly recommend you purchase a subscription for each employee; this is truly a tool that can enhance your company’s productivity, and its cost is almost negligible compared to programmers’ salaries.
Additionally, the version of GitHub Copilot introduced in this article is actually from the previous generation. Currently, GitHub has launched an even more powerful Copilot X, which I have not yet had the opportunity to test, so I do not know how powerful it is.
But this brand-new AI era is truly changing at a rapid pace; let’s witness it together.
