Copilot Best Practices (What Not To Do)

Поділитися
Вставка
  • Опубліковано 21 січ 2025

КОМЕНТАРІ • 60

  • @adrielomalley
    @adrielomalley 2 місяці тому +2

    The spaghetti and spoon analogy is spot on. Just because something is possible doesn't mean it's the right approach. Efficiency is key when working with Copilot.

  • @tlskillman
    @tlskillman 10 місяців тому +8

    Very helpful. I had no idea some of these features existed. Thanks.

  • @aar021
    @aar021 10 місяців тому +4

    Love it. Thank you for the video. Love your delivery style. Also love Copilot, it is a smart time saver.

  • @adrielomalley
    @adrielomalley 2 місяці тому

    The most useful tip for me was using the arrow keys to quickly search prompt inputs. Fantastic feature! Thanks for the clear and concise video.

  • @adrielomalley
    @adrielomalley 2 місяці тому

    I've definitely made that mistake with inline prompting before. Thanks for clearing that up!

  • @alexandergarzon8052
    @alexandergarzon8052 9 місяців тому +5

    I would love to have an /improve command. Essentially, I envision writing my own code first and then seeking feedback from Copilot for suggestions on better approaches, improved syntax, and more.

    • @adrielomalley
      @adrielomalley 2 місяці тому

      Copilot shortcuts: /analyze, /explain, /fix. Use them!

  • @kate-pt2ny
    @kate-pt2ny 10 місяців тому +1

    This video is very meaningful. I learned a lot. Thank you for sharing.

  • @mohamedkarim-p7j
    @mohamedkarim-p7j 18 днів тому +1

    Thank for sharing👍

  • @AhmadElhedek
    @AhmadElhedek 9 місяців тому +5

    So why comments for prompting is bad though? maybe not very effective I get it but I feel like the video didn't tell me why it is bad.

  • @adrielomalley
    @adrielomalley 2 місяці тому

    Where can I find a directory of Copilot's "/" commands? Is it in the Git project, a whitepaper, the documentation, or the README?

  • @claus4tw
    @claus4tw 10 місяців тому

    I have set my vscode to only use a single tab at all times. Does that mean I cannot use workspace?

  • @zachfotis
    @zachfotis 10 місяців тому

    The chat icon has disappeared from my VS Code. Does anyone know why?

  • @ae-gc7ck
    @ae-gc7ck 10 місяців тому

    This was helpful for me. Thank you

  • @stevenzhang8620
    @stevenzhang8620 10 місяців тому +6

    My takeaway from the video: use inline chat(command + i), use / command.

  • @rootulp
    @rootulp 10 місяців тому +2

    Why should comments not be used for prompts?

    • @krishnabisen2666
      @krishnabisen2666 10 місяців тому

      Because that's not how we usually write the code, and it doesn't look clean

  • @ovidiuc4
    @ovidiuc4 10 місяців тому +1

    For me, both inline chat and the chat panel have been useless. Suggestions are always much lower quality than ghost text, whether I highlight the context or not. And I have to do extra work to get them (i.e. explain what I want). When context is needed, I go to Chat GPT in the browser, where I can have control over the context and have a conversation with it.

    • @madacol
      @madacol 7 місяців тому

      This is my experience too, I am using Linux and I've tried more than 5 times using the *inline chat* instead of the *comment-prompting*, and comment-prompting always win. Inline chat seems to not understand where I want the change or its context is messed up

  • @tekskilldev8310
    @tekskilldev8310 10 місяців тому

    @workshop looks all the files in the folder right? Even if you are working in js file workshop will keep html and css files in context as well right? Please explain. The suggestions via @workshop are thus wholistic and more relevant. Is my understanding correct?

    • @tekskilldev8310
      @tekskilldev8310 10 місяців тому

      @@squishy-tomato thank you for quick feedback. I have been using copilot for just over 3 months and it has greatly improved by ability in javascript sphere. I am glad I got this clarified. thanks

  • @chadGPT6969
    @chadGPT6969 3 місяці тому

    What theme you are using?

  • @gmartins-dev
    @gmartins-dev 9 місяців тому

    what vscode theme is used in this video please? I liked it

  • @sandervandemoortel370
    @sandervandemoortel370 6 місяців тому +3

    "it is constantly learning from your.... feedback" :D

    • @LabGecko
      @LabGecko 3 місяці тому

      lol ikr I got a chuckle out of that

  • @nanakwame1122
    @nanakwame1122 10 місяців тому

    opening multiple files does nothing even witht he #file command because the context is extremely small and can barely cover half a file

  • @rs3800
    @rs3800 10 місяців тому +9

    I disagree a bit with using comments in code for copilot: how to persist instructions for copilot in context otherwise?
    copilot has a very bad memory from chats.

    • @crackwitz
      @crackwitz 10 місяців тому +1

      The "what" is already encoded in the code. Comments are for "why".

    • @rs3800
      @rs3800 10 місяців тому +1

      @@crackwitz it's not always already in the code if Copilot does not perform as expected. Then it's IMHO helpful to have the comments as supporting "context". I think it also make sense to omit the verbs: "table of customers" instead of "create table of...."

  • @lars6280
    @lars6280 3 місяці тому

    thanks, very usefull !

  • @Mempler
    @Mempler 10 місяців тому +3

    before ctrl+i was a thing, I constantly used the comment method.

  • @Ayan-sn2vb
    @Ayan-sn2vb 7 місяців тому

    Great video.

  • @Shenron666
    @Shenron666 19 днів тому

    before copilot, i spent a lot of time writing boilerplate code for unit tests
    now i spend most of my time fixing copilot mistakes and misunderstanding 😑
    the rating system is archaïc, it suggest the proposal is binary, all good or all right, but it's rarely the case, most of the time it is mitigated
    and more important, i can't give a feedback right after the suggestion, i need to make sure it matches my needs and my request and more important, i need to ensure it compiles which is the worst part

  • @osman3404
    @osman3404 10 місяців тому

    Does that also works on Visual studio 2022

    • @mfsbo
      @mfsbo 10 місяців тому

      Yes it works with copilot installed as extension

  • @mfsbo
    @mfsbo 10 місяців тому +1

    I am going to say chat is more useful if your dont want to add some more context. For me comments have been more relevant and helped in smaller functions and hinting was a lot better with keeping code readable without losing the comments.

  • @SteeveCordier
    @SteeveCordier 2 місяці тому

    thx usefull !

  • @DavidSandoval-dd5eq
    @DavidSandoval-dd5eq 8 місяців тому

    What's not to love. Microsoft knows how to make it easy for beginners.

  • @josueando
    @josueando 10 місяців тому

    0:46 this was exactly the first prompt I wrote when I used copilot for the first time 🤣🤣🤣🤣🤣🤣

  • @AndyPayne42
    @AndyPayne42 7 місяців тому

    Tried doing it this way and the code comments is much faster/more natural. using special commands and then clicking with the mouse (or finding the right number of tabs) is not convenient.
    Why not adapt to how users like to use it instead of adding gui components and pushing that and saying the other way is wrong when user experience says otherwise. AI should integrate naturally.

  • @ofoyeAbraham
    @ofoyeAbraham 10 місяців тому

    Actually its awesome but I will need some slightly explanation of something you said

  • @yomajo
    @yomajo 10 місяців тому +1

    1:50 pffft. mouse.

  • @bladerunner6282
    @bladerunner6282 4 місяці тому

    copilot is practically useless as it requires me to use a mouse and keyboard to activate the microphone before asking a question. why didn't they give it an interface like google assistant that's listening all the time and activates the mic when it hears, "Hey Google!". smh
    so was it designed to be a code generating assistant? if so, that's not what they're touting it as. in fact, this is the first indication i've seen where coding was even mentioned. although i could see how it might be useful for those who proficient at typing. better to learn how to touch type IMO.

  • @yogitech33
    @yogitech33 10 місяців тому

    Comments aren't always efficient

  • @crackwitz
    @crackwitz 10 місяців тому

    Also, code just looks bad when all your prompts are strewn across it. It smells. Comments are for "why", not for "what".
    You should make a video on that coding practice. It looks like a lot of beginners use copilot and have terrible coding habits.

  • @ionutale1950
    @ionutale1950 10 місяців тому +1

    4:03 fixing that missing =, yeahh totaly worth 38$ per month

  • @justdavebz
    @justdavebz 10 місяців тому +11

    Why not use comments? It is because we cant help make co-pilot better by accepting correct answers and helping it learn? If that is the case, be transparent about it.

    • @theBidon
      @theBidon 10 місяців тому +1

      Lol

    • @ItsComcastic
      @ItsComcastic 10 місяців тому +4

      In my experience copilot just isn't as good when prompting with comments. Instead of suggesting code it often suggests more comments. What's cool about in line chat is you can ask it to do something, it'll create a diff for you to review and before accepting you can change the prompt to get copilot to tweak the suggestion it gave you. It's a pretty nice way to iterate on code suggestions and not possible to do with comments. If a comment generates a bad reply you have to make your comment even more verbose and copilot loses the context of the generated code you're trying to get it to make changes to.
      Yes github probably benefits from you using inline chat and feedback. But you also benefit from a better experience.

    • @ChrisNoringchrisnoring
      @ChrisNoringchrisnoring 10 місяців тому +1

      If copilot suggest a comment for a comment then start typing the code, that will help. Copilot is trained on docs and code, help it by narrowing it down. In editor and chat are two great experiences if you know how to use it

    • @user-xx9oe3mj7s
      @user-xx9oe3mj7s 10 місяців тому +2

      For me it's just inconvenient to use comments as you need to delete the comments again after copilot generated your answer (unless you want to leave them there and have a code full of copilot prompts)

    • @bass-tones
      @bass-tones 10 місяців тому +1

      Did you not see his example? He added a comment in the middle of an HTML block purely to instruct the AI. You would never in real life want this “comment” embedded in your HTML like this. In real life you’d add the comment to instruct the AI and then be forced to delete the comment afterwards.
      Keep in mind this is just an example. You shouldn’t create temporary code or comments for the mere purpose of asking the AI to generate something. That’s why the CTRL+I menu exists, that’s what problem it solves.