CSCI 2330 Spring 2017 Instructor: Sean Barker |
This project should be completed individually.
This project is designed to introduce and familiarize you with many of the tools that we will be using throughout the semester. Most significantly, this project will teach you the basics of working in a Unix environment, using the command line, and writing and running programs on remote servers. Getting a handle on your working environment early on will save you lots of time in the long run and let you focus on the actual course material of the later projects.
Go through the Command-Line Unix Crash Course. If you have never worked in a command-line environment before, this tutorial may take you some time. If you have some Unix background, you may already have seen most of this material (but you should still at least skim the tutorial to make sure).
A few parts of the tutorial involve short snippets of C code. Don't worry if you've never written any C code before; focus on the conceptual ideas being illustrated (e.g., the process of compilation and the use of command line arguments) and don't get bogged down by the details of C at this point. Don't worry, we'll dive into the details of C later in the semester!
There is nothing to submit for this part.
The Unix tutorial above had you working on Bowdoin's campus-wide Linux machine dover.bowdoin.edu (or, if you're on a Mac or a Linux machine yourself, you may have done the tutorial on your own local machine). However, for the rest of the course, you must use the designated CSCI 2330 server for all projects. Even if the project files appear to compile and run on your local machine, there are subtle differences between Linux and OS X, and between different version of Linux, that may cause hard-to-debug problems. Avoid these problems by always working on the class server (which is also the server that will be used to evaluate your programs)!
In this part, you will configure your account on the class server and then complete a few simple tasks on the server to check your understanding. The main objective here is to make sure all systems issues are resolved now, and not right before the first 'real' project is due.
If you are unsure how to accomplish any of the tasks in this part, your first stop should be the Unix tutorial above. After that, you should consult Piazza, the instructor, TAs, etc.
The name of the class server is turing.bowdoin.edu. You have been provided an account on this server that will allow you to log in and work on your projects.
Access to the server requires the use of a keypair, which you should have received via email. Your keypair consists of a private key file (named something like username-keypair) and a corresponding public key file (named something like username-keypair.pub). Using a keypair to login instead of a password is (1) more secure, since an attacker could guess your password, but cannot guess your key, and (2) more convenient, since you will not have to type in a password to login. In fact, you do not even have a password associated with your server account - your keypair is the only way you can login.
Keep your keypair safe, as it provides access to your server account. Don't send anyone your keypair file or leave it anywhere publicly accessible - this is like writing your password on a post-it note!
To login to the server using your private key (assuming userid is your username) from either a Mac or a Linux machine, open a terminal window and use ssh to login as follows:
ssh -i userid-keypair userid@turing.bowdoin.edu
Remember to use your actual username instead of userid, and note that the above assumes that userid-keypair is in the same directory from which you are running the command.
If you get an error that references the permissions on your keypair file, you can fix that using the chmod command as shown below, then try running ssh again:
chmod 600 userid-keypair*
If you are logging in from Windows, you can use PuTTY as discussed in the tutorial, but will need to configure PuTTY to use your private key file. To do so, within PuTTY, go to Connection, then SSH, then Auth, then click Browse next to 'Private key file for authentication'. Change the 'Files of type' setting to 'All files', then select your private key file (e.g., username-keypair - NOT your public key file ending in .pub). Now you should be able to login in the usual way to the class server and your private key file will be used.
The server provides a full-fledged Linux environment with all the standard development tools (editors, compilers, version control, etc) preinstalled. If there is any software that you would like to use that is not already installed on the server, please email me.
We will use Subversion for storing and submitting all projects. Using Subversion has several advantages: (1) your work will be backed up in the Subversion repository, (2) it will be easy to work in groups later on, and (3) it provides an easy way for me to access your project files, both before and after you have officially 'submitted'.
Each of you has a dedicated directory on Bowdoin's Subversion server for your work in this class, which you and only you can access. Your personal directory is at the following directory (again using your actual username instead of userid):
https://repo.bowdoin.edu/svn/sbarker/cs2330-s17/userid
Login to the class server, then checkout your SVN directory. You can give svn checkout a second argument to specify the name to give the checked-out repository. For example, if your user ID is ghopper, you might run this:
svn checkout https://repo.bowdoin.edu/svn/sbarker/cs2330-s17/ghopper systems-repo
The above command would create a new directory named systems-repo (which is the checked-out repository) in the current directory. Initially, there are no files within your SVN directory, so your checked-out repository will have no files.
Your last task is to write a very (very!) simple C program, a Makefile for this program, and then check your files into your SVN directory. Within your SVN directory, do the following:
$ ./like pizza I like pizza! $ ./like Linux I like Linux! $ ./like What do I like? $ ./like Linux pizza What do I like? $If you've never written a C program before, just use the example in the Unix tutorial as a starting template and modify that -- you don't need any further knowledge of C to complete this part. Your name should be included in a comment at the top of your program.
$ make build $ ./like systems I like systems! $ make cleanup $ ./like systems -bash: ./like: No such file or directory $ make $ ./like make I like make!
While this project is only a warmup, your submission will be checked based on the following criteria: