Skip to main content

🛠️ Lesson 1.2: Setting Up Your Environment

Install everything you need to write and run code in Python, JavaScript, and C# — all using VS Code.

🎯 Learning Objectives

By the end of this lesson, you will be able to:

  • Install and configure VS Code as your code editor
  • Install Python, Node.js, and the .NET SDK
  • Verify each installation from the terminal
  • Understand what a terminal/command line is and how to open it

Estimated Time: 45 minutes

Hands-on: You'll install real software and verify it works

📑 In This Lesson

What You'll Install

You need four pieces of software. One is your code editor (where you write code), and the other three are language runtimes (what actually runs your code).

graph TD VS["🖥️ VS Code
Code Editor"] --> PY["🐍 Python
Runtime"] VS --> JS["⚡ Node.js
JavaScript Runtime"] VS --> CS["🔷 .NET SDK
C# Runtime"] style VS fill:#3b82f6,stroke:#1e40af,color:#fff,stroke-width:2px style PY fill:#3776ab,stroke:#2a5a83,color:#fff style JS fill:#f0db4f,stroke:#b8a33a,color:#333 style CS fill:#68217a,stroke:#4e1860,color:#fff

📖 Key Terms

Code Editor: A program designed for writing code. Like a word processor, but for programming. VS Code is the most popular free code editor.

Runtime: The software that reads and executes your code. Python code needs the Python runtime, JavaScript needs Node.js, and C# needs the .NET SDK.

🎓 Instructor Note: Delivery Guidance

If teaching in a lab, ideally have these pre-installed or provide a setup script. If students are on their own machines, allocate extra time — installation issues are the #1 barrier in the first week. Consider having a TA available or doing a live walkthrough on a fresh machine via screen share. For Chromebook users, point them to the online alternatives listed in the troubleshooting section.

The Terminal

Before we install anything, you need to know about the terminal (also called the command line or console). The terminal is a text-based way to talk to your computer. Instead of clicking icons, you type commands.

You'll use the terminal to run your programs in all three languages. Here's how to open it:

Operating System How to Open the Terminal
Windows Press Win + R, type cmd, press Enter. Or search for "Terminal" in the Start menu.
macOS Press Cmd + Space, type "Terminal", press Enter.
Linux Press Ctrl + Alt + T (on most distributions).

✅ Pro Tip

VS Code has a built-in terminal — once it's installed, you can press Ctrl + ` (backtick) to open it. This means you can write code and run it without leaving the editor.

Step 1: Install VS Code

Visual Studio Code (VS Code) is a free, lightweight code editor from Microsoft. It works on Windows, macOS, and Linux, and supports all three of our languages through extensions.

  1. Go to code.visualstudio.com
  2. Click the large Download button (it detects your OS automatically)
  3. Run the installer and follow the prompts (accept all defaults)
  4. Launch VS Code when the installation is complete

Recommended Extensions

Extensions add language support to VS Code. Install these three:

Extension Publisher What It Adds
Python Microsoft Python syntax highlighting, IntelliSense, debugging, linting
C# Dev Kit Microsoft C# IntelliSense, debugging, project management, test support
ESLint Microsoft JavaScript linting (catches common mistakes)

To install an extension: click the Extensions icon in the left sidebar (it looks like four squares), search for the extension name, and click Install.

⚠️ VS Code vs. Visual Studio

These are different products. VS Code is free, lightweight, and cross-platform. Visual Studio (without the "Code") is Microsoft's full IDE — much larger and Windows/Mac only. We use VS Code for this course.

Step 2: Install Python

Windows

  1. Go to python.org/downloads
  2. Click Download Python 3.x.x (the latest version)
  3. Important: On the first installer screen, check the box that says "Add python.exe to PATH"
  4. Click Install Now

🚨 Don't Skip This!

The "Add to PATH" checkbox is critical. Without it, your terminal won't recognize the python command. If you missed it, uninstall and reinstall Python with the box checked.

macOS

  1. macOS comes with an older Python, but you want the latest version
  2. Go to python.org/downloads and download the macOS installer
  3. Run the .pkg file and follow the prompts
  4. Use python3 (not python) in the terminal

Linux

Most Linux distributions come with Python pre-installed. Open a terminal and type:

python3 --version

If it's not installed, use your package manager:

# Ubuntu/Debian
sudo apt update && sudo apt install python3

# Fedora
sudo dnf install python3

Verify Python

Open a terminal and type:

python --version

You should see something like Python 3.12.4 (your version number may differ). On macOS/Linux, you may need to use python3 --version instead.

Step 3: Install Node.js

Node.js lets you run JavaScript outside a web browser. Without it, JavaScript only works inside browser pages.

  1. Go to nodejs.org
  2. Download the LTS (Long Term Support) version — this is the stable, recommended version
  3. Run the installer and follow the prompts (accept all defaults)

💡 LTS vs. Current

The Node.js website shows two download options: LTS and Current. Always choose LTS for learning — it's more stable and better supported.

Verify Node.js

Open a terminal and type:

node --version

You should see something like v20.14.0. Also verify npm (Node's package manager):

npm --version

Step 4: Install .NET SDK

The .NET SDK (Software Development Kit) includes everything you need to write, compile, and run C# programs.

  1. Go to dotnet.microsoft.com/download
  2. Download the .NET 8 SDK (or the latest LTS version)
  3. Run the installer and follow the prompts

📖 What's an SDK?

SDK stands for Software Development Kit. It bundles the compiler (turns your C# code into a runnable program), the runtime (runs the compiled program), and the CLI tools (commands like dotnet new and dotnet run).

Verify .NET

Open a terminal and type:

dotnet --version

You should see something like 8.0.301.

Verify Everything

Let's run all the verification commands in one place. Open a terminal (or use VS Code's built-in terminal with Ctrl + `) and run each command:

# Check Python is installed
python --version
# Expected output: Python 3.x.x

# On macOS/Linux, you may need:
python3 --version
// Check Node.js is installed
node --version
// Expected output: v20.x.x

// Check npm is installed
npm --version
// Expected output: 10.x.x
// Check .NET SDK is installed
dotnet --version
// Expected output: 8.x.x

// List installed SDKs
dotnet --list-sdks

🎉 All Three Working?

If all three commands return version numbers, congratulations — your environment is ready! You're set up to code in Python, JavaScript, and C#, all from VS Code.

🎓 Instructor Note: Delivery Guidance

This is typically the point where some students will be stuck. Common issues: Python not added to PATH (Windows), Node.js requiring a terminal restart, .NET SDK needing a reboot. Have students who finish early help those who are stuck — peer support builds community. Consider a shared checklist on the board where students mark off each verification step.

Troubleshooting

"command not found" or "not recognized"

This almost always means the program wasn't added to your system's PATH. The PATH is a list of folders your terminal checks when you type a command. Solutions:

  • Close and reopen your terminal (or restart VS Code) — some installations require a fresh terminal
  • Restart your computer — this forces all PATH changes to take effect
  • Reinstall the software and make sure to check any "Add to PATH" options

macOS: "python" vs "python3"

On macOS, the python command may point to an old system Python 2 or not exist at all. Always use python3 and pip3 on macOS.

Using a Chromebook or Can't Install Software?

If you can't install local software, you can use online alternatives for all three languages:

These online tools work great for learning. You can always install the real tools later.

Permission Errors on Linux

If you see "Permission denied" errors, you may need to prefix commands with sudo. Never use sudo to run your own code — only for system-level installations.

Summary

🎉 Key Takeaways

  • VS Code is your code editor — one editor for all three languages
  • Python, Node.js, and the .NET SDK are the runtimes that execute your code
  • The terminal is where you run programs — python, node, and dotnet run
  • Always verify installations with --version commands
  • If you can't install locally, online alternatives work great for learning

🚀 What's Next?

Your tools are installed — now let's use them! In the next lesson, you'll write your first "Hello World" program in all three languages and run them from the terminal.

🎯 Quick Check

Question 1: What command do you use to run a JavaScript file from the terminal?

Question 2: What does "Add to PATH" mean during installation?