Due Dates
-
Complete this Lab before your Wednesday Lab
-
if you have not taken a CS course at Swarthmore (or if it has been awhile since you have used linux), be sure to attend the Using Unix Session:
-
Tuesday, 7-9pm in SCI 256
-
-
if you are a first year student, sign-up for a 10 minute meeting with me sometime this week: sign-up sheet
1. Lab 0 Goals
-
Practice with and set-up of course tools and resources, including git and piazza
-
Learn the basics (or refresh your knowledge) of Unix and useful Unix commands/tools
-
Learn the basics of the vim editor that you will use in Lab 1
2. Students who have not taken CS at Swarthmore, do this first
-
Go to a CS lab and login with your new account. It will ask you to reset your password. Read and sign the user agreement form and return to me or to Jeff Knerr. To logout, click on the logout icon and choose "log out".
-
Read the CS lab rules and user rules off the CS help pages
-
Attend the Using Unix Sessions:
-
Tuesday, 7-9pm in SCI 256
-
-
After going through the Using Unix material: create a cs31 subdirectory in your home directory. Start an xterm and at the unix prompt ($) enter the following command sequence (#'s are explainations of each command):
$ cd # change current working directory to your home directory $ pwd # print current working directory $ mkdir cs31 # create a new subdirectory named cs31 $ ls # list contents of current working directory (your home directory) $ cd cs31 # change current working directory to cs31 $ pwd # print current working directory
Here is some information about the Unix directory structure.
3. Everybody do this
-
Read the class webpage.
-
Learn the basics of the vim (vi) editor.
If you have not already done so, first create a cs31 subdirectory in your home directory and cd into it:
$ cd $ mkdir cs31 $ ls $ cd cs31 $ pwd
From within your cs31 subdirectory run the vim tutorial:
$ cd ~/cs31 $ pwd $ vimtutor # start the vim tutorial
Go through the following sections of vimtutor (the other sections cover more obscure features that are not necessary):
-
all of Lesson 1 (moving around, x, i, A, :wq)
-
Lesson 2.6 (dd)
-
Lesson 2.7 (undo)
-
Lesson 3.1 (p) and 3.2 (r)
-
Lesson 4.1 (G) and 4.2 (searching)
-
Lesson 6.2 (a), 6.3 ( R ), and 6.4 (y and p)
It will take about 30 minutes to run through these lessons.
-
-
Try out our class piazza page
Let us know in lab on Wednesday if you encountered problems using the class piazza page.
-
Try out (and set up) your Swarthmore GitHub account.
Read the Git Overview and Setup and Configuration sections of the Git Help page, and then try cloning a copy of the Lab0 repo from the CS31 GitHub organization for our class.
NOTE: you will not be able to access our course github org or your Lab0 repo until Monday afternoon.
If this is your first time using the college’s GitHub server for CS, follow the ssh-keys and config steps link from the Setup and Configuration directions for information on how to generate ssh keys and upload your public ssh key (generated from your CS account) that is necessary to clone repos on our system.
If you successfully cloned the Lab00 repo, open the README.md file in vim and follow the directions for editing the file and then commiting and pushing your changes using git.
We will go over these steps in lab on Wednesday, but please try this on your own before lab. We will help you during lab if you get stuck completing these steps.
NOTE: you need a CS account to do this. If you don’t have one, I will hand out new accounts at the end of class on Tuesday, or see Jeff Knerr outside of class to get your account.
As you work in a CS lab, if you plan to leave the lab for just a few minutes
and then come right back to work, you do not need to log out, but it is a good
idea to lock your machine while you are gone. You can lock your screen by
clicking on the lock icon
or run xlock
at the bash shell prompt.
You should not xlock a machine if you plan to
be gone for more than about 20 minutes, and you should not xlock main lab
machines during times when classes are held in the lab, log out
instead .