Development Environment
Before taking this course, you will need to download various pieces of software. This page will guide you through that process in a beginner-friendly manner. If you have any issues configuring your system, please seek help as soon as possible. You have the internet, office hours, and Campuswire at your disposal.
Getting Started
0. (Optional) Install Windows Subsystem for Linux
- If you are on Windows, it is worthwhile to consider installing WSL
- Windows may be hard to configure in the future when you use more advance tools
- Read more here
- Read Installing Node.js and NPM for instructions
- Optionally read About Node.js and NPM for details
- Note: Please make sure you have at least
node
version greater than or equal to v16 and less than 20
2. Install Git
- Read Installing Git for instructions
- Optionally read About Version Control for details
3. Install VSCode
- Read Installing VSCode for instructions
- Watch this video (7m16s) to familiarize yourself with VSCode
- Alternatively, you use any text editor or IDE. LunarVim, GNU Emacs, and Webstorm are good options
- However, we cannot guarantee configuration support
4. Open the First Homework in VSCode
About Node.js and NPM
From the Wikipedia page on Runtime Systems:
In computer programming, a runtime system or runtime environment is a sub-system that exists both in the computer where a program is created, as well as in the computers where the program is intended to be run.
In the past, you might have had to install Java on your system. You were installing the runtime responsible for executing your Java source code. In this course, you will be programming in TypeScript, which is compiled (transformed or made) into JavaScript, then run using a JavaScript runtime system.
Node.js is a popular JavaScript runtime designed for making web applications. It comes bundled with a complete standard library and access to a public repository of millions of third-party packages. It builds upon the JavaScript runtime that is used in Google Chrome.
NPM (Node Package Manager) manages the logistics of distributing Node.js software. It keeps track of your projects dependencies so others can download and use them seamlessly. You can read more on their about page.
Installing Node.js and NPM
External Tutorials:
- How to Install NodeJS/NPM on Windows (1m53s)
- How To Install NPM and NodeJs On Mac OS (1m22s)
- Follow the documentation on the npm website for Linux
Text Tutorial (Windows and macOS):
- Go to the Node.js download page to download the installer for your system
- Make sure to choose the LTS option (v18 as of writing)
- Homeworks need at least v16, and less than v20
- Windows: Choose the Windows Installer (.msi)
- If you don't know if you are 64-bit or 32-bit, use this Microsoft Support Page
- macOS: Choose the macOS Installer (.pkg)
- Run the installer with the default options
- After the installer has finished, you can close it
To verify Node.js and npm
installed:
- Open a Terminal
- Windows: Press the Windows key and search for a program called "Command Prompt" or "Terminal"
- macOS: Use the spotlight search and search for "Terminal"
- Type in the command
node --version
and press enter- You should see something like
v18.10.0
printed - As long as your number is greater than or equal to above, you are OK
- You should see something like
- Type in the command
npm --version
and press enter- You should see something like
8.19.2
- As long as your number is greater than or equal to above, you are OK
- You should see something like
If you do not see both version numbers, you did not install them correctly. You may need to restart.
About Version Control
Sometime after the first midterm, there will be a lecture about version/source control. A version control system (VCS) is responsible for managing and tracking all changes to a collection of software files (called a repository). In team environments, it is extraordinarily useful. Each team member has their local copy of the repository and changes for specific files.
Git is the most popular version control system in use today. It might be helpful to familiarize yourself with Git before it is discussed in class. Here are some optional resources if you are interested:
It is perfectly OK if Git seems too daunting. In the meantime, it is a good idea to use something to back up your work until Git is covered:
Installing Git
External Tutorials:
- How to install Git on Windows 10 (4m57s)
- How to install Git on Mac (4m36s)
- Prerequisite: How to install Homebrew on MacOs (4m52s)
Text Tutorial (Windows):
- Navigate to the Git Downloads for Windows page
- Download the "Standalone Installer" for your system type
- If you don't know if you are 64-bit or 32-bit, use this Microsoft Support Page
- Run the installer with the default options
- After the installer is finished, you can close it
- Open Powershell (Press the Windows key -> Search for "Powershell")
- Run the command
git --version
You should see something like this:
git version 2.39.0
Text Tutorial (MacOS):
To install git
on macOS, you should first install Homebrew.
- Open a terminal (Spotlight Search -> Search for "Terminal")
- Paste the following command into the terminal and press enter:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- After the Homebrew is installed, close, then reopen the terminal
- Run the command
brew install git
- After
git
has been installed, close, then reopen the terminal - Run the command
git --version
git version 2.39.0
About Text Editors
You are allowed to use any editor that you prefer. This class recommends that you use VSCode.
If you are unfamiliar with VSCode, it is recommended that you watch this video (7m16s) or read this page, particularly the sections on keyboard shortcuts, save/auto-save, and finding and replacing. There are a lot of features aimed to facilitate your productiveness - use them to your advantage.
Installing VSCode
- Open the VSCode download page
- Download the installer for your system (click the large button under your system's icon)
- Windows: If you don't know if you are 64-bit or 32-bit, use this Microsoft Support Page
- Run the installer with the default options
- After the installer has finished, you can close it
VSCode Extensions
The majority of VSCode is written in TypeScript, so a lot of TS/JS features come standard with the default installation. The following extensions may be useful:
You can install these extensions through the VSCode Extensions tab.
VSCode Jest may also be helpful, but sometime acts strangely. Use with caution, default to npm run test
in the terminal if it giving you issues.
Configuration
You can configure VSCode to your liking (File -> Preferences -> Settings
). Settings specific to TypeScript can be found by typing typescript.
in the search bar.