Setup・Getting ready

Install VSCode on your computer

To write code, you need a tool for writing it. Install VSCode, the free editor the pros use, and get yourself to the starting line.

Welcome to the world of programming. This is the very first step, made for people who feel like they “seriously have no idea where to start.” You don’t need any hard knowledge yet. First, let’s get the tool for writing code set up on your computer.

What is an editor?

Code is just text. So you could actually write it in your computer’s “Notepad.” But in Notepad there are no colors, it won’t point out your mistakes, and it’s very hard to write in.

That’s where an editor comes in. An editor is like a “super-powered Notepad made just for programming.” And among editors, VSCode is by far the most popular one. Let’s start by installing this one.

Here are some of the reasons an editor is so “super-powered.”

  • Text gets colored — tags, text, and other parts are color-coded by their role, which makes code much easier to read
  • It points out mistakes — for a tag you forgot to close or a typo, it quietly lets you know with a wavy underline and the like
  • It suggests words as you type — type partway and suggestions pop up, so even long words are less likely to be mistyped

In the world of code, a single wrong character can break a page. Hunting for that with only your own eyes is tough. An editor is a partner that takes that “hunting” burden off your shoulders.

Handy “extensions”

A big part of VSCode’s appeal is that you can add features later. These add-on parts are called extensions. It’s the same feeling as installing apps on your phone to make it more useful. For your first steps, these three are recommended.

ExtensionWhat it does
Live ServerWhen you save a file, the browser automatically updates to the latest look. No more reopening it every time
Prettier - Code formatterNeatly tidies up messy code at the push of a button
Language Pack (optional)Switches the VSCode screen to your own language. VSCode is in English by default, so this is only if you want it

All extensions can be installed for free (some do link up with paid services, but the three introduced here are free). When choosing, it’s safest to pick ones with a high install count and a name that exactly matches what’s introduced here. Extensions with similar names often sit side by side, so get into the habit of also checking the author’s name (for Live Server, it’s Ritwick Dey).

SetupThe big picture of an HTML fileThis is where the Prettier you just installed comes in handy. The topic of “closing nested tags neatly” comes up a little further along

Summary of this lesson

  1. You write code in an editor (VSCode is recommended)
  2. VSCode is free. Install it from code.visualstudio.com
  3. With extensions, you can add handy features later (Live Server is a good first one)
  4. For now, it’s fine if you can just launch it. Settings can wait

Try it: install VSCode and its extensions

It’s not hard. It’s the same steps as installing any other app.

  1. In your usual browser, open code.visualstudio.com
  2. Press the big “Download” button (the right one for your computer is chosen automatically)
  3. Open the file you downloaded and install it, following the instructions
  4. Once the installation finishes, launch VSCode
The official VSCode site. There’s a big “Download” button in the center
The official site (code.visualstudio.com). You can install it from the big button in the middle.

If a blue-icon app starts up and a slightly futuristic-looking screen appears, you’ve succeeded.

VSCode right after launch. Icons run down the far left, and a welcome screen is shown on the right
This is the screen right after launch. If you see the column of icons on the far left and the welcome screen on the right, you’re good.

A pitch-black screen is fine too

When you open it for the first time, you might see a dark screen full of unfamiliar words and think, “Whoa…” But don’t worry. You don’t need to set anything up right now, and it’s fine if you don’t understand what any of it means. Just getting it installed makes this lesson a big success.

Next, let’s install the extensions too. Click the icon made of four little squares (Extensions) on the far left of VSCode, type a name into the search box that appears, and just press “Install.”

The VSCode extensions panel. “Live Server” is typed into the search box, and Live Server appears at the top of the list
Type a name into the search box and the candidates line up. First, try installing Live Server by searching for “Live Server.”

You’ve got your tools.

FAQ

Is VSCode really free?
Yes, it is free. You do not need to create an account or enter any payment details. Microsoft officially distributes it for free, and you will never be charged for it later.
Can I use it on both Windows and Mac?
Yes. VSCode works on Windows, Mac, and Linux, and the download button on the official site automatically picks the right one for your computer.
Can I change the language of the VSCode screen?
Yes. VSCode ships in English, and installing a Language Pack extension for your language will show the menus and buttons in it.