GitHub Copilot Chat: This Moment Changes Everything
A screenshot of GitHub Copilot Chat, giving some advice about refactoring a React codebase so a User object is present everywhere.

GitHub Copilot Chat: This Moment Changes Everything

Last year, I wrote about my experiences using GitHub Copilot. It is a helpful tool for code auto-completion. You get basic functions with clean formatting.

Consider adaptive cruise control on cars. It takes care of the chore of maintaining a safe speed between your car and the car ahead of you. But you still have to steer. This is what GitHub Copilot is for writing code. It takes over some of the chores, but you have to verify it is doing the right thing.

So when GitHub Copilot Chat became generally available, my expectations were set appropriately. Or so I thought.

I have used it for a couple of weeks now. I clearly underestimated the impact of this product release.

Copilot Chat is impressive. Developers now have a personalized, tailored assistant right at their fingertips. It is ready to provide solutions tailored to the project at hand. Imagine having a custom-built tutorial for your project. Now imagine also having access to the author. And asking as many questions as you want, without them getting tired.

Copilot Chat is well-trained, focused, and polished. It is the new standard for AI product user experience.

In many instances, I thought I'd finally stumped it with my most difficult problem. Then it came back with a solution at least 90% correct. Usually, Copilot is no more than one prompt away from a 100% correct solution.?

If I do not understand what Copilot suggests, it can explain it to me. It never gets bored, impatient, or sassy.

Copilot Chat is to developers today what spreadsheets were to accountants in the early '80s. It is a complete redefinition of your job. Considering “what if” scenarios is now fast and easy. It offers a respite from context fatigue. You now focus on asking the questions and testing the solutions.

Buckle up: we’re never going back. But there are some pit stops along the way. Let’s start with what it is like to use Copilot day-to-day.

Practical use of Copilot Chat?

To say that Copilot Chat is impressive is an understatement. But you still have to learn how to use it effectively.

The workflow is Select, Prompt, Verify, Test.

First, you need to select a section of code you want Copilot to consider. You do not have to do this step if you want to ask a general question. But having a piece of code ready for Copilot to read will generally yield better responses.

Next, write a prompt in the chat window. Give an overview of what you would like to do. Also supply what (if anything) has been your approach so far.?

Being terse and commanding Copilot here is less helpful. You will likely get a message starting with “as an AI, I don't have the ability to…”. But it will still try to generate something as a response. Giving as much context as possible will get the best responses.

Once Copilot has come back with a response, it is time to verify. This is where your software engineering expertise comes in. If Copilot missed something, follow up in the chat. You will likely receive a response starting with “I apologize for the confusion,” followed by a correction.

Finally, it is time to test the code from Copilot. It provides a few buttons for copying the code in. One button copies, another skips copying and replaces whatever you have highlighted. After pasting in the code, be sure to test it by running it or using automated testing.

This workflow is natural if you write code on a regular basis. And if you are new to writing code, you can ask Copilot to explain concepts to you.

Where does Copilot Chat stop?

Copilot represents a massive leap forward in your productivity as a software engineer. But it does not do everything. And it also has a few shortcomings.

First, Copilot will not touch your codebase at all. You are having a conversation with Copilot in a separate panel. It generates snippets and suggestions, but you are responsible for implementing them. With generative AI still being new, this is a good guardrail. It ensures you have a chance to review code before it is a part of your codebase.

Next, Copilot doesn't run unit tests or verify the functionality of the generated code. You must test and validate the code to ensure its correctness and reliability. Copilot generates code, but the responsibility for testing and debugging is still yours.

Also, while Copilot excels at providing solutions quickly, sometimes it introduces suboptimal code. For example, I once encountered N+1 database queries in suggested code. If I had not understood what an N+1 problem is, I would not have spotted it. When you point this out to Copilot, it apologizes and regenerates code. But you still have to know.

Copilot will sometimes lead you to a dead-end. This happened to me when I tried to refactor some Next.js code. I wanted to use server-side context instead of client-side state. Only after trying a couple of approaches did I realize I was trying to do the wrong thing in this instance. And Copilot did not stop or warn me that this was not a good idea.

Finally, using Copilot effectively requires breaking down problems into chunks, then asking questions. Copilot's understanding is limited to the context of a single repository. If your project spans multiple repositories, you will need to work with one at a time. And Copilot will remind you that it cannot read your codebase beyond selected snippets. (Even if it seems to behave otherwise.)

Despite these limitations, Copilot is still incredibly valuable. It is a useful sidekick for your development efforts and one you should not write off.

The Race Is On: Envisioning the Future of AI in Development

Today, GitHub Copilot Chat is the most advanced AI development tool available. It is easy to use and has an unparalleled focus on code.

Other platforms are also incorporating AI functionalities as add-ons to their existing products. For instance, you can have Sentry attempt to explain a runtime error based on the stack trace. It does what most other AI tools do: provides immediate and confident responses with the most likely correct information.

But this is all just the beginning.

Imagine a scenario where AI writes all the code for a product MVP. Everything is generated, including the frontend, backend, admin panels, infrastructure, and tooling. All it needs is a description of the product you are building and it can generate the rest.

To truly unlock this potential future, we need tools that go beyond raw prompts. Organizing work and persisting context are going to be the keys. In the current generation, AI is trained on existing frameworks and languages. In the next generation, platforms will be AI-first. The guardrails of not touching the codebase will be removed. Our concept of what a codebase is will transform, or even disappear entirely.

And it all may happen sooner than you think!

Joe I'm curious about what projects you are using this for. From an educational perspective I imagine this could be highly beneficial, like if you didn't have a community to test and learn with. However using this for anything work or income generating related, given the learning/adaptive/retaining/open access of generative AI doesn't seem like a good idea. Thoughts?

Mohamed Abdelaziz

Software Engineer | Over 18 Years in PHP Development, System Integration, and Client Support

1 年

Thanks for this insightful article! Unfortunately I didn't have a chance to use GitHub Copilot Chat. On the other side, I started using Codeium 2 months ago, I'm really impressed as it seems like it reads my mind and does what I think to do! I wonder whether you tried Codeium so you can advise which is better from your point of view.

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

Joe LeBlanc的更多文章

  • Stripe is not your billing system

    Stripe is not your billing system

    I promised in my last newsletter to start writing and sharing code, specifically around Revenue Ops (RevOps). So I sat…

    2 条评论
  • Code as Marketing

    Code as Marketing

    Marketing to software engineers is difficult. We are a picky bunch.

  • Supabase Essential Training

    Supabase Essential Training

    I’ve recorded a new video training series! After a long hiatus, I got back into the booth at LinkedIn Learning…

    5 条评论
  • Starting in the software industry when it all looks hopeless

    Starting in the software industry when it all looks hopeless

    It’s not your fault. The software industry has been cutting jobs left and right, leaving very little for the Class of…

    2 条评论
  • Building a startup from scratch, Summer 2024 edition

    Building a startup from scratch, Summer 2024 edition

    If someone were to come to you with six months worth of funding for building a startup, what tools would you use? Here…

    6 条评论
  • Creating software at human scale

    Creating software at human scale

    We spent most of the last decade of our digital lives on large platforms built by cloud companies. “All of the apps are…

  • Don't become an expert: invest instead

    Don't become an expert: invest instead

    Think about the last video training library you saw. It likely had tags like “Beginner”, “Intermediate”, and “Expert.

    2 条评论
  • Predictions for the tech industry in 2024

    Predictions for the tech industry in 2024

    Welcome to my somewhat late, possibly irrelevant predictions for the tech industry in 2024! We’ll see in a year of any…

    4 条评论
  • ChatGPT's Custom Bots: A Leap Forward or a Stumble in AI Progress? It’s a Mixed Bag.

    ChatGPT's Custom Bots: A Leap Forward or a Stumble in AI Progress? It’s a Mixed Bag.

    OpenAI's rollout of custom GPTs for ChatGPT Plus users seemed like a breakthrough in personalized AI. However, my own…

    6 条评论
  • An office won’t develop your career

    An office won’t develop your career

    One of the most fiercely debated topics on LinkedIn is over the future of the physical office. Do we need it anymore?…

    2 条评论

社区洞察

其他会员也浏览了