Beware of AI Coding Assistants | GitHub Copilot vs JetBrains AI

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
as promised I compared the most popular AI power coding assistant the plan was to create a test and show you the results at the end of the video however I noticed immediately that had more important lessons to share with you other than the fact I prefer GI up co-pilot over the competition there are features you should use and features you should avoid but let me start by explaining very briefly why I shows gab co-pilot according assistant is a tool capable of helping software developers in multiple ways its primary function is to perform Auto completion and code prediction you start by typing a few letters and it will suggest lines or even entire functions it's really fascinating especially when you use them for the first time but how do they do it they are built on top top of large language models that have been trained on basically all open source code and some private code basis a human will never be able to process the same amount of data not even in multiple lifetimes because of that these models have learned all the patterns we use while coding so when they analyze the contest of our project they can correlate to patterns they've already seen and suggest accurate predictions why did I choose G co-pilot over the jet BR assistant the reason I chose gilot is that it's really good at Auto completion it's very responsive and accurate and it offers multiple predictions at one time you can browse them in a dedicated tab or cycle through them by using shortcut keys in contrast the jet Brin AI assistant was less responsive it would predict code only on empty lines and that forced me to use explicit prompts I had to tell it exactly what I wanted and I found that disruptive I want the AI assistant to read my mind to predict based on what I'm typing I don't want to use direct prompts and this is exactly the first important lesson I want to share with to don't over rely on prompts to code your application especially if you are a junior there much more I need to tell you but let me explain why prompts are bad first the generated code is full of imperfections the model can predict what you're looking for but it cannot guarantee that the suggested code will compile if you ever use this approach you'll end up spending a lot of time refactoring code to fix syntactical errors I personally felt I was demoted to a Cod monkey the imperfections are not only syntactical but can also be logical there's no guarantee that the AI will generate back free code think about it do you want to spend most of your time writing code or reviewing code I prefer writing code I prefer using my problem solving skills there's also another issue especially if you are a junior are you sure that you can spot bugs or logical errors I know the answer it's not I overlooked many bugs while using this tools and it's completely normal I know from over two decades of coding that it's hard to spot a bug in code that I've written myself let alone finding a bug on a piece of code time copy pasting without even understanding it well another feature I strongly advise you to avoid is the test autogeneration first of all it's incompatible with test driven development or behavior driven development where the tests are written before the implementation it also has the same issues of prompting which is that you'll spend most time refactoring and reviewing the autogenerated code but the most important concern I have is that it can give you a false sense of security the AI will most probably generate tests that are aligned with the logic of your implementation if your Cod is wrong to start with the generated tests will reinforce your errors and make them more difficult to spot and solve that said it's not all bad I recommend that you start using using an AI coding assistant and I'm strongly convinced they will make us not only more efficient and productive but better software Engineers there are two features I loved and I really recommend that you use them extensively explain code and simplify code I was really surprised by how good these tools are at explaining code I'm convinced this feature can flatten the learning curve for Junior and even senior developers that are trying to learn a new programming language a framework or maybe when they need to get accustom with the new code base but my most favorite feature is the simplify code or reflector code as you know a problem can be solved in multiple ways however over time we get comfortable with a few patterns and that makes writing code very repetitive with this feature thei will analyze our code and offer Alternatives and there's nothing more exciting than discovering a new approach which is more elegant and efficient than the one we used to I really really love this feature and every time I see a convoluted function I make sure to check what alternatives the AI has to offer in conclusion all I wanted to say is that despite I think we all need to get accustomed to a new way of writing code with the assistant I want you to stay in control of what you're writing you are the pilot thei is your co-pilot your per programmer keep enjoying the thrill of writing code of using your creativity and problem solving skills I cannot predict if and when thei would replace us completely as software developers but I'm sure it's not now let's keep in control of what we produce and if you like this video don't forget to help me out like subscribe and share so that everyone can learn something new
Info
Channel: Marco Lenzo
Views: 4,577
Rating: undefined out of 5
Keywords: AI, AI Coding Assistant, GitHub Copilot, AI Copilot, AI Pair Programmer, Copilot, Duet AI, JetBrains AI, IntelliJ AI, JetBrains AI Assistant, Google Duet AI, Amazon Code Whisperer
Id: 4-WWAy_UOtE
Channel Id: undefined
Length: 7min 12sec (432 seconds)
Published: Thu Feb 08 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.