1. Due Date

"Complete" before Wednesday lab meeting the first week of class

2. Lab Overview/Goals

This is not a regular assignment, but is designed to give you some practice with resources that you will need to use for CS44 lab work and for the remote teaching of it this semester. We recommend you look over the tools and resources on this page and spend time before the semester starts to learn the ones you are not familiar with. In particular, we recommend learning a non-gui editor like vim, and trying out tmux before the start of the semester.

You learned many of these tools in CS31 and CS35. However, if it has been awhile since you have programmed in C or C++, we recommend you review some of the C++ programming basics before the first lab meeting. The first real lab assignment will provide some additional practice with C++ programming.

Goals

  • Practice tools for remotely connecting to CS machines, and some Unix reminders for course lab work.

  • Learn (or remember) the vim editor on our system, which will be useful for remote lab work.

  • Reminders about C++ programming and using make, gdb, and valgrind.

  • Information on other tools we will use for lab work and for remote instruction this semester. Make sure you know how to use Zoom, Piazza, and Slack before the semester starts.

3. Tools for Remotely Working on Lab Assignments

All lab assignments should be developed, compiled, and run on the CS machines. This is particularly important in this course as many labs will require utilizing components that have been compiled and tested specifically for our machine architectures.

3.1. ssh (and a little Unix) Practice

ssh is used to remotely connect to a CS lab machine. scp can be used to copy files between two machines (including your home and a CS lab machine).

  1. First, ssh into a CS lab machine. See the ssh page for details on remotely accessing CS lab machines and using ssh. If you are on a Windows or Mac machine you may need to install some software before you can run ssh (cs dept. remote access page)

    Here is an example of how to ssh into the lab machine named owl on our system (replace newhall with your userID):

    # from my home machine
    home$ ssh newhall@owl.cs.swarthmore.edu
  2. Next, on the CS system, set up your directory structure for work in CS44 (see the Unix Basics if you are a bit rusty on some of the unix commands for moving around the file system, with some verbose comments):

$ cd                # cd into your home directory
$ pwd               # print current directory (should be /home/you)
$ mkdir cs44        # create a subdirectory for this class
$ cd cs44
$ pwd               # should print out /home/you/cs44
$ mkdir labs        # create a labs subdirectory for lab assignments
$ mkdir weeklylabs  # create a subdirectory for in-lab practice code
$ mkdir homeworks   # create a subdirectory for homework assignments
$ ls                # should list the three subdirectories you created
$ cd labs
$ pwd               # should print out /home/you/cs44/labs
$ mkdir Lab0        # create a subdirectory for this work
$ cd Lab0
$ pwd               # should print out /home/you/cs44/labs/Lab0

3.2. vim Editor

We recommend using the vim editor for editing source code and other files on our system when you are remotely logged in from home. vim (or vi) is a powerful, light-weight editor that is available on every Unix system, which makes it a useful editor to know. There are gui versions of vim available, but vim itself is not gui-based, which makes it particularly useful for editing on a machine to which you are remotely connected.

If it has been awhile since you have used vim, or if you never learned vim, we recommend that you run vimtutor on our system (and try running it from within your cs44/labs/Lab0 subdirectory). Follow these instructions on how to run vimtutor (note the specific Lesson numbers we recommend you go through), as well as other vim tips.

3.3. tmux

After you learn vim, you may also want to play around with using tmux on our system. It has features that you may find helpful for setting up a remote session for course lab work on our system. Here is some information and links about using tmux on our system. Please note the warning about not leaving old tmux sessions running on lab machines; we recommend that you pick your favorite lab machine to use, and ssh into that one to run your tmux sessions.

3.3.1. Finding Good Machines

There are links off the remote tools page to information about lab machine names. If a machine seems slow, kill your tmux session, and try another machine that is not overloaded.

See tools for finding idle/good machines to use including who, top, and smarterSSH.

3.4. git

Like other CS courses you have taken, we will use git for course lab repos, and sharing code with your partner.

We created a Lab0 git repo for you to test out git and to make sure you have ssh keys installed correctly to clone, push, and pull to a repo.

  • Click on the link to our class' CS44 git Org, and you will see a repo named Lab0-yourusername.

  • Look at the README.md file on github page, and follow diretions to clone it on our system (ssh into CS lab machine and clone there).

There is more information about using git off the remote tools page. Look at the using git for CS labs link.

4. Tools for Class, Labs, and Office Hours

4.1. Zoom and Slack

We will use Zoom for class lectures, Zoom and Slack for lab meetings, and Slack for office hours. Here is some information about using both of these tools Zoom and Slack. The Zoom link for class will be posted to the CS44 Piazza page; all students should already have been invited to the Slack workspace for the course.

4.2. Piazza

Like other CS courses you have taken, we will use Piazza as a Q&A forum for labs, homeworks, and lecture content. We will post information about other class resources here, such as the Slack workspace and Zoom link for our class. We will also post links to class lecture slides and videos. There is information about using Piazza off the remote tools page.

Here is a link to the CS44 Piazza page.

5. C++ programming

Take a look at Wed in-lab example for week 1 for some reminders about C++ programming, compiling programs, and debugging tools (gdb, valgrind).

We will go over these in lab the first week of class, but very briefly. If it has been awhile since you have programmed in C or C++ we strongly recommend that you try compiling and running these examples, and try out the gdb and valgrind examples before the first lab meeting of class.

There are also links to C++ programming references off the week 1 weekly lab page.

6. Handy Resources