Setting Up Your Windows Machine
Getting your tools right is an important step in becoming a developer. This guide will walk you through every step you need to take.
There are multiple options that can be used when setting up your computer. This guide is opinionated about those options. Our guidelines are:
- When possible, use what you already have instead of installing something new.
- Use the most common development tool unless it is deficient.
- Less setup is better.
Update your system
Before anything else, update your operating system. To do that, make sure your computer is connected to the Internet. In the search bar in the lower left corner of the screen, type “update.” Choose the “Check for updates” option and follow the instructions.
Check your internet connection
Type "Internet speed test" into the Google search bar and click the button in the search results that says "Run Speed Test." Your download speed should be consistent and at least 5mbps.
Chrome
Chrome is the browser we will use in class. To install it, visit the Chrome website and click “download.”
Git Bash
Git Bash is a tool that provides a bash terminal, an interface that will allow us to interact with our computer using text commands, and the git version control program that we will use to keep track of the code we create and edit. Install it using these directions.
Visual Studio Code
Visual Studio Code (VSCode) is the program we will primarily use to edit code. To install it, download from this website. When the dialog asks you what you want to do with the file, click “run.” When you reach “Select Additional Tasks”, check all the boxes available.
Git and GitHub
If you do not yet have a GitHub account, go to the website and register for one.
Set default shell
Back in VS Code, set Git Bash as the default terminal. You do this by selecting Terminal from the top menu and New Terminal in the dropdown. When the terminal opens in the bottom part of the window, click in the box to the right of the word TERMINAL and choose Select Default Shell.
When the box opens at the top of the screen, select Git Bash. Close the terminal and open it again. You should see some text and a $ in the terminal. You should be able to type the following command to see the version of Git that’s installed. (Note: you do not need to type ‘$’, that represents the symbol that is already there.
And
should output
Next, we’ll define your Git user (this should be the same name and email you use for GitHub):
This data will get added to your .gitconfig file.
To push code to your GitHub repositories, we’re going to use the recommended HTTPS method. So you don’t have to type your username and password everytime, enable Git password caching as described here (Links to an external site.):
The default text editor that git uses for complex messages is vim. The important thing to remember is that you exit vim by hitting escape and then :wq!
Node.js
When we work with JavaScript, we will often need to use tools written with Node.js. To install Node, download it from the website.
Once this is done, you should be able to run the following commands and get output like this:
The exact versions may be different; ensure Node is v12 and above and npm is v6 and above. If you get a message like “command not found,” you will need to add Node to your PATH. To do this:
- Type "Environment Variables” in the Windows search bar and click on Edit Environment Variables for your account.
- Click to highlight “Path” and then click Edit.
- When the new window opens, click New and add the following line in the box that opens up.
Python
Python has two different major versions, Python 2 and Python 3. We will use Python 3 throughout this course. Python 2 reached its official end-of-life at the beginning of 2020. Note: if you have previously installed any version of Python, please uninstall all of them and install Python once again following these instructions.
Install Python from python.org. Hover over the word ‘Downloads’ and a button will appear. Click it, then click Run. You may get a warning that tells you to install Python from the Microsoft Store instead. You do not want to do that. If necessary, change your settings to warn you rather than prevent installing apps from other than the Microsoft store. When the dialog box opens, click the box for Add Python to PATH then click Install Now. You may have to manage your app aliases by typing "Manage app execution aliases” in the Windows search bar and then clicking on it. Turn off all the aliases related to Python.
Next, run the following command in your console:
Once this is done, you should be able to run the following commands in your Git Bash terminal in VS Code and get output like this:
Python has its own way of installing Python-specific packages, called “pip”. Run the following to install a few more tools we’ll need: