Why GitHub Copilot Chat Is Better For Developers Than ChatGPT
A Copilot Ecosystem is getting bigger — meet GitHub Copilot Chat and Voice.
Great news! In case you’ve missed it, GitHub Copilot is not a single product anymore, but rather a suite of AI-enabled extensions for tech-savvy programmers. Everyone is talking about ChatGPT right now, but in my opinion, GitHub Copilot has always been, and remains, a way better tool for programmers. And recently, it got two huge updates that made it far more superior:
- Github Copilot Chat — a new IDE extension that allows chatting with AI about your code, ask questions, generate unit tests, fix bug, refactor, explain the parts in code you don’t understand etc.
- Github Copilot Voice — a voice assistant that allows writing code without typing
While I haven’t played with Github Copilot Voice much because I don’t have a need for it yet (maybe I’ll try it when I’m really tired of typing all day long), I spent the last few days testing Github Copilot Chat. I’ve noticed that it completely eliminates the need to use ChatGPT while coding. Before that, I would use Copilot just to autofill some of the most obvious parts in code (less typing, yay!) along with ChatGPT to brainstorm ideas, find typos, or even refactor sometimes. Now, I can stay in Visual Studio Code and code without switching between windows or opening my browser. GitHub Copilot Chat offers everything that ChatGPT did, plus a few more amazing features that I absolutely love.
As of today, Copilot Chat beta is available to all GitHub Copilot users for free, but it’s unclear whether or not this will be a part of a Copilot product or an extra add-on.
It has access to the context
No more CTRL+C, CTRL+V for me. Since Copilot Chat is a part of my VS Code Editor, it has access to the files I’m working on automatically so it knows what belong where and how it’s all supposed to work together. I can have a file open and ask questions in chat like:
- Where is a typo?
- Why do I get this error?
- Can this code be improved?
- How would you refactor this component?
The Chat is just a new tab on the left of my editor, below the extensions and source control. When I click on it, it opens a chat and with a brief introduction and a few sample questions I can ask to get started. It’s like having a coworker sitting right next to you who is looking at your code. It’s like pair programming but your partner is an incredibly smart and fast machine who never gets tired (unlike us humans).
It was trained on more relevant data
It’s no secret that GitHub has used an extensive amount of code to train their AI. Whether it was legal and ethical or not is a different question, but the results they’ve achieved are undeniably impressive. Having used GitHub Copilot since its initial release in private beta, I can tell you it has really good ideas sometimes. Of course, it’s not perfect and it was trained on bad code too so ultimately, it’s up to you which suggestions to accept and which to discard.
It can generate tests
Because Copilot has access to all your files and because it was trained on a lot of good code stored on GitHub, it can generate pretty good unit tests, blazingly fast. Before that, writing tests was a bit boring but important step of software development. Now, this step can be completely automated.