Skip to content

Repo containing sample code, which can be tested using GitHub Copilot

Notifications You must be signed in to change notification settings

nikhil-thampi/Copilot_Breakout_session

Repository files navigation

Copilot Breakout Session

Welcome to the world of GitHub Copilot 🙂

Important

  • Please use the Q&A section for asking your queries in the breakout section.
  • All attendees will be muted by default. Please raise your hand ✋ if you would like to discuss any topic and organizer of your room will unmute you.
  • Do not worry if you are not getting same response from GitHub Copilot as other members in the breakout room. We just have to reiterate the prompt based on the 4 pillars of the Prompt crafting, to get better results.
  • For each section, complete the exercises in the sequential order.

This repo contains sample code exercises, which can be tested using GitHub Copilot.

Introduction Section

Exercise 1

  1. Generate documentation for the exercise1.cpp without using GitHub Copilot chat

Tip

For this exercise, try to use GitHub Copilot code completion option.

Exercise 2

  1. Select exercise2.cpp and use GitHub Copilot Chat to understand the logic of the program. Generate the documentation and a README markdown file for the program.
  2. Add atleast 2 additional features to the existing C++ program of exercise2.cpp using GitHub Copilot
  3. Plan the unit testing of the additional features using GitHub Copilot

Tip

  • Run the exercises on your IDE and if you encounter any compilation errors, ask GitHub Copilot to understand about the errors in terminal
  • @terminal #terminalSelection fix or @terminal #terminalSelection explain
  • You can also ask GitHub Copilot by expanding more on the prompt.

Exercise 3

  1. Translate the codebase you have created to C# (or Java), generate unit test cases for the code and corresponding documentation

Exercise 4

  1. Create a new C++ workspace, which will call an API from US National Weather Service to get the current temperature for a specific zipcode or city. The code should evaluate the temperature and identify the corresponding climate for that region.

Note

You are doing great! 🥳 Now lets try some more exercises, to revise the concepts you have learnt about GitHub Copilot 🙂

Revision Section

Note

  • The goal is to make sure that you are familiar with concepts of GitHub Copilot
  • Your focus is not to complete the whole list of exercises within the allocated time.
  • Instead enjoy each of these exercises and explore how GitHub Copilot can help you to tackle even unknown codebase 🙂

Exercise 1

  1. Understand the logic for the exercise3.cpp and add sufficient inline documentation using GitHub Copilot. Create a README markdown file for the program.
  2. Add an additional feature to the existing solution using GitHub Copilot prompt crafting techniques and create a unit test plan for the new features.

Exercise 2

  1. Understand the COBOL file in exercise4.cbl and identify the underlying logic of the program. Translate the codebase in exercise2.cbl to C#, generate unit test cases for the code and corresponding documentation (including README markdown file).

Exercise 3

  1. Understand the existing logic in exercise5.cs and verify whether there are any existing issues/vulnerabilities.
  2. Add an additional feature to the existing solution using GitHub Copilot prompt crafting techniques.
  3. Create unit test cases for the updated code and generate the documentation to the program in such a way that a person who is comparatively new to C# should be able to understand the logic.

Bonus

  1. Verify the last_bonus_exercise.cpp program and verify how the smart pointer is implemented in the program.
  2. How can you modify the Animal class to add a new property to represent the age of the animal.
  3. How can you make the program thread safe?
  4. After making the above changes, create the unit test plan and add documentation.

You are now a champion of GitHub Copilot 🥳

About

Repo containing sample code, which can be tested using GitHub Copilot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published