Computer Science 126
General Computer Science
Fall 2014

Course Information | People | Assignments | Lectures | Precepts | Exams | Booksite


Below is the tentative schedule of programming assignments. For each assignment, the assignment entry links to the programming assignment specification; the checklist entry points to clarifications, test data, and hints that might be helpful in completing the assignment; the submit entry links to the electronic submission system; and the collaboration entry links to which policy applies.

0 9/15 Hello World checklist submitindividual
1 9/22 Conditionals, Loops checklist submitindividual
2 9/29 N-Body Simulation checklist submitindividual
3 10/6 Recursive Graphics checklist submitindividual
4 10/13 DNA Sequence Alignment checklist submitpair programming
10/23 Programming Exam 1 submitindividual
5 11/03 Linear Feedback Shift Register checklist submitindividual
6 11/10 Guitar Hero checklist submitpair programming
7 11/17 Markov Model checklist submitpair programming
8 11/24 Traveling Salesperson Problem checklist submitpair programming
12/8 Programming Exam 2 submitindividual
9 1/12 Atomic Nature of Matter checklist submitpair programming
Assignments below are still tentative for Fall 2014

Submitting Your Work

You must submit your solutions electronically via the Dropbox submission system. You will need to type your Princeton netID and password for authentication. Be sure to type your name, login and precept number at the top of every file you submit. Also be sure to click the Check All Submitted Files button to make sure that you have submitted all of the required files and that they compile cleanly. If you do not follow these directions, you will lose a substantial number of points. You may unsubmit, resubmit, and recheck your solutions as often as you like (but see the special directions below for late submissions).


Each assignment is due at midnight on a Monday. An assignment submitted at 12:01 AM on Tuesday or later will be considered late, with a penalty of 4 points per day (or partial day) late.

Computing Facilities and Lab TAs

Most evenings, there is a room on campus staffed with undergraduate lab TAs, who can answer general computer-related questions and assist in debugging. Lab TAs will be in Lewis 134 for those with laptops most evenings. The New Media Center right next door will have a few computers that have DrJava installed. Click here for more information, their location and their schedule. If you have specialized questions regarding the course materials or programming assignments, see your preceptor or instructor.

Collaboration Policy

In this course you may only receive help from people in the ways described below. You must acknowledge all help in the readme.txt file for that week's assignment.

You are not allowed to post questions about the course or about assignments on any website other than the course Piazza page.

If you have any question whatsoever about what is allowed, ask us!

Your Work

When we talk about work, this includes code, comments, readme files, or anything else you create for this course.

You must individually compose all of your own work during the term.

Your work must never be shown or communicated to anyone who is taking COS 126 now or who might take COS 126 in the future.

You must never place your work in any public location (including websites, leaving printouts in a classroom, etc). Password-protect your laptop if left unattended.

You must never give a copy of your work to anyone, except for course staff.

The rules above apply both to finished and unfinished work. They continue to apply even after this semester is over.

In some assignments, you are given some code to begin with. Like other course materials, you are allowed to read and discuss the original code with other students, to figure out what it does and how it works. But once you make a change to the code, it becomes your work and the rules above apply to it.

Citing and Allowable References

Copying or adapting work that is not yours is only permitted if it comes from the course materials. If you do so, you must cite what you used.

Reading someone else's solutions (or partial solutions) for assignments (or anything similar to any COS 126 assignment) is not allowed.

Getting Help

Ask for help — that is why the course staff members are here! Utilize office hours, the lab TA hours, and Piazza. E-mail your preceptor or make an appointment with them. Avoid procrastinating, since getting help requires extra time.

If you don't know where to start on an assignment, try beginning with the "Possible Progress Steps" on the checklist, and review the related exercises on the Precepts page.

Peer/Piazza Discussion

You must individually compose your solutions for the course, but some common concerns may be discussed with other current students, or publicly on Piazza. Because of the rules above, these discussions must be kept at a general level, without sharing code or other work about assignments. For example, you may ask about:

Don't let someone be too helpful: it is not allowed for someone to lead you step-by-step through any part of an assignment.

Help From COS 126 Graduates

Anyone who successfully completed COS 126 in a previous term is allowed to assist you in the following ways, similar to what a lab TA would do:

Anybody else (e.g. friends, family, tutors) may help you under these same conditions (provided they are not taking COS 126 now and never will in the future).

Piazza Etiquette

Piazza works best for individual questions with well-defined answers.

Use public posts when your question can be asked in a general way, without sharing code or other work about assignments. Other students may answer it, or they may benefit from seeing the discussion.

If you have a question that involves your code or other specific details, then use office hours, the lab, or this two-step approach:

  1. post a public Piazza question that describes your problem in general terms;
  2. if the answer does not help, post your specific question privately. If your code is involved, upload it to the Dropbox, and mention this.

Never post assignment code to Piazza, even privately; the Dropbox is easier for course staff to use.

Pair Programming

On certain assignments the collaboration policy is relaxed to allow working with a partner.

If two students begin working on an assignment as partners and cannot complete it together, at least one student must contact the lead preceptor to request a partnership dissolution.

Extra Credit

Some assignments have optional Extra Credit parts. These are for people who found the assignment straightforward and want an extra challenge.

Don't rely on them to "bring up" your grade, as we only give them a small discretionary value at end of term for people close to a grade boundary.

Extra credit has stricter collaboration rules.

Taking COS 126 Again

If you took COS 126 (or part of it) before,

It has been our experience that students who re-do all of the assignments from scratch are much more likely to succeed in the course, so this is what we strongly recommend.


If anything about these policies is unclear during the course, please consult us and ask for clarification. Princeton's Rights, Rules, Responsibilities handbook 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.

We use software to compare student submissions. Pairs that are identified as similar are inspected manually by course staff.

Violators of the course policy will be referred to the Committee on Discipline for review. If found responsible, you will receive an F as a course grade plus whatever disciplinary action the Committee imposes. The typical penalty they impose for plagiarism is suspension from the University for one year.