This chapter will help you prepare your computer with the required software. Stop and make sure you have all these tools installed and working properly. Otherwise, you’re gonna have a bad time.
Whether you know it or not, there is a way to open a special window and directly issue commands to your operating system. Different systems give this tool slightly different names, but they all have some form of it.
On Windows this is called the “command prompt.” On MacOS it is called the “terminal.” Others may call it the “command line.” They’re the same thing, just in different slightly shapes.
If you’re a Windows user, we recommend you avoid the standard command line provided by the operating system. Instead, you’d be well served by the Windows Subsystem for Linux, which will create a development environment better suited for open-source software work.
We recommend you install the Ubuntu distribution from the Windows Store. This will give you access to a generic terminal without the quirks of Windows.
A program like Microsoft Word, which can do all sorts of text formatting like change the size and color of words, is not what you need. Do not try to use it.
You need a program that works with simple “plain text” files, and is therefore capable of editing documents containing Python code, HTML markup and other languages without dressing them up. Such programs are easy to find and some of the best ones are free.
You can verify you have Node.js installed, and if so what version, by running the following in your terminal:
The number you get back is the version you have installed. If you get an error, you don’t have Node.js and you seek out an installer. If you have a slightly older version, you are probably okay. But we make no guarantees. Consider upgrading.
Our computer programming tools require a code compiler that can install lower-level programs. Apple computers do not include one out of the box. If you’re using an Apple, you’ll need to install the XCode package, which includes a compiler. You can do this by opening your terminal and running the following command:
A popup message may ask for your approval. You should grant it. After the installation completes, close and reopen your terminal before continuing.
Installing Node will also install
You can verify you have
npm installed by running the following command on your terminal:
git program allows you to carefully track the changes you make to files over time. This is useful when you’re working on your own, but quickly becomes essential on large software projects where you work with other developers.
You can verify
git is installed from your command line like so:
GitHub is a website that hosts
git code repositories, both public and private. It comes with many helpful tools for reviewing code and managing projects. It also has some extra tricks that make it easy to publish web pages, which we will use later. GitHub offers helpful guides for installing Git for Windows, Macs and Linux.
The free plan is all that’s required to complete this lesson. If you make a new account, make sure to confirm your email address with GitHub. We’ll need that for something later.
There are numerous methods to connect with GitHub from your terminal, covered thoroughly in GitHub’s documentation. This tutorial will demonstrate how to use the
gh command-line utility. If you don’t have it installed, visit cli.github.com and follow the instructions there.
You can verify you’re ready by executing the following command, which should print out the version of
gh you have installed.
The output should look something like this:
gh version 2.5.1 (2022-02-15) https://github.com/cli/cli/releases/tag/v2.5.1
If you get an error instead, open a fresh terminal and try again. If it’s still not working, revisit cli.github.com to make sure you’ve followed all the necessary steps.
With all that installed, you’re ready to get to work.