Cursor vs. GitHub Copilot: AI Coding Showdown!

Estimated read time: 1:20

    Learn to use AI like a Pro

    Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.

    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo
    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo

    Summary

    In this video by DevOps Toolkit, a comparison is made between GitHub Copilot and Cursor, two AI tools designed to assist with coding. The creator delves into various aspects such as speed, efficiency, and usability, ultimately concluding that Cursor outperforms Copilot in many significant ways. Throughout the comparison, Cursor is praised for its ability to evaluate entire code bases, provide detailed explanations, and generate appropriate test files automatically, whereas Copilot often lags and requires more detailed instructions. The comprehensive review suggests that Cursor is a superior tool for developers seeking AI assistance.

      Highlights

      • Cursor finished coding tasks faster than GitHub Copilot, showcasing its superior speed. โšก
      • The AI tool, Cursor, offers a more extensive and helpful response format. โœจ
      • Both tools can assist in coding, but Cursor provides a cleaner and more effective solution process. ๐Ÿง‘โ€๐Ÿ’ป
      • When switching code outputs, Cursor re-evaluates while Copilot sticks to minimal changes. ๐Ÿ”„
      • In tests creation, Cursor's approach better integrated with existing test patterns, making it more reliable. โœ…

      Key Takeaways

      • Cursor outperforms GitHub Copilot in speed and efficiency when writing code. ๐Ÿš€
      • Cursor evaluates the entire code base, offering more comprehensive solutions. ๐Ÿ”
      • GitHub Copilot tends to only address the file currently open, limiting its effectiveness. ๐Ÿ“‚
      • Cursor provides more detailed and structured responses, making it easier to implement changes. ๐Ÿ“œ
      • Both tools can generate tests, but Cursor aligns tests better with existing code patterns. ๐Ÿงช
      • Cursor automatically creates test files, whereas Copilot requires manual file creation. ๐Ÿ’พ
      • The comparison suggests trying out Cursor as it gives a better overall AI coding experience. ๐ŸŽ‰

      Overview

      The video embarks on a detailed comparison between two major AI coding tools: GitHub Copilot and Cursor. The host begins by discussing how each tool interacts with the code, particularly highlighting Cursor's ability to handle tasks more swiftly and efficiently. The narrative provides a recap of how these AI tools, integrated into developer environments, compare on various fronts.

        Throughout the video, numerous coding scenarios are explored, exhibiting Cursor's superior performance. While Copilot, backed by Microsoft, is expected to lead, Cursor instead showcases a remarkable ability to understand broader code contexts and deliver pertinent suggestions. The creator appreciates Cursor's knack for providing detailed, structured, and well-explained solutions that go beyond surface-level enhancement.

          In the latter part of the review, both tools are tasked with writing and testing codes. Cursor continues to impress by aligning its test creation with existing patterns and simplifying implementation processes. The video concludes with a clear endorsement of Cursor as the preferred AI coding companion due to its adept performance across various coding activities, leaving the audience with a favorable view of its capabilities.

            Chapters

            • 00:00 - 01:00: Introduction The world is still grappling with the potential applications of AI, however, its use in coding is apparent and beneficial. AI in coding is compared to an improved version of Stack Overflow. The key question being pondered is which AI should be utilized for coding tasks, with GitHub being a considered option.
            • 01:00 - 03:00: AI Coding Showdown Overview The chapter 'AI Coding Showdown Overview' sets the stage for a comparison between AI tools for writing code, suggesting that while major tech companies like Amazon's AWS, Google, and the like are prominent in this field, a smaller, lesser-known project or service might actually outperform these giants. This context leads to an exploration of the capabilities of different AI tools in coding tasks.
            • 03:00 - 18:00: GitHub Copilot vs Cursor Comparison In this chapter, the speaker discusses the emergence of AI tools for developers, likening their rapid appearance to mushrooms after rain. Due to the sheer number of options, the speaker decided to focus on comparing two specific tools that are believed to exemplify the current state of AI developer tools: GitHub Copilot and Cursor. Additionally, a brief pause is taken to introduce and promote a sponsor, Pate, who is suggested as a secure alternative to using traditional VPNs for those who wish to maintain security while working.
            • 18:00 - 27:00: Writing Tests with AI The chapter discusses shifting from traditional VPNs to Twin Gate as an alternative for accessing network-related resources. Unlike conventional VPNs used for accessing services like Netflix or online banking, Twin Gate acts as a VPN replacement for accessing infrastructure, devices, or work-related materials. It emphasizes the advantage of Twin Gate not being a VPN that hinders work progress.
            • 27:00 - 33:00: Conclusion In the conclusion, the speaker discusses the benefits of faster internet connectivity and introduces Twi gate with its free tier as a replacement for VPNs, highlighting its easy setup and speed. The chapter then returns to the main topic, comparing two AI coding assistive tools: GitHub Copilot, backed by substantial investment and known for its established reputation, and Cursor, a newer entrant in the field.

            Cursor vs. GitHub Copilot: AI Coding Showdown! Transcription

            • 00:00 - 00:30 [Music] AI is here with us encoding is probably the most obvious use case while the rest of the world is still trying to figure out what to do with it using AI for coding is a no-brainer it's like um an improved version of stock overflow the only question is which AI should we use for or coding should it be GitHub
            • 00:30 - 01:00 co-pilot AWS code Whisperer or Google Gemini whichever it is it is surely coming from one of the big players right what if I tell you that's not the case at least not completely what if I tell you that a small and relatively unknown project or a service is actually better than those big players today we will compare two different tools that can help us with any task related to writing
            • 01:00 - 01:30 or running code of any kind since AI tools for developers are popping like mushroom after rain I could not compare them all so I chose two which I believe are representative of the current state we're in let's take a quick break to introduce you to Pate the sponsor of this video now let me ask you something are you tired of using vpns but you still want to work securely if you are this might be the time to ditch remove
            • 01:30 - 02:00 get rid of vpns I mean they're evil right and to switch to Twin gate it is a VPN replacement now when I say VPN replacement I don't mean the kind of VPN that allows you to watch Netflix or the kind of VPN that allows you to access your bank account I mean the kind of VPN that allows you to access your network your infrastructure devices home lab or anything else related to your work and the best part is that it is not a VPN it is not one of those that end up preventing you from working or making
            • 02:00 - 02:30 your internet connection feel like you're using a modem from '90s it's easy to set up and it's fast like really fast there is a free tier try it out get rid of VPN thank you Twi gate for sponsoring this video and now let's go back to the main subject in one corner we have GitHub copilot a tool that exists for a while now and has a big name behind it which is putting billions into AI that one is heavyweight in the other corner we have cursor a tool that is relatively
            • 02:30 - 03:00 new a tool that hardly anyone is familiar with and a tool which did not at least not yet spend billions on AI that one belongs to the feather category it's like David versus golad except that David can use most of the tools golad has at its disposal anyways both GitHub copilot and cursor serve the same purpose both are capable of writing code of fixing bugs and and suggesting
            • 03:00 - 03:30 improvements both can be chat companions if you feel lonely and need someone other than your shrink to talk to both are working in vs code with GitHub copilot being an extension while cursor is a special distribution of it both have fre options but will gladly take your money the first chance they get you get the point right both are AI powered tools that can help with coding now with that out of the way let's get down to business and compare the
            • 03:30 - 04:00 too in one corner the one on the left side we have GitHub copilot in the other Corner the one on the right side we have cursor let the batttle begin the match starts by opening main.go file and AI charts in both IDs both AIS have a way to reference the whole code Base by prefixing The Prompt with workpace in case of GitHub co-pilot and code base in case of cursor we'll use those to ask
            • 04:00 - 04:30 them the first question let's ask co-pilot here it goes can you define a global variable response format that will get the value from open feature and use it to decide whether to respond to http requests in Json or text format Json should be the default value now that does not sound like a complicated thing to do right it's probably just a notch above the typical hello world example now let's repeat the same
            • 04:30 - 05:00 question for cursor and execute both after a few moments we can see that cursor was faster to finish while at the same time it provided a more extensive answer that's a plus for cursor right now let's wait for a few more moments until co-pilot finishes when I use co-pilot exclusively I thought that it is decently fast but now that I'm comparing it with cursor I must say that is slow I'm already growing impatient
            • 05:00 - 05:30 while copal is working let me stress that it does not matter that I'm using go today we won't go deep into it and you should experience similar results with any other language this comparison is about General performance and experience of using AI for coding and my examples are there not to teach you go but to show you how AI can be used for coding in any language cursor gets a point for being fast
            • 05:30 - 06:00 at least for now let's see what we got with co-pilot first we got a very short explanation of what it proposes we should do that's not very helpful right so let's move on further on it shows us what it's proposing we should do I'm mildly disappointed that it does not somehow Mark the proposed changes in the chat and even more that it chose to show the whole code instead of the functions that should be modified nevertheless this is helpful or to be more precise it
            • 06:00 - 06:30 is better than if I went to stock overflow or Google and asked for help it understands the code base or to be more precise it knows what's in the file that is currently open and it can propose changes we are yet to see whether those changes are any good now let's switch to cursor we can see right the way that it structured the response differently instead of showing all the changes as one big code block it split them into local chunks first it tells us that we
            • 06:30 - 07:00 might want to add a global variable second it tells us that we might want to modify the unit function third it suggested that we should change the HTTP error function and then oh boy then we got something very interesting unlike copilot that focused only on main.go since that one was open and still is cursor found out that we might want to update root. goo as well by proposing to
            • 07:00 - 07:30 change the root Handler function even though we thought both to evaluate the whole code base copilot focused only on the file that was open while cursor did what we expected from it further on we got an explanation of the changes cursor proposes as well as the current code it referenced the response we got from cursor is without doubt better than what we got from co-pilot it is more detailed and more thought true that's another
            • 07:30 - 08:00 point for cursor on top of that cursor evaluated the whole code base while copilot focused only on the file that was open that's the third I think point I'll give to cursor let's apply those changes and see how that works starting with co-pilot it seems to be working one line at a time line after line so patience is required in this case so I'm waiting and waiting and waiting as
            • 08:00 - 08:30 expected from what we saw in the chat it applied all the changes at once we'll go through the rest of the changes co-pilot proposes in a moment for now let's switch to cursor and see how it handles the same block of code since cursor separated each block of changes we should apply each of them separately I like that I like it more it feels more natural and safer it's probably how I would approach it without AI one code
            • 08:30 - 09:00 block at a time okay so let's apply the first block of changes cursor proposes if you focus only on the first block of changes we can see that both are the same both added a new Global variable response format great visually however I prefer cursor it is easier for me to understand what changed than co-pilots approach cursor is cleaner and easier to understand co-pilots use of different shap shades of green are confusing okay
            • 09:00 - 09:30 now let's apply that first block of changes made by both co-pilot and cursor since copilot already made changes to the whole file we need only to tell cursor to do the second block of changes now those two proposals are different yet both are technically correct subjectively I prefer cursor's approach but I won't go into details explaining why it is better it's subjective so I'll leave that one for you to decide let's
            • 09:30 - 10:00 apply both blocks of changes and move on to the next one the third block follows the same pattern copilot already implemented the changes and we need to tell cursor to do the same they are the same so let's accept them and move on cser has a huge Advantage here that it proposed changes to route. go as well copilot Focus only on the file that was open even though we told it to evaluate the whole workspace nevertheless let's try something different let's see how
            • 10:00 - 10:30 those behave when we start writing code ourselves we'll open Fibonacci Dogo files in both IDs and start writing code ourselves right now that function responds with text let's change that so that depending on the feature flag it responds with Json or text we'll do that right below FIB equals calculate Fibonacci number by typing if response format is Json and we'll press the enter key cile immediately propose the next
            • 10:30 - 11:00 line which seemed to be correct it's like it's reading my mind hit tub to accept the suggestion press the enter key to move to the next line and it immediately proposed what should be added next the return instruction accept with tab move to the next line and it correctly proposes to close the if statement that worked great no complaints at least until I find out that there is a better way to do it if I ever find out so let's try the same with
            • 11:00 - 11:30 cursor type if and there's no need to finish that line cursor already figured out what they want to do with a single if instruction we did not even need to type the whole line moreover not only that proactively completely the first line it proposed all the changes right away un like co-pilot that worked line by line cursor is already proposing all the changes at once that's brilliant and it is another Point Clear Point for
            • 11:30 - 12:00 cursor there's actually something else kopal did a bare minimum and converted my bad code into equally bad code that happened to fulfill the new requirement cursor on the other hand did an extra mile it changed both text and Json responses to include additional information with it suggestions Json now includes the input number as well as the calculated fibach number now those two solutions differ in the way they Implement conditionals I could argue that what co-pilot proposed is more in
            • 12:00 - 12:30 line with the way I would do it still just as before those are subjective differences so I won't start nitpicking both are technically correct just as with Jason response cursor did the extra mile with the text response by formatting it nicely now to be clear sometimes we might not want the AI to do those additional changes but in this case I think he did the right thing that's yet another point for cursor so
            • 12:30 - 13:00 far it's nobody knows how many points for cursor and none for co-pilot cursor is winning even though I stopped keeping track let's let's try now something different something more radical having to Output both Jason and text responses might not make sense all responses should probably be Json so most of what we did so far might not make sense let's tell AI to fix that we'll tell co-pilot that I changed my mind I want only Json
            • 13:00 - 13:30 output and then we'll let it run and do the same thing with cursor just as before co-pilot keeps focusing only on the file that is currently open so it proposed changes only to Fibonacci Dogo cursor on the other hand figured out that it should make changes to main.go then to Fibonacci Dogo only to go back to main.go cursor is clearly clearly better at least when figuring out what to change working with code code is almost never limited to a single file
            • 13:30 - 14:00 and the ability to understand and work on the whole code base is critical no matter whether we're talking about humans or AI whomever you are whatever you are you work on the whole code base not on a single file let's apply those changes and see whether they make sense while copilot made a single refactoring of the conditional it created earlier cursor correctly identified that feature flag we added earlier should not exist anymore in other words copilot made the
            • 14:00 - 14:30 smallest possible change and left us with technical depth while cursor made the right call if a person did what co-pilot did I would reject their PR I'd be very disappointed that they did not do anything beyond the bare minimum or start questioning their experience one of the two now let's see whether we can talk some sense into co-pilot and make it realize that it needs to do more and
            • 14:30 - 15:00 this is only copilot now to do that we'll let cursor take a rest since it already did what we wanted and we will tell copilot that you should have removed the change from Main go as well this time copilot did the right thing and reached the same set of changes as those cursor proposed right away I can only conclude that copilot needs more detailed instructions and more back and forth than cursor now that is not necessarily A Bad Thing For All I know you might be lonely and you're looking
            • 15:00 - 15:30 for someone to talk to rather than a tool that can help you write code who knows maybe now even though cursor did better than co-pilot I feel that both of them missed quite a few places where code makes HTTP responses so let's ask both of them to fix it by telling them that I want that applied to all responses with such a prompt I'm assuming that both are aware of previous conversations so we don't have to repeat
            • 15:30 - 16:00 ourselves now copal still ignores any file that is not currently open in the editor as a result it failed to do anything new since it looked only at main.go and Fibonacci Dogo since only those two are open in the editor cursor on the other hand understood that I want previous changes applied to all files that make HTTP responses it found out that ruth. go P.O memory leak. goo on top of usual culprits all have pieces of
            • 16:00 - 16:30 code that make HTTP responses okay I think that's enough code for now so far cursor was either just as good or better than co-pilot there's not a single case where co-pilot worked better than cursor which is a bit surprising one would expect Microsoft to be ahead of anyone else at least in this game given the Investments they made in open Ai and other projects now let's check how those to compare when writing
            • 16:30 - 17:00 tests let's ask AI to write unit and integration tests since this time we did not specify workspace or code base both will work or should work on unit test for Fibonacci Dogo since that one is currently in focus at least that's what I think should happen who knows we'll see now that's an interesting outcome even though we did not tell cursor to write tests for the whole code base the first suggestion it made was to generate
            • 17:00 - 17:30 test for root. go and my first reaction is to get annoyed since I did not ask for that however upon a closer look I can see that those tests are actually changes to existing tests since in one of the earlier iterations it changed responses to be Json now it is suggesting to change tests related to those previous changes that is actually brilliant it's something I should have remembered to do myself next cursor
            • 17:30 - 18:00 suggested to create a new test file for the Fibonacci Handler the one that is currently in Focus that's the same as what copilot did one important difference is that when cursor suggests to create a new file it actually creates it co-pilot on the other hand does not do that we need to create a new file ourselves first and only then co-pilot can apply code it suggests the same is true for integration test as well we need to create a new file ourselves while cursor just creates it for us as
            • 18:00 - 18:30 for the code of the test well both are okay but there is one important difference cursor suggested tests using the same patterns as those in existing tests that is especially true with integration tests those that were created by me were sending requests to the real whatever real means application and using a real database that's what cursor did as well I'm not sure whether it my patterns because it went through
            • 18:30 - 19:00 the code base and figured out how I like to organize and write tests or because it simply thought that's the right way to do I don't know why it did but it did the right thing that's important in any case we have integration tests from cursor that are perfectly usable as they are or with minimal changes on the other hand those from copilot can be thrown to trash those integration tests are not any different from unit test and certainly did not check the existing codee base to learn how how other tests are written now let's talk about the
            • 19:00 - 19:30 rest of comparison I perform actually you know what I will spare you the details of other comparisons are performed I'll just give you the gist of it when I asked them for help how to do something using scripts that are in that repository both figured out from the first attempt the only difference being that cursor is more detailed in its explanations I was actually surprised that both gave me correct anwers since I use Nal scripts
            • 19:30 - 20:00 which are still relatively exotic so I expected AIS not to know about them or at least not to know enough I was wrong both did well if I would run something from a terminal like for example those unit test both were fairly capable of figuring out how to relate errors pasted into the chat with the code however in case of co-pilot that was still limited to the code that is currently open while cursor never failed to evaluate the whole code base both failed to make any meaningful changes to GitHub actions workflows which was surprising and both
            • 20:00 - 20:30 suggested some decent improvements to Docker file kubernetes manifest and other stuff that lives mostly in isolation from the rest of the code base AI is developing fast so any conclusions we make today might easily become invalid tomorrow nevertheless there is no doubt no doubt at least in my mind that cursor is a better solution than giup co-pilot on top of those direct comp comp parisons I've been using GitHub copilot for quite a while
            • 20:30 - 21:00 now probably since the first release and I'm on cursor for about a month now I can safely say that right now cursor is better in almost every meaningful way it is often faster it provides more detailed explanations it uses the whole code bases the context do producing better suggestions representation of changes in the editor are better and easier to understand its AOC completion is just as good or better and so on and so forth now none of those things are
            • 21:00 - 21:30 clear right away but after using both for a while cursor is simply better in everything that matters those differences are sometimes small while at other times they are significant some differences cannot be even qualified and F into this feels better category the only complaint I have so far is that some shortcuts are a bit messed up and in conflict with those specific to cursor other than that I can strongly strongly
            • 21:30 - 22:00 recommend it try it out and let me know what you think thank you for watching see you in the next one cheers