COS 126 Programming Assignments, Spring 2003

 #  Assignment Due Checklist
0 Hello World   ( Windows,   OS X,   Arizona ) 2/6 checklist
1 Linear Congruential Random Number Generator 2/12 checklist
2 Mandelbrot Set 2/19 checklist
3 Rational Arithmetic 2/26 checklist
  Midterm 1 3/5  
4 Recursive Graphics 3/12 checklist
5 Hamming Codes in TOY 3/26 checklist
6 Traveling Salesperson Problem 4/2 checklist
7 Data Compression 4/9 checklist
  Midterm 2 4/15  
8 Sequence Alignment 4/23 checklist
9 RSA Crypto Warmup 4/30 checklist
10 RSA Crypto 5/7 checklist

All assignments are due Wednesday night at 11:59 PM by electronic submission. Before you turn in the assignment, be sure to read the Assignment checklist and carefully follow all instructions.

Any changes or corrections to the assignments will be noted in the course announcements. You are responsible for the information in the (most up to date) electronic version of each assignment. Feel free to look ahead at any future assignments that appear online, but be warned that some changes are possible.

Computer Accounts

Every student enrolled in COS 126 has a computer account on the OIT UNIX machines, known collectively as arizona. This account enables you to use the computers in the Friend Center laboratories and other public computing clusters around campus. It is also needed to electronically submit your files. Your login identification is in the campus telephone directory; your password is your PAC (Phone Access Code) or the last eight digits of your social security number. You are strongly encouraged to change your password.

Computing Laboratories

There are a number of computing facilities located in the Friend Center. There is a Sun workstation lab known as arizona for Unix users in 016, a PC lab for Windows users in 017, and Internet connections if you wish to plug in your laptop. The labs are open 24 hours a day, and are staffed by lab assistants most evenings and weekend afternoons. Here is the lab assistant schedule. The lab assistants should only be asked general computer-related questions (e.g., using and installing software like lcc, Unix basics, PostScript syntax, and C syntax). They will also assist you in debugging your code, assuming you have first made a reasonable effort to identify the bug and isolate the problem. If you have questions regarding the course material or programming assignments, see your preceptor or instructor.

Submitting Programming Assignments

Submit your solutions to the programming assignments electronically via the course web page. You will receive an email confirmation for each successful submission. You can resubmit or unsubmit files as needed.

What to Submit

Submit the C source code file, e.g., hello.c, and written documentation in a file named readme.txt. Be sure to include your name and precept number in every file you submit.

The purpose of the readme.txtdocumentation is to help the graders determine how well your code solves the assigned problem. Your grade depends on both the code and its documentation. Computer programs can be incomprehensible, even to the person who wrote it (wait until this happens to you). Your documentation should be a brief narrative (no more than 2 pages) that explains what the various parts of the program do, and how. readme.txt is an example. We will provide skeleton readme.txt files for each of the assignments. Preparing this documentation needn't take a lot of time, but it should be done with care. Writing good documentation is an acquired skill, whose usefulness you will appreciate more and more as you write and maintain large programs. Your readme.txt file should also describe whatever help (if any) that you received in completing the assignment.

In addition, your code should contain comments and be indented consistently for easy reading, but don't get carried away commenting your code. Don't comment the trivial or obvious; for example,

i = i + 1; /* increment variable i by 1 */

isn't much help. However, at a bare minimum you should provide a comment for each function and a brief description of the purpose of your variables. If you use code from elsewhere, identify it and acknowledge its source in your readme.txt file or in comments. The file pattern.c gives example source code.

Late Assignments

Programming assignments are due at 11:59pm on the date specified. Are we completely serious about the exact second on this deadline? Well, no. You do have some leeway: a few minutes late we won't even notice, but a whole day late we will definitely notice. Point deductions for lateness will be exacted by your preceptor, and can be waived for unforeseen circumstances, like illness, with an appropriate written excuse. Preceptors may also use their discretion to grant extensions.

You can get partial credit for a partially working or partially complete assignment; just explain the situation in your readme.txt file.

The very best advice we can give you about completing your programming assignments on time is exactly what you'd expect: do not wait until the last minute! Plan several sessions of work for each assignment (OK, maybe not for Assignment 0), and start early.


Collaboration Policy

Programming is an individual creative process much like composition. You must reach your 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 code that solves the problem, such discussions are no longer appropriate - the program must be your own work. If you have a question about how to use some feature of C, UNIX, etc., you can certainly ask your friends or the teaching assistants, but do not, under any circumstances, copy another person's program. Writing code for use by another or using someone else's code in any form is a violation of academic regulations. "Using someone else's code" includes using solutions or partial solutions to assignments provided by commercial web sites, instructors, preceptors, teaching assistants, friends, or students from any previous offering of this course or any other course.

You may, however, use any code from the COS 126 lectures, precepts, or course texts, providing that you explain what code you use, and cite its source in your readme.txt file or in comments. An example citation appears in pattern.c. For each assignment, you must also specifically describe whatever help (if any) that you received from others in your readme.txt file, and write the names of any individuals with whom you collaborated. This includes help from friends, classmates, lab TA's, and COS 126 staff members.

If you have a question about what is fair and what is not, please consult a staff member. Violators will be referred to the disciplinary committee for review. Page 71 of Rights, Rules, Responsibilities asserts:

The only adequate defense for a student accused of an academic violation is that the work in question does not, in fact, constitute a violation. Neither the defense that the student was ignorant of the regulations concerning academic violations nor the defense that the student was under pressure at the time the violation was committed is considered an adequate defense.
Also, be warned that it is very easy to identify plagiarism of source code. We use Alex Aiken's renowned MOSS (Measure of Software Similarity) software for this purpose.

Do Yalies need to plagiarise our Collaboration Policy? You be the judge. :)

Protect Your Files

You are responsible for keeping your solutions to the COS 126 programming assignments away from prying eyes. If someone else copies your program, we have no way to determine who's the owner and who's the copier; the Discipline Committee gets to decide. If you are working on a public cluster machine, be sure to delete your source files before leaving.



Copyright © 2001, Robert Sedgewick