GitHub Copilot

GitHub Copilot

Episode Twenty Seven

GitHub Copilot is an AI-powered coding assistant that suggests code that helps developers work faster, reduce boilerplate and explore ideas

Intro

I'm Peter and this is the RoguePlanetoid Podcast where you will find insights about Microsoft or related platforms and technology, along with so much more whether you are beginner or an experienced professional or just interested in technology. Keep Current, Keep Coding!

Welcome

Welcome to episode twenty-seven of the RoguePlanetoid Podcast about GitHub Copilot. GitHub Copilot is an AI-powered coding assistant that suggests code that helps developers work faster, reduce boilerplate and explore ideas. GitHub Copilot acts as a virtual pair programmer that can suggest lines or blocks of code and more including documentation directly within a code editor such as Visual Studio Code or Visual Studio. GitHub Copilot understands dozens of programming languages and can turn natural language prompts into code to enhance productivity, reduce repetitive coding tasks and assist with learning and exploration.

GitHub

GitHub's origins began with the introduction of Git in 2005 as at the time version control options for developers were clunky and not exactly much fun to use. Git was created by Linus Torvalds, the person behind the Linux operating system, as distributed version control system that would be easier to use for developers. Later that same year a group of developers who loved the power of Git but weren't so keen on the usability issues set out to create a better way to interact with it. So, they created a social, collaborative hub for coding which became GitHub and launched in 2008. GitHub was a way to host Git repositories online with a web interface and where you could fork, star or watch repositories to make coding more collaborative and discoverable.

GitHub quickly became popular with developers and by 2011 it had over a million repositories and over the next few years added more features such as pull requests, actions to automate workflows along with discussions, issues and projects to manage things from feedback to roadmaps. It would be in 2018 when Microsoft acquired GitHub although there was a mixed reaction from the open-source community at the time, but thanks to Microsoft's hands-off approach it has continued to thrive. Microsoft helped enhance GitHub with improved infrastructure and added tighter integration with Visual Studio and Visual Studio Code along with a deeper focus on open-source support.

GitHub now has over one hundred million developers on the platform and hosts hundreds of millions of repositories. GitHub is not just for code there's also other content such as documentation, notebooks and websites thanks to GitHub Pages which hosts the website for this podcast. GitHub started as a tool to make using Git easier and now the platform underpins how software is built, shared and maintained, along with the journey from passion project to Microsoft-owned powerhouse to become a key part of the software supply chain. You can find out more about GitHub along with exploring the repositories and even create your own at github.com or check out the link in the show notes.

GitHub Copilot

GitHub Copilot was first introduced in 2021 as a collaboration between Microsoft and OpenAI using their OpenAI Codex model, which descended from GPT-3 which itself was the ancestor of GPT-3.5 the model behind ChatGPT when it launched in 2022. The concept behind GitHub Copilot was to create an AI-powered coding assistant that could help developers code faster, reduce repetitive tasks and even help with creativity by suggesting code or documentation in real time. The OpenAI Codex model was trained on a mix of natural language and a large proportion of the publicly available code on GitHub and other sources, so it could understand both English and programming languages such as TypeScript, C# and more.

GitHub Copilot is like an AI pair programmer, you can type a comment or function name, and it can suggest code or even full implementations based on the context. Developers using GitHub Copilot can then accept, reject or modify any code suggestions as needed. Integrated Development Environments such as Visual Studio and Visual Studio Code can have GitHub Copilot woven directly into them, which you can use for free with limited access to select features with just a GitHub account or subscribe to unlock the full potential of GitHub Copilot.

GitHub Copilot in Visual Studio supports code completions where you can press tab to accept a suggestion, use inline chat to help write methods, classes or unit tests by converting prompts to code, along with using the chat window to ask questions about a solution or files. GitHub Copilot in Visual Studio Code allows you to use custom instructions and reusable prompt files that can be tailored to workflows, tools and projects. Visual Studio Code also now supports Agent mode to tackle complex multi-step tasks and next edit suggestions that predict your next move as you code. If you want to try out GitHub Copilot for yourself then visit github.com/copilot or check out the link in the show notes.

Conclusion

GitHub Copilot is more than a tool, it saves developers time by writing repetitive code or suggesting efficient alternatives and for new developers it acts as a guide to suggest best practices along with offering insights to help learn faster. GitHub Copilot can handle tedious tasks so developers can focus more on problem-solving and the creative aspects of software development. GitHub Copilot was one of the first major showcases of using large language models where developers and AI can collaborate effectively, which was then further and more broadly demonstrated with ChatGPT and later Microsoft Copilot which brought AI functionality to everyone in Bing, Windows and Microsoft 365.

GitHub Copilot is something I've used occasionally to save time when developing more recently, it is interesting to see what it suggests but to always use this as a base for implementation, as it is easy to just take what has been given but understanding the code is just as important. When I'm writing code myself it is to make it clear not only to myself but anyone else who may need to look at it. This might not actually be someone else but myself in the future who may need to quickly refamiliarise myself with the code. Developers should be writing code for people, whether it is just themselves or others, not computers as we're now in an era where clear code is acceptable because it is readable compared to some micro-optimised code that is hard to understand, but it is certainly fine as I have, to save time and effort with tools like GitHub Copilot.

GitHub Copilot can also be useful if referring to code that you don't understand to explain it, which can then be helpful when rewriting or refactoring the code to make it more readable. Software development should be like a story, you should be able to understand the overall narrative as well as each part of the story including decisions made, which would be what does a piece of code do and how does each part of it affect the outcome. Software development has always been enhanced with new innovations such as intellisense which offered code completion, information about parameters and descriptions of code elements, and it is no different with the introduction of AI to help developers such as GitHub Copilot.

GitHub Copilot makes it easier than ever for new developers to learn and understand or experienced developers to save time. There is always potential for expanded AI integration in the future beyond coding to help design, test and deploy applications. GitHub Copilot helped usher in the era of AI we're in today and it continues to evolve to deliver more functionality as AI evolves to enable new scenarios. So, I'd certainly recommend to new or existing developers if you haven't already to try out GitHub Copilot.

Outro

Thanks for listening to the RoguePlanetoid Podcast where each episode you will find insights about Microsoft or related platforms and technology, along with so much more wherever you listen to your podcasts or at rogueplanetoid.com/podcasts for the RoguePlanetoid Podcast whether you are a beginner or an experienced professional or just interested in technology. Keep Current, Keep Coding!

RoguePlanetoid Podcast is a production of cluarantonn.com

Hosted, Written, Produced and Edited by Peter Bull

Music based on Like a Tiger by Jo Wandrini

Production Company Name by Granny Robertson