I picked up a bug today where we got a NullReferenceException . I thought this was a good scenario where I could ask GitHub Copilot to find and fix the issue for me. Here is the orignal code containing the issue: I asked Copilot to investigate and fix the issue using the /fix slash command; /fix This code returns a NullReferenceException in some situations. Can you investigate an issue and suggest a solution? GitHub Copilot was successful in identifying the root cause of the problem. I was passing a ConnectionName using a different casing as the key found in the dictionary (e.g. Northwind vs northwind ). That’s good. However then I noticed the solution it suggested: Although that is a workable solution that certainly fixes the issue, it is certainly not the simplest and most performant solution. I undid the changes done by Copilot and updated the Dictionary construction instead: The human in the loop is still required... More information Tips & Tricks for Git...
Imagine learning programming concepts not through dry textbooks or boring exercises, but by embarking on epic quests in mystical realms. Doesn't sound that appealing to you? Yes? Join Copilot Adventures , Microsoft's innovative approach to coding education that transforms programming practice into an engaging, story-driven experience. What is Copilot Adventures? Copilot Adventures is an open-source educational project that combines the power of GitHub Copilot with immersive storytelling to teach programming concepts. Instead of solving abstract problems, you work through coding challenges embedded in rich fantasy narratives—from mechanical clockwork towns to enchanted forests where mystical creatures perform sacred dances. The project leverages GitHub Copilot, Microsoft's AI-powered coding assistant, to help learners write code while exploring these fictional worlds. It's essentially a "choose your own adventure" for programmers, where each story presen...