COS-461 Assignments


Programming Assignments

All assignments are due at 11:59pm of their assigned days.

Collaboration Policy

Programming, like composition, is an individual creative process. Individuals must reach their own understanding of the problem and discover a path to its solution. During this time, discussions with friends are encouraged. However, when the time comes to write the code that solves the problem, such discussions are no longer appropriate; the program must be your own work.

Do not, under any circumstances, copy another person's program. This includes relevant Linux source. Writing code for use by another or using another's code in any form is academic fraud and will be dealt with harshly. You are also responsible for ensuring that the code you write for the assignments is not readable by others.

Computing Facilities

The assignments must compile in the Linux environment on the machines in Friend 010 (fishbowl lab). We'll be compiling your source code in that environment when testing, so if your source doesn't compile in it, you'll get major point deductions. You have access to this environment in one of two ways: by physically going to the fishbowl lab, or by using an image of the environment that you can run as a virtual machine on your own machine.

Virtual Machine

  1. Download VirtualBox.
  2. Download the appliance file.
  3. From within VirtualBox do File -> Import Appliance... and select the file you just downloaded.
  4. After importing, you can change its given settings (like how much memory to apportion the virtual machine)
  5. Username: student Password: cos461
    Username: root Password: cos461

Physical Access

Users who physically go to FC 010 will be able to sit down in front of a machine and login as long as they are authorized (CS Staff has added them to the list), authenticate properly (NetID and OIT LDAP password), and are configured with an actual shell. No CS account is required. Most of you should already be added to the list; if you aren't, request an account using this form.

Make certain that your home directory on the lab machines is not world-readable/executable, i.e., other students could see your files. To do this, execute:

          chmod 700 ~

from the command line.

Remote Access

Remote access to the lab machines can be done by using ssh and connecting to the host labpc-proxy.cs.princeton.edu. The lab machines are on the CS network and are behind the departmental firewall/NAT. Users must first SSH login to labpc-proxy.cs.princeton.edu. When they have a shell on a labpc-proxy machine, they can then ssh to one of the FC 010 machines (i.e., labpc-01 - labpc11 and labpc-13 - labpc21) using their OIT credentials. If you are having trouble accessing your account in the Friend 010 lab, see these instructions: https://csguide.cs.princeton.edu/resources/friend

Programming Tools

Note: After discussions with instructors last year, we found that splint doesn't work well with networking code. (This had been added last year.) So, we won't be using it in future assignments, but you do need to run valgrind, and hence not leak memory.

Please use valgrind (in /usr/bin/valgrind on the Friend machines) to check for memory leaks and other memory bugs. To use valgrind, just prefix your command line with valgrind --leak-check=yes" (or whatever other valgrind options you wish to use). You should compile your prgrams with the -g option to include debugging information so that error messages include exact line numbers. See the Valgrind Quick Start Guide for details.

We will run valgrind as part of grading your assignments.

You may use whatever editor you want to write your programs, but take care to make sure your programs have proper indentation. Using emacs is a simple way to ensure proper spacing. You can place the .emacs configuration file in your home directory to use the emacs configuration from the COS 217 course. You may choose to run emacs in "no window" mode (i.e., "emacs -nw", good when using a low-bandwidth connection when away from campus) or using X windows (taking care to use ssh -Y when you connect to the Friend lab PCs from a Mac, or setting the "Connection | SSH | X11 | X11 Forwarding | Enable X11 forwarding" box if using Putty on a Windows machine).

Assignment Submission

We will use CS Dropbox to submit assignments. You can create the correct gzipped tar file by running "tar zcvf [filename.tgz] *" within the directory containing your files.

Late Submission

You should submit your work on an assignment (electronically) before its due time. All assignments will be due at 11:59pm on their selected days. We will be giving special prizes for the first student to submit work for full credit per assignment. If you submit your work late, we will give you credit for it on this scale:

We will grant extensions only in the case of illness (with a doctor's note) or extraordinary circumstances. If illness or an extraordinary circumstance will cause you to submit an assignment late, then you should discuss the matter with your instructor as soon as possible. Please plan your work on the assignments so that travel, religious holidays, etc. do not cause you to submit it late. Note that heavy workload is not an extraordinary circumstance.

That said, you are allowed one "free" late day during the semester (that can be applied to one of assignments 0 through 3). We strongly recommend you don't waste the free late day for assignment 0.

Note that reasonable work must be done for all submitted assignments in order to achieve a passing grade, so even if it is more than 7 days late, you should still submit the assignment by Dean's Date.

The final assignment is due on the Dean's Date, and we are not permitted to accept work after that date. Thus you may not turn in the final assignment late.

Coding Style

All of the code you turn in for this course should have good style. Make sure that your code has proper indentation, descriptive comments, and a comment header at the beginning of each file, which includes your name, userid, and a description of the file. In addition, your code should never leak memory and should always check the return value of function calls. See information above about programming tools splint and valgrind.


Last updated: Tue Apr 30 00:37:19 -0400 2013