Getting Started
6.031 requires you to get up to speed quickly. You need to:
- set up your software development environment,
- learn the basics of programming in TypeScript, and
- learn basic version control with Git.
To learn TypeScript, you will start with Reading 2 and complete the reading exercises on that page. Over the next few weeks, you will do TypeScript Tutor exercises to practice writing code.
If you have any questions, or any trouble following the instructions below, please visit lab hours to ask questions and get help from TAs and LAs.
Lab hours and deadlines in the 1st week
First class at 11am Lab hours |
Lab hours 10pm: Reading 1 and Reading 2 reading exercises and TypeScript Tutor exercises due | 11am before class: Problem Set 0 Part I due, including all steps and GitStream exercises on this page. You must have Node, TypeScript, Visual Studio Code, and Git set up and working on your laptop. |
Lab hours |
Lab hours |
See the course calendar for the full schedule of office and lab hours. Lab hours may change depending on deadlines, so always check the calendar to see when lab hours are scheduled. |
Step 0: TypeScript Setup
0.1 Install Node
Go to the Node.js Downloads page, and then:
for Linux: click on “Installing Node.js via package manager” at the bottom of the page, and find the appropriate package for your Linux flavor
- for Arch Linux: the
nodejs
package recommended by the Downloads page is likely to be the “Current” version of Node, which is not what you want. Trynodejs-lts-fermium
instead so that you get the LTS version.
- for Arch Linux: the
Make sure you install the LTS version of Node, version 14.x.x. (Do not install the “Current” version 16; that is the bleeding-edge development version.) If you already had an older version of Node installed, the installer will replace it with Node 14.
If the installer asks questions during installation, you can accept the default choices and just click Next.
After installing Node, confirm the installation and version by opening a terminal or command prompt and running:
node --version
It should report that you have version 14 (14.x.y for some x, y).
If you are using Windows, run the following command so that your npm
command will be able to build problem sets:
npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
0.2 Install TypeScript
After installing Node, open your terminal or command prompt, and run:
Confirm that your installation was successful by running the TypeScript compiler:
tsc --version
0.3: Install Visual Studio Code
Go to the Visual Studio Code download page, and download and install the appropriate installer for your platform. If you already have Visual Studio Code installed, you don’t need to reinstall it, just make sure it’s up to date by following the instructions below.
If the installer asks questions during installation, you can accept the default choices and just click Next.
Make sure that you have the latest version installed. Run Visual Studio Code, and either:
It should either say “No updates available”, or help you update to the latest version.
Finally, confirm the version you are running:
The first line of the dialog box should be version 1.52.x (or higher).
0.4: Install TypeScript Tutor
Download the TypeScript Tutor plugin, which will save to your laptop as a file called
praxis.vsix
.In the upper right corner of the Extensions pane that appears, click on
...
, then Install from VSIX…, then find and install thepraxis.vsix
file you just downloaded.At the bottom of the settings list on the left, open Extensions, and scroll down to click on TypeScript Tutor.
-
Click here to get your personal start URL.
(TypeScript Tutor is hosted on the Java Tutor server, so the URL will still include “Java” in several places. That’s okay.) In the box labeled
Location: Personal Link
, copy and paste your personal start URL.
You should see the TypeScript Tutor immediately reload and show a page with “Basic TypeScript” at the top, which means it’s ready for use.
Steps 1-7: Java Setup
You will also need to do the Getting Started instructions for the 6.031 Java class.