Summary and Schedule

This is a Byte-Sized RSE lesson on AI-assisted Coding with Microsoft Visual Studio Code and Github Copilot, part of the Byte-Sized RSE Series.

An intermediate-level practical course on integrating Artificial Intelligence (AI) tools into research software development. Building on foundational knowledge of large language models (LLMs) and AI coding assistants, this course focuses on using these tools effectively within integrated development environments (IDEs). Researchers will develop practical skills to enhance productivity, improve code quality, and apply AI responsibly in real-world research projects.

Learning Objectives


At the end of this lesson, learners should be able to:

  • Describe how GitHub Copilot integrates with Microsoft Visual Studio Code and explain the different modes and models available.
  • Configure Copilot to protect privacy and intellectual property.
  • Use Copilot to explore and understand an existing codebase.
  • Construct effective prompts and manage context to improve AI-generated responses.
  • Use inline suggestions, plan mode, and agent mode to make targeted and larger-scale code changes.
  • Evaluate AI-generated suggestions critically, checking correctness, scope and maintainability.
  • Apply a responsible and incremental approach to AI-assisted development, matching the level of review to the level of autonomy.

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.

Setup


Prerequisite

Skill prerequisites for the practical activity:

  • Basic knowledge of programming in Python (using variables, lists, conditional statements, functions and importing external libraries)
  • Experience using Python virtual environments (creating virtual environments, activating/using them, and installing packages within them)
  • You have previously written Python scripts to accomplish tasks in your domain of work
  • Some basic experience of using Visual Studio Code (opening workspaces, editing and running code)
  • Ability to navigate filesystem and run commands from within a shell

Software prerequisites:

  • Shell with Git version control tool
  • Python version 3.8 or above
  • Visual Studio Code (ideally the latest version)
  • Visual Studio Code GitHub Copilot extension (ideally the latest version)

Shell with Git

On macOS and Linux, some version of a shell (e.g. bash) with Git will be available by default and no installation is needed.

If you do not have a bash shell installed on your system and require assistance with the installation, you can take a look at the instructions provided by Software Carpentry for installing shell and Git. You’ll also need a GitHub.com account.

Python

Python version 3.8 or above is required. Type python -v at your shell prompt and press enter to see what version of Python is installed on your system. If you do not have Python installed on your system and require assistance with the installation, you can take a look at the instructions provided by Software Carpentry for installing Python in preparation for undertaking their Python lesson.

Pip

Pip Python package should come together with your Python distribution. Try typing pip at the command line and you should see some usage instructions for the command appear if it is installed.

VS Code

The hands-on part of this topic will be conducted using Visual Studio Code (VS Code), a widely used IDE. Please [download the appropriate version of Visual Studio Code][vs-code] for your operating system (Windows, macOS, or Linux) and system architecture (e.g., 64-bit, ARM). If you already have VSCode, ensure it’s updated to the latest version.

You’ll also need to install the GitHub Copilot extension by following the GitHub Copilot VS Code installation instructions. You’ll need a GitHub.com account to be able to use the extension. You only need to complete steps 1 and 2 at the top of the page. If you already have this extension installed, ensure it’s updated to the latest version.