Many of us have seen those movies that portrays Artificial Intelligence (aka AI) taking over the world and trying to destroy the human race. Well, that keeps us excited and eager to check out what happens at the end in a movie. But on the contrary, artificial intelligence does exist in the good news and it is helping us to do our work better these days – at least for now.
How about AI helping you as a coding companion / pair programmer. Github Copilot has become increasingly popular for this reason. Copilot uses the OpenAI Codex model to suggest code and even write entire functions in real-time, right from your editor. You can visualize this tool as a turbo charged auto-complete utility for coding. You give it the name of a function along with some additional comments, Copilot generates the code for you quite accurately! The fascinating aspect is that Copilot tries to understand what you are trying to write and provides you multiple suggestions for autocompletion and most of the time it works great.
GitHub is launching a series of updates this month to improve the capabilities of Copilot, its AI-powered coding companion. The company said, the amount of code being written by Copilot is continuously on the rise.
OpenAI Codex is the model based on GPT-3 that powers GitHub Copilot and it can be easily integrated with some of the popular development environments including VS Code, Neovim, JetBrains, and even in the cloud with GitHub Codespaces.
Copilot can provide code suggestions in quite a few languages, but works especially well for Python, JavaScript, TypeScript, Ruby, Go, C# and C++. The model is trained on billions of lines of code available in the public domain, such as GitHub repositories.
AI Coding Companions (aka AI Code Assistants) are gaining popularity among the developer communities and there are quite a number of emerging competitors out there. They focus primarily on improving developer productivity and saving time and cost. ChatGPT, Tabnine, Codiga, Amazon CodeWhisperer are some of the challengers to mention.
Will AI replace developers soon?
AI models has become smarter in terms of answering queries and writing code. But still, there will be a need for developers to solve complex problems. So, AI may not replace developers any time soon. Rather, AI will augment software developers now and may be “Software Programmers” will become “AI Programmers”. Developers will need to gain experience in using AI as their companion for programming activities to stay productive and relevant. May be as a developer you will be expected to create well-crafted prompts that allow AI models to generate accurate and varied outputs.
The code generated by AI shall need to be tweaked, validated for accuracy and assembled (integrated) into the codebase of the application. I mean, AI helps you in writing small chunks of code and not an entire module or application. The process would look like, the developer will prompt the AI model appropriately to generate pieces of code and then integrate it with the larger codebase to complete the desired functionality of the application.
Risks of using AI Code Companions
While AI can generate small chunks of code effectively, they may not have the same level of understanding and judgment as a human developer when it comes to complex tasks, domain, or area of expertise. As a result, there is always a potential risk of not covering the complete use case scenario and could also introduce security vulnerabilities. It is important that the developer performs a complete code review of the AI generated code.
Some legal experts do argue about possibilities of using copyrighted code snippets that could put companies and developers at risk. Models like Copilot generate code based on patterns they have learned from their training examples, some of which might be subject to restrictive licenses. But so far, there are no significant legal issues that has been reported. Experts say that this is not really a legal problem because these AI systems generate code by themselves and does not reproduce or copy snippets from a repository of code. Even though, the code generated is its own, these AI systems still relies on the code written by other developers, by which they got trained.
Conclusion
AI Code companions are here to extend the abilities of professional software engineers, as well as it can enable non-technical people to build new software. It is evident that the AI-assisted coding is on the rise. The participation of humans in the AI driven development will become more and more important, to ensure that the generated code is fit for purpose and compliant with other broader regulations.
Thanks for Reading. Stay Tuned!
Look forward to connecting with you!
Finally, “subscribe” to my newsletter, so that you get notified every time when I publish.
Check out some of my videos here, and do subscribe to my channel.
Here are some useful links to get started:
Getting started with GitHub Copilot in Visual Studio Code
Configuring GitHub Copilot in Visual Studio Code
Leave a Reply