01 · VS Code#

?> TL;DR ?> Visual Studio Code is a free, extensible code editor from Microsoft. It has ~75% developer market share in 2026 and runs locally, over SSH, inside Docker, and in the browser. It is your home base for the entire course.

Why VS Code?#

There are fancier editors (JetBrains PyCharm, Neovim), but VS Code wins because:

  1. It’s free and open source — no subscription, no vendor lock-in.
  2. Extension ecosystem — tens of thousands of extensions. Python + Jupyter + Docker + Remote-SSH all work together.
  3. Runs anywhere — local, over SSH to a GPU server, inside a Docker container, inside WSL, in a browser via code-server.
  4. Native AI assistance — GitHub Copilot, Claude, Gemini all have first-class VS Code integrations.
  5. You’ll see it in every job — it’s the editor of the industry.

VS Code Tutorial for Beginners

Install VS Code#

macOS
brew install --cask visual-studio-code

Or download the .dmg from code.visualstudio.com.

Linux (Ubuntu / Debian)
sudo snap install --classic code
# Or with apt:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
sudo apt update && sudo apt install code
Windows
winget install -e --id Microsoft.VisualStudioCode

Or download the installer from code.visualstudio.com.

After install, add the code command to your shell PATH (macOS/Linux already do this when installed via the methods above; on macOS with a .dmg, open VS Code and run Shell Command: Install ‘code’ command in PATH from the Command Palette).

The Command Palette — Your Superpower#

Press Cmd/Ctrl+Shift+P. This opens the Command Palette. Every feature in VS Code is reachable from here. When in doubt, search.

Common starting points:

CommandWhat it does
Python: Select InterpreterPick which Python / .venv to use
Remote-SSH: Connect to Host...Open a remote server’s files inside local VS Code
Dev Containers: Reopen in ContainerDevelop inside a Docker container
Jupyter: Create New NotebookStart a .ipynb file
Git: CloneClone a repo with a GUI prompt

Must-Install Extensions for This Course#

Install these by pressing Cmd/Ctrl+Shift+X to open Extensions and searching:

ExtensionPublisherWhy
PythonMicrosoftLanguage support + Pylance + debugger
JupyterMicrosoft.ipynb notebooks inside VS Code
RuffAstral SoftwareFast Python linter + formatter (replaces Black + Flake8)
Even Better TOMLtamasfepyproject.toml syntax highlighting
GitLensGitKrakenAnnotate every line with git blame info
DockerMicrosoftManage containers + Dockerfile linting
Remote - SSHMicrosoftEdit files on a remote server as if local
Dev ContainersMicrosoftContainerized dev environments
GitHub CopilotGitHubAI autocomplete + agent mode (free tier available)
Mermaid Markdown PreviewbiernerRender Mermaid diagrams in markdown

?> Install them all at once ?> Open the terminal and run: ?> bash ?> code --install-extension ms-python.python \ ?> --install-extension ms-toolsai.jupyter \ ?> --install-extension charliermarsh.ruff \ ?> --install-extension tamasfe.even-better-toml \ ?> --install-extension eamodio.gitlens \ ?> --install-extension ms-azuretools.vscode-docker \ ?> --install-extension ms-vscode-remote.remote-ssh \ ?> --install-extension ms-vscode-remote.remote-containers \ ?> --install-extension github.copilot \ ?> --install-extension bierner.markdown-mermaid ?>

Settings Sync#

Press Cmd/Ctrl+Shift+PSettings Sync: Turn On. Sign in with GitHub. Now your extensions, keybindings, and settings follow you to any machine.

Essential Settings for Python#

Open settings.json (Command Palette → Preferences: Open User Settings (JSON)) and paste:

{
  // Editor
  "editor.formatOnSave": true,
  "editor.rulers": [88, 120],
  "editor.bracketPairColorization.enabled": true,
  "editor.minimap.enabled": false,

  // Python + Ruff
  "python.analysis.typeCheckingMode": "basic",
  "[python]": {
    "editor.defaultFormatter": "charliermarsh.ruff",
    "editor.codeActionsOnSave": {
      "source.organizeImports.ruff": "explicit",
      "source.fixAll.ruff": "explicit"
    }
  },

  // Terminal
  "terminal.integrated.defaultProfile.osx": "zsh",
  "terminal.integrated.defaultProfile.linux": "bash",
  "terminal.integrated.fontSize": 13,

  // Files
  "files.trimTrailingWhitespace": true,
  "files.insertFinalNewline": true,
  "files.exclude": {
    "**/__pycache__": true,
    "**/.pytest_cache": true,
    "**/.ruff_cache": true
  }
}

Remote Development — The Killer Feature#

You can edit files on a remote machine (GPU server, cloud VM, Raspberry Pi) with VS Code running on your laptop. The editor is local, but the language servers, terminal, extensions, and debugger all run on the remote.

# Ensure your ~/.ssh/config has:
# Host gpu-box
#   HostName 1.2.3.4
#   User ubuntu
#   IdentityFile ~/.ssh/id_ed25519

# Then in VS Code: Cmd+Shift+P → Remote-SSH: Connect to Host → gpu-box

The first connect installs a small vscode-server on the remote. Subsequent connects are near-instant.

Jupyter Inside VS Code#

  1. Create a file analysis.ipynb — VS Code opens it as a notebook.
  2. Click Select Kernel → choose your Python from .venv or your UV-managed env.
  3. Run cells with Shift+Enter.

You get variable inspection, plot inline, Copilot completions per cell, and you can convert notebook ↔ .py with one command.

?> No more lost kernels ?> Before VS Code, notebooks meant either Classic Jupyter (separate browser) or JupyterLab. Today most data scientists run notebooks directly in VS Code because they can jump between .py files and .ipynb in the same window. Classic Jupyter is still great for quick one-off experiments on a remote server via browser.

AI Assistance — Copilot and Beyond#

In April 2026, VS Code’s AI features include:

  • Inline suggestions — ghost-text completions as you type.
  • Inline chat (Cmd/Ctrl+I) — edit-in-place with natural language.
  • Chat view (Ctrl+Alt+I / Ctrl+Cmd+I) — conversation with context from your workspace.
  • Agents — autonomous mode that reads files, edits across multiple files, runs commands, and self-corrects. In 2026, VS Code supports an Autopilot preview where agents approve their own actions.

Free tier: monthly inline suggestion and chat quota. Pro: $10/month unlimited.

?> Custom instructions ?> Create .github/copilot-instructions.md in your repo to give the AI project-wide conventions. Example: ?> markdown ?> - This is a Python 3.13 project using FastAPI and SQLModel. ?> - All new code must include type hints and a pytest test. ?> - Use Ruff rules; never use `black` or `isort`. ?>

Keyboard Shortcuts You Must Memorize#

On macOS use Cmd; on Linux/Windows use Ctrl.

ShortcutAction
Cmd+PQuick open any file by name
Cmd+Shift+PCommand Palette
Cmd+BToggle sidebar
Cmd+`Toggle terminal
Cmd+Shift+FSearch across all files
Cmd+DSelect next occurrence (multi-cursor!)
Alt+ClickAdd another cursor
F2Rename symbol (safe across files)
F12Go to definition
Alt+F12Peek definition

5-Minute Exercise#

  1. Install VS Code + the Python extension.
  2. Create a folder hello-tds, open it in VS Code.
  3. Create hello.py with print("Hello, TDS!").
  4. Open the integrated terminal (Cmd/Ctrl+backtick) and run python hello.py.
  5. Install the Ruff extension. Save the file — confirm it formats.
  6. Commit to Git using the Source Control panel (no terminal needed).

If all six steps work, you’re ready for UV.

Further Reading#