Plate 0.4 · Phase 0 — Ground Floor · 25 minutes
Your workshop: VS Code and DevTools
Two free tools, set up once, that you will spend the next several years inside. Twenty-five minutes now, and then — this is the point — you stop thinking about your tools and start thinking about your work.
Warm-up · from Module 0.3You're writing inside css/styles.css. What's the path to images/logo.svg?
../images/logo.svg — step up out of the css folder first, then down into images. Paths count from the file you're writing in.
Set the bench up once
A carpenter doesn't rearrange the workshop every morning. The bench is at the right height, the tools most often reached for are within arm's length, and the light is good. That setup was decided years ago and is now invisible; all the attention goes to the wood.
Beginners in this trade do the opposite. They spend week three watching videos comparing editors, week five switching color themes, week seven installing forty extensions. It feels productive and it is not building anything. So: install these two things, learn seven shortcuts, and get on with it.
The editor
You will write code in a text editor built for code. It colors your code so mistakes stand out, completes what you're typing, tells you about errors as you make them, and lets you search an entire project in a second.
Use Visual Studio Code. It is free, made by Microsoft, runs on Windows, Mac and Linux, and roughly three of every four developers use it. That last part matters more than any feature: every tutorial, every answer on Stack Overflow, and every colleague who looks over your shoulder assumes VS Code.
You'll hear about Cursor, Windsurf and others. Most are VS Code with AI bolted on, so everything you learn here transfers directly — install one later if you like. VS Code itself now offers GitHub Copilot too. Be deliberate in Phases 1 to 4: code that an assistant writes for you is code you didn't learn. If gray "ghost" suggestions start appearing as you type, switch them off: Settings → search inline suggest → untick Editor › Inline Suggest: Enabled. Type it yourself first; let the machine speed you up once you can already read what it produces. The people who skip that step build a very convincing illusion of skill and then can't debug their own project (debugging means hunting down and fixing the mistakes in code).
Install it
- Go to code.visualstudio.com and download the version for your system. The big blue button is the right one.
- Windows: run the installer, and tick "Add to PATH" and "Open with Code" when offered. Mac: drag the app into your Applications folder.
- Open it. Skip the theme picker for now — you can decorate later.
Open the folder, not the file. Use File → Open Folder and choose the portfolio folder you made in Module 0.3. Never File → Open File. When VS Code has the whole folder, you get the file tree down the left, project-wide search, correct path autocomplete, live preview, and — from Module 5.2 — version control. Open a lone file instead and half of the editor's usefulness quietly switches off. Almost every confused beginner screenshot on the internet is a single file opened on its own.
Four extensions. Not forty.
Extensions live behind the square blocks icon in the left bar (or Ctrl/Cmd + Shift + X). Search each by name, click Install, and then close the panel and leave it closed for a month.
| Extension | What it does for you | Why now |
|---|---|---|
| Live Preview (Microsoft) | Shows your page beside your code and updates it as you type — no switching windows, no reloading. | Turns editing into a conversation instead of a chore. Made by the VS Code team. |
| Prettier | Reformats your file to a consistent, tidy shape on save. | You will never again waste attention on indentation, and messy code stops hiding bugs. |
| Auto Rename Tag | Rename an opening HTML tag and it renames the closing one for you. | Removes a specific, constant, very annoying class of Phase 1 mistake. |
| Error Lens | Puts the error message on the same line as the error, in red, instead of hiding it in a panel. | Beginners miss errors because they never look at the panel. This makes them impossible to miss. |
Three settings worth changing while you're here. Open the Command Palette (see below), type "settings", choose Preferences: Open Settings (UI), then search for and set:
- Auto Save →
onFocusChange. Your work saves itself whenever you click away from the editor — to the preview, the browser, anywhere. - Default Formatter → Prettier - Code formatter. Without this, VS Code keeps using its own formatter and Prettier sits idle.
- Format On Save → ticked. Now Prettier tidies every file each time it's saved.
Why not the tempting afterDelay option for Auto Save? Because VS Code deliberately skips formatting on those timed saves — with it, Prettier would never run. onFocusChange gives you both.
Seven shortcuts that pay for themselves in a week
Not fifty. Seven. Use each one three times today and they're yours.
Seven shortcuts for both keyboards. Use the column that matches your computer:
| Action | Windows / Linux | Mac |
|---|---|---|
| Command Palette | Ctrl + Shift + P | Cmd + Shift + P |
| Go to file | Ctrl + P | Cmd + P |
| Save | Ctrl + S | Cmd + S |
| Format the file | Shift + Alt + F | Shift + Option + F |
| Comment out a line | Ctrl + / | Cmd + / |
| Select next match | Ctrl + D | Cmd + D |
| Search the project | Ctrl + Shift + F | Cmd + Shift + F |
Ctrl becomes Cmd and Alt becomes Option. Everything else stays the same.
If you only keep one, keep the first. The Command Palette is a search box for everything the editor can do — you don't need to know which menu a feature is hiding in, only roughly what it's called.
The other half of the workshop: DevTools
You've already opened DevTools twice, in 0.1 and 0.2. It's time to learn what the tabs actually are, because between them they answer nearly every question you'll have about a page. Click through them here first; they'll be familiar when you open the real thing.
Six DevTools panels. Each answers a different question about a page.
| Panel | What it shows | Try today |
|---|---|---|
| Elements | The live HTML and every CSS rule on whatever you select. Edits change the page at once. | Select a headline and change its color in the Styles pane. |
| Console | Messages and errors, plus a place to run JavaScript right now. | Type 2 + 2, then document.title. |
| Sources | The files the page downloaded, and a way to pause code and step through it. | Count the JavaScript files a big site loads. |
| Network | Every round trip: what was asked, what came back, how big, how slow. | Reload with it open, sort by size, find the heaviest item. |
| Application | What the site stored on your machine: cookies, preferences, cached files. | Open Local Storage and see what a daily site saved. |
| Lighthouse | A report card scoring speed, accessibility, best practices and search readiness. | Run it on a site you admire. |
You will use Elements in Phases 1 and 2, Console from Phase 3, Sources in Module 3.9, Network in Module 8.2 and Application in Module 4.5.
Top-left of DevTools there's a small phone-and-tablet icon — the device toolbar (Ctrl/Cmd + Shift + M). It shrinks the page to a phone-sized window so you can check your layout without owning eleven phones. You'll live in it during Module 2.7.
Your first two lines of JavaScript, right now
The Console isn't only for reading messages — it's a place where you can type JavaScript and have it run immediately, against whatever page you're on. You don't know JavaScript yet. Do this anyway; it takes forty seconds and it makes the language concrete a long time before Phase 3.
- Open any website, press F12, click the Console tab, and click in the empty space next to the
>. - Type
2 + 2and press Enter. It answers. It's a calculator. - Type
document.titleand press Enter. It tells you the page's title — document is JavaScript's name for the page you're on. - Type
document.body.style.background = "hotpink"and press Enter. Look at what happened. (If nothing seems to change, the site has covered its body with other boxes — try it on wikipedia.org or example.com.) - Reload. It's gone, for exactly the reason you learned in Module 0.1.
That last line is the whole of the front end in miniature: you reached into the structure (document.body), changed an appearance property (style.background), and the browser repainted instantly. Three languages, one line, and you just wrote it.
Three things beginners get wrong
1. Shopping instead of building. There is no editor, theme or extension that will make the next module easier. Set it up, then don't touch it until something specific annoys you.
2. Installing everything. Extensions overlap, argue with each other, and slow the editor down. Four is right for now. Add one only when you can name the problem it solves.
3. Ignoring the red squiggles. Your editor is trying to tell you something before you've even run the file — that is the cheapest bug report you will ever get. Error Lens exists to make it impossible to walk past.
Words you now own
- editor / IDE
- The program you write code in. VS Code sits between a plain editor and a full IDE.
- extension
- An add-on that teaches your editor a new trick.
- syntax highlighting
- Coloring code by meaning so mistakes stand out visually.
- IntelliSense
- VS Code's autocomplete — suggestions as you type.
- formatter
- A tool that rewrites your code's spacing to a consistent shape. Prettier is one.
- live reload
- The page refreshing by itself when you save a file.
- localhost
- Your own computer acting as a web server. Live Preview gives you an
http://localhost:3000address instead of afile:///one — closer to how the real thing behaves. - Command Palette
- The search box for every command the editor has.
Set up the bench. Then prove it works.
What you should see
VS Code's sidebar (Explorer)
PORTFOLIO ├ css │ └ styles.css ├ images │ └ harbor-sunset.jpg ├ js │ └ app.js └ index.html
The heading says PORTFOLIO. If instead you see a single file name with no folder tree, you opened a file rather than the folder: File → Open Folder and pick portfolio.
Live Preview
A panel opens to the right of your code showing a big bold Hello. Its address bar reads something like http://127.0.0.1:3000/index.html — your own computer acting as a server. Change the word in your code and the preview follows as you type.
Settings — the three you changed
- Files: Auto Save —
onFocusChange - Editor: Default Formatter — Prettier - Code formatter
- Editor: Format On Save — ✓
Test it: type <h1> Hello </h1> with messy spaces, click into the preview, and watch Prettier tidy the line when the file saves.
If Show Preview isn't in the menu
Live Preview isn't installed, or VS Code needs a restart after installing it. Check the Extensions panel for Live Preview by Microsoft.
Six questions. Four correct to move on.
"I open the folder, not the file. The Command Palette does anything. Elements is the page's structure, Console is where I talk to it, Network is every round trip." Your bench is set. From here on, every module is about the work rather than the tools.