Using repl.it

repl.it is an online service that lets you easily write and run code in Java (and a number of other programming languages) without needing to install anything on your computer. It also has a feature called "multiplayer," where multiple people can work on the same code at once (à la Google Docs). We will use this feature for pair programming in labs.

Sign up for an account

You will need to sign up for a (free) account with repl.it. Go to the repl.it signup page and use an e-mail address of your choice to create an account. You will need to open your e-mail and click a link to complete the registration process.

Forking a repl

The "documents" (programs) you work on in repl.it are called "repls." Most of the time, for a lab we will give you a repl containing some code to start with. You will then "fork" it (make a copy in your own account) to work on. (These are terms from software development: "repl" is short for "real-eval-print loop," something that lets you type code and see immediately what happens, like the Interactions pane in jGRASP. "Forking" means to copy an existing software project so that you can create your own spin on it, which is something that is very commonly done in open source projects.)

To fork a repl, you will click the "Fork" button at the top next to the Run button:

It will then immediately make a copy of the repl under your account that you can modify.

Working together on a repl using multiplayer

After forking a repl, you can enable multiplayer so that you and your lab partner can work on it at the same time. Click the "Share" button near the top-right of the repl:

In the box that appears, click "Copy" to copy the multiplayer link.

You can share that link with your partner (for example, by pasting it into the chat window in Zoom).

When programming in multiplayer, you should be able to see whatever changes to the code your partner is making in real time. Also, whenever one of you runs the code (using the rather hard to miss Run ▶ button at the top) you can both see what happens.

Working separately after class

If you decide to finish the lab separately after class, you should BOTH fork a new copy of the lab. To fork a repl that you already own, you need to click on the title of the lab, and then click fork.

You will now have three copies of the file: the original version that you worked on together, and two versions that you will finish separately.

In Canvas, you should include the link to the repl that you completed separately. You do not need to share the original version that you worked on together but did not finish.