Setup: VS Code and Your Language
Install VS Code and the tools for the language you'll use in this course, on Windows or macOS, make a course folder, and run your first one-file program from VS Code's terminal.
Novice · Data Structures · Software Development · Updated
After this lesson you can
- Install VS Code and the tools for one language on Windows or macOS
- Run a one-file program in your language from VS Code's terminal
Key takeaways
- You need one language to start. You can install any of the others now or later, and every lesson and exercise works in whichever ones you have.
- VS Code is the editor for every language in the course; each language adds its own extension.
- On Windows, winget installs the tools; on a Mac, Homebrew does. Close and reopen the terminal after installing, so it finds the new commands.
- A one-file program runs with one command in VS Code's terminal, such as python hello.py or node hello.js.
Before you can run the code in this course, your computer needs two things: an editor to write code in, and the tools for your language. This lesson installs both, makes a folder for the course, and ends with your first program running. It takes about 20 minutes, most of it waiting for downloads.
Pick a language to start
Choose the language you know best, or the one your class uses. You can add any of the others now or at any time later; nothing in the course stops you. Every lesson shows all five, and every exercise has a folder for each.
| If you're... | A good first choice |
|---|---|
| In an intro or AP class, or new to programming | Python or Java |
| Working toward .NET jobs, or you took the C# bootcamp | C# |
| Building websites | JavaScript, then TypeScript when you want types |
Not sure? Pick Python. It's the most common first language in college, and the course shows it first.
Step 1: Install VS Code
VS Code (Visual Studio Code) is a free code editor that works for all five languages. This course was checked with VS Code 1.143.
On Windows, open Terminal (right-click the Start button, then Terminal) and run:
winget install Microsoft.VisualStudioCode
On a Mac, install Homebrew first if you don't have it (the one command on brew.sh), then run this in the Terminal app:
brew install --cask visual-studio-code
If either command doesn't work, download VS Code from code.visualstudio.com instead.
Step 2: Install your language
Find your language below and run its two commands, one for Windows and one for macOS. When it's done, close the terminal and open a new one, so it finds the new commands. Then install your language's VS Code extension: in VS Code, click the Extensions icon on the left (four small squares), search for the extension's name, and click Install.
C#
The .NET SDK 10 (checked with 10.0.403), which includes C# 14.
winget install Microsoft.DotNet.SDK.10
brew install --cask dotnet-sdk
Extension: C# Dev Kit, by Microsoft.
Java
Java 25, from Eclipse Temurin (checked with 25.0.5).
winget install EclipseAdoptium.Temurin.25.JDK
brew install --cask temurin@25
Extension: Extension Pack for Java, by Microsoft.
Python
Python 3.14 (checked with 3.14.10).
winget install Python.Python.3.14
brew install python@3.14
On a Mac, the command is python3 wherever this course says python.
Extension: Python, by Microsoft.
Python exercises use pytest, the testing tool most Python teams use. It's installed into a virtual environment: a private folder of packages for one project, so projects never fight over versions. Each exercise tells you to make one; you can try it now in any folder:
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install pytest==9.2.0
python -m pytest --version
On a Mac, the second line is source .venv/bin/activate. If PowerShell refuses to run the activate script, run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned once, then try again.
JavaScript
Node.js 26, the long-term support version (checked with 26.13.0). Node runs JavaScript outside a browser.
winget install OpenJS.NodeJS.LTS
brew install node
JavaScript support is built into VS Code: no extension needed.
TypeScript
TypeScript runs on Node.js, so install Node.js as in the JavaScript section above. Node 26 runs a .ts file directly. Each TypeScript exercise installs TypeScript itself (version 7.0, checked with 7.0.2) when you run npm install in its folder, so there's nothing else to install now.
TypeScript support is built into VS Code: no extension needed.
Step 3: Make a course folder
Make a folder for the course somewhere easy to find, such as your Documents folder, and name it after the course (data-structures, say, or design-patterns). In VS Code, choose File > Open Folder and open it. Everything for this course goes in here.
Step 4: Run your first program
In VS Code, choose File > New File, and save it in your course folder with your language's file name from the table below. Type your language's version of this program (pick your tab):
Console.WriteLine("Hello from VS Code!");
Hello from VS Code!
void main() {
IO.println("Hello from VS Code!");
}
Hello from VS Code!
print("Hello from VS Code!")
Hello from VS Code!
console.log("Hello from VS Code!");
Hello from VS Code!
const greeting: string = "Hello from VS Code!";
console.log(greeting);
Hello from VS Code!
Open VS Code's terminal with Terminal > New Terminal, and run your file:
| Language | Save the file as | Run it with |
|---|---|---|
| C# | hello.cs |
dotnet run hello.cs |
| Java | Hello.java |
java Hello.java |
| Python | hello.py |
python hello.py (python3 on a Mac) |
| JavaScript | hello.js |
node hello.js |
| TypeScript | hello.ts |
node hello.ts |
When the terminal prints Hello from VS Code!, your setup works. The first C# and Java runs take a few seconds longer, while the tools get ready.
Try it. Change the words between the quotes to your own name, save, and run it again.
When something goes wrong
| What you see | What it means | Try this |
|---|---|---|
'dotnet' is not recognized (or java, python, node) |
The terminal was open before you installed | Close every terminal, open a new one, and run it again |
On Windows, python opens the Microsoft Store |
Windows' placeholder python is in the way |
Reopen the terminal after installing; if it persists, open Settings > Apps > Advanced app settings > App execution aliases and turn off the two Python aliases |
| command not found: python on a Mac | macOS names it python3 |
Use python3 |
| Java says unnamed classes are a preview feature | An older Java is being used | Run java -version; it should say 25. Reinstall Java 25 and reopen the terminal |
Check yourself
2 questions to try on the lesson page.
So what
Your computer is ready for the whole course. Every lesson from here on has code you can paste into a file in this folder and run with the same command you just used.