Using Copilot Effectively #54286
Replies: 41 comments 42 replies
-
I just enrolled in the copilot free trial today. I can't get it to work with Visual Code Editor on and M1 Macbook Pro (I haven't tried on any other hardware because this is where I intend to use it). I couldn't find any copilot support sites and didn't find a discussion forum for it. Do any exist? I Googled up some info on the problem and found that the problem is common and some people have found that going back to a lower version of the copilot extension helps, but I've tried going back to multiple versions all the way down to 173 with no luck. I don't see any Icon or any sign that this is installed any way. Perhaps I don't know what I should see but based on some YouTube demos that I found, it seems like I should have a new icon for "chat" displayed in the sidebar menu but I don't. Is there a way I can solve this problem? If not, I'll have to cancel my subscription. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response! I see that it is installed. I have the icon you indicated and "Collect Diagnostics" worked. I still don't seem to know how to use it. How do I ask it to do something? I expected it to comment on my code and allow me to ask it questions. I've been using chatGPT so I expected it to do something like that. Do I need to activate it somehow? The icon you showed me indicates that it is activated since toggling it would deactivate it. |
Beta Was this translation helpful? Give feedback.
-
Thanks! The videos were helpful. |
Beta Was this translation helpful? Give feedback.
-
I want to work with copilot X. ;)”help!” |
Beta Was this translation helpful? Give feedback.
-
How do I set it up? |
Beta Was this translation helpful? Give feedback.
-
Thank you for all the advice and help! |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Muito bom! |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Copilot stopped working today. 9/10 times all I get is an error. This is really disappointing for a paid product.
I have reinstalled it. |
Beta Was this translation helpful? Give feedback.
-
just signed up 15 mins ago and WOW. It's reading my mind but better. I wish I was using this sooner. |
Beta Was this translation helpful? Give feedback.
-
Context and prompt are key factors. |
Beta Was this translation helpful? Give feedback.
-
When I used copilot to automatically generate unit tests for my c++ project, it couldn't use the classes or interfaces defined by mine correctly, resulting in a compilation failure. I feel copilot's C++ support could be better. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Hello Community, I don't know if this is the right channel to ask questions about Copilot X. Please direct me if my copilot suggested me a wrong route :-) I wonder, how big is the context size? It seems to be scoped only on the currently opened file (and where the cursor is located). Secondly, when is it possible to have context over all opened documents/workspace? And finally, in my opinion, including web access is a very important step, because the trained data is out-dated. The programming landscape is evolving really fast, especially with the AI era. Every chat-/codebot not connected to the internet is like reading old newspaper. Another idea comes in my mind: Automatic embedding of all GitHub Repositories (after opt-in by user/Organizations) after a commit/merge/PR etc. and this embeddings are then connected with a VecDB which Copilot X has access to. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
You are welcom |
Beta Was this translation helpful? Give feedback.
-
Idk if they got a roadmap but if they do it should include this: https://www.reddit.com/r/AGIunderconstruction/comments/163qbng/github_copilot_is_missing_a_few_things_leave_it/?utm_source=share&utm_medium=web2x&context=3 |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Hi Community, I hope I am right here with my question: I have 2 workspaces (FrontEnd in Angular & BackEnd in NodeJS). Is it possible that Github Copilot works together with both workspaces to make suggestions & autofill? Or do I have to move both apps in 1 workspace? Best regards |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Wow, i wish use GitHub Copilot soon |
Beta Was this translation helpful? Give feedback.
-
Can you restore my data to its original format from my request. I used a lot to disclose of the info |
Beta Was this translation helpful? Give feedback.
-
GitHub Copilot is aptly named. While some have feared that generative models will replace developers, I do not believe we are there yet: Copilot is an assistant, not a replacement. However, developers will need to adjust their skills, both to stay effective as well as to stay marketable through the disruption that the AI age is bringing.
I have a friend who is a commercial airline pilot, and asked him about how autopilot works on commercial airplanes. I think the analogy of how autopilot works is useful in framing how developers should approach learning how to use GitHub Copilot.
How Autopilot works on Commercial Flights
Most of us have flown in a commercial airplane. We all know that there are two human pilots in the cockpit, and we even know that they engage autopilot to fly the aircraft. However, even though we are all comfortable with the idea of planes flying themselves, we would be a little nervous if there were no humans in the cockpit before we take off!
Here is my understanding of how autopilot works during a commercial flights:
GitHub Copilot
Understanding how autopilot works, we can make a useful analogy when we consider GitHub Copilot:
Let's dig into these a little deeper.
Taking off - providing context
Just as autopilot can't take off automatically, in the same way a blank project or file isn't a good way to get going with Copilot. Even before that, developers need a "flight plan" - some idea of what they are going to be coding. Spending a little time to analyze requirements and think about how code is going to be written, tested, scanned, packaged and deployed will go a long way to better productivity and efficiency.
When using Copilot, you get the best results when supplying good context - think of this as the flight plan. Context is the file that you're currently editing as well as other tabs open in the solution. If you have other files already, open a couple of them to assist Copilot. Open test files to help Copilot with tests and examples of how your methods are being called.
Where none of this exists, take time to think about what you want the code to do and write the intent in comments at the top of the file. The more context you supply, the better your results will be.
I love doing the Advent of Code in December - and using Copilot while solving the puzzles has been great. However, I think one of the main advantages of using Copilot was that it subtly changed how I develop: rather than simply diving into code, I take a few moments to think about how I can best prompt Copilot to give me what I want. This makes a big difference and I found myself spending more time thinking and less time thrashing code - which is a more fulfilling experience as well as a more productive way to code!
Cruising Altitude - working in small chunks
Once you have a little bit of code, you're at "cruising altitude". This is where Copilot feels like magic - there is enough context for it to generate the code that you were thinking of. Keep working in small chunks (like inside a method body or inside a loop). The narrowed context produces far better results.
Remember, Copilot is a probability engine and there is some level of randomness inherent in how it works (this is true of all large language models). Broad, vague requests (low context) tend to produce results that show much more randomness (and less meaning and utility). Narrowing the context reduces the compounding effect of the randomness and is more likely to produce meaningful code.
Man the Radio - fast feedback
While you're having fun coding with Copilot at your side, don't forget to "man the radio". Remember, code in an of itself isn't the goal - solving business problems is! Moving faster isn't an end - it's a means to an end.
Why do we want developers to be more productive and efficient? The value of going faster is that we get feedback faster. The faster we get feedback from our end-users, the faster we're able to adjust course. Scrum and Agile didn't succeed because of daily stand-ups and retros - Agile succeeded because it focused on flow and shortening the feedback loop. Copilot, by making developers more productive, is wasted unless you're shortening the feedback loop. Listen to the feedback from end-users, and adjust accordingly. This will give Copilot purpose and value beyond just developer happiness.
Land the Plane - Good DevSecOps
Landing the plane is crucial - after all, if your plane doesn't land, you can't get to your destination! Again, the landing of the plane is a means to an end - you have to get off the plane to reach your destination!
Copilot will help you land, but you'll have to taxi in yourself. Copilot is designed to speed the "inner loop" of development - but you'll have to make sure you have an efficient "outer loop" too - peer code review, build automation, linting, unit and integration testing, scanning and automated deployment are critical if you're going to get the most out of Copilot.
Autopilot is only for flying
Copilot allows developers to move faster - which means you need to match that speed when it comes to quality gates and deployment - otherwise you'll get an impedence mismatch, which if you know your electronics, is a Bad Thing. Copilot, by making developers faster, requires your quality gates and processes to be faster.
The autopilot on planes do not check the fuel levels or the ailerons or do any of the preflight checks itself - quality control is still up to the pilots and ground crews. Copilot is not meant to do everything for you - it's meant to augment your developers and make them faster. You must have good DevSecOps practices in place to maximize your usage of Copilot.
Conclusion
GitHub Copilot is a powerful tool, but to get the most out of it developers should understand how to feed it context, work in small chunks, and ensure the rest of the DevSecOps pipeline is running smoothly.
Next steps - try out Copilot and share your insights about what you do to get it working for you!
Beta Was this translation helpful? Give feedback.
All reactions