Computer Science 126
Spring 1997

  • What's New · What's Changed
  • Schedule and Reading
  • General Information
  • Assignments
  • Lecture Slides
  • Help!

  • Submitting Assignments · Late Policy · Collaboration Policy

    Include your name and precept number in every file you submit!

    Assignments

    1. Hello World Due: Wed. 2/12, 11:59pm
    2. Table of Powers Due: Wed. 2/19, 11:59pm
    3. Encryption Due: Wed. 2/26, 11:59pm
    4. Rational Arithmetic Due: Wed. 3/5, 11:59pm
    5. TOY Programming Due: Wed. 3/12, 11:59pm
    6. Recursive Graphics Due: Wed. 3/26, 11:59pm
    7. Counting Words Due: Wed. 4/2, 11:59pm
    8. Closest Pairs Due: Wed. 4/9, 11:59pm
    9. Prefix Codes Due: Wed. 4/16, 11:59pm
    10. Cracking the Genetic Code Due: Wed. 4/23, 11:59pm
    11. Calculating Final Grades Due: Wed. 4/30, 11:59pm

    Paper copies of the assignments are available in the COS 126 boxes in the 2nd floor entry way of the CS Bldg. Corrections and changes to assignments will appear only on the Web pages listed above, so check them periodically.

    Submitting Programming Assignments

    Submit your solutions to the programming assignments electronically using the command

    /u/cs126/bin/submit number files

    number is the assignment number and files is the list of files for that assignment. For example,

    /u/cs126/bin/submit 1 readme hello.c

    submits the files readme and hello.c for assignment 1.

    The submit command copies your files to the directory /u/cs217/submit/login/number and lists all the files that you have submitted for assignment number. login is your user account name. If you execute submit after the assignment deadline, your files are placed in directory number-late. You can run submit more than once, and you can submit partial lists of files.

    What to Submit

    Submit the C source code file, e.g., hello.c, and written documentation in a file named "readme", as suggested above. Include your name and precept number in every file you submit.

    The purpose of the documentation 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. /u/cs126/examples/readme is an example. 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.

    In addition, your code should contain comments and be indented properly and 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. If you use code from elsewhere, identify it and acknowledge its source in your readme file or in comments.

    Late Assignments

    Programming assignments are due at 11:59pm on the date specified. Late programs are accepted for up to 12 hours after their deadlines. A program submitted N minutes late is assessed a penalty of Max×N/(12×60) points, rounded up to the next whole point, where Max is the number of points possible. For example, a program worth 20 points that's submitted 8:37 late would be penalized 20×(8×60+37)/(12×60) = 14.36 = 15 points; submitting it 1 minute late would cost 20×1/(12×60) = 0.0278 = 1 point.

    This penalty amounts to about 1% for every 7 minutes or portion thereof that a program is late. The date and time of the most recently submitted file is taken as the date and time of the entire program. This includes nonprogram files, like readme files. Negative scores are taken as 0s. Penalties are waived only for unforeseen circumstances, like illness, and then only with an appropriate written excuse.

    It is better to submit an incomplete program than to submit nothing.

    No additional time will be given for unannounced interruptions in computer service. Don't wait until the last minute to write your programs!

    Computer Accounts

    Every student enrolled in COS 126 has a computer account on the CIT UNIX machines, known collectively as arizona. This account enables you to use of the computers in Rooms 101 and 001 in the Computer Science Bldg., and those in other public computing clusters around campus. 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 can change your password by typing passwd and following instructions. Change it regularly.

    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 instructors or teaching assistants from any previous offering of this course or any other course.

    You may, however, use any code from the COS 126 lectures or from the course text, Deitel and Deitel, C How to Program, providing you explain what code you use and cite its source in your readme file or in comments. An example citation appears in /u/cs126/examples/pattern.c and in /u/cs126/examples/random.c. The source code that appears in the lecture notes is available on the Web and in the directory /u/cs126/examples.

    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. Read pages 615-623 in Hahn's Student Guide to UNIX to learn about file permissions. If you execute the command "chmod 700 ." once the next time you log in, your files will be protected. Also, if you add the line "umask 077" to your .cshrc file, only you will be able to access files you create.


    Copyright © 1996 David R. Hanson / drh@cs.princeton.edu
    $Revision: 1.16 $ $Date: 1996/12/02 15:04:02 $