CS 40 Policies

  1. Grading
  2. Getting Help
    1. Piazza Forum
    2. Teaching Assistants
    3. Stackoverflow
    4. The StAAR Center
  3. Lab Scheduling and Procedures
  4. Homework
    1. Information Required with Every Submission
    2. Structure and Organization
    3. Homework Grades
    4. Extra Credit
    5. Late Submissions
    6. Regrade Requests
    7. Test Cases
  5. Collaboration and Academic Integrity
    1. Pair Programming
    2. Other Collaboration
  6. Software/Platforms
  7. Accomodations for Students with Disabilities
  8. Policies for Students Retaking CS 40

Grading

This course is heavily project based. Your grade is based on our judgement of the quality of your work and the degree of mastery you demonstrate. Written work is especially important. Your final grade will be based on a weighted sum of your homework, lab, and exam scores:

Grade Calculation:
70% Homework and Labs
10% Midterm
20% Final Exam

Although your ultimate course grade will be a conventional letter grade, your homework and other class work will be graded on a scale of No Credit, Poor, Fair, Good, Very Good, and Excellent. These grades correspond respectively to numeric values of 0, 65, 75, 85, 95, and 100. So if an assignment has 3 components that are equally weighted, and you received a Good on two parts and a Very Good on the third, your grade for that assignment would be approximately .33 * 85 + .33 * 85 + .33 * 95 = 87.

The CS 40 grading system is discussed in detail below in the section on homework.

There are no make up midterms. If you are unable to take the midterm exam for any reason, e. g., illness or family emergency, your grading formula will be automatically adjusted so the midterm exam is weighted 0% and the weight of the final exam will be increased to compensate. You do not have to write or arrange anything: just address whatever the issue is; the end-of-term grading process uses the alternate formula for any missing midterm grades.

The final exam is required. If you are unable to take the final exam, then you must contact your advising dean. If you have a good reason for missing the exam, then you, your dean, and I will coordinate. In the worst case, you will be awarded an incomplete and take the exam when you are healthy or the emergency has been sufficiently resolved.

Getting Help

There are many resources available to you to help you with your work in CS 40:

Piazza Forum

We have a Piazza Forum for class discussion. The instructor will register you with Piazza with your Tufts email shortly before classes start. For most questions about assignments and the technologies we study, please use the Piazza forum. That way, you will benefit from the expertise of other students as well as that of TAs and teachers. Additionally, other students will see your questions and the provided answers.

We will rely on Piazza for all of our major course announcements. We will use the tag PROF40 in the subject line of these announcements so that they can be easily spotted and searched for. We assume you are monitoring Piazza — be sure to send posts to your email or check in every day.

Anonymous postings are allowed but discouraged. It's helpful if students and teachers get to know who has which questions and who is helping to move the course discussion forward. Instructor-only postings should be used only when your question necessarily requires posting pieces of your code. Because the course collaboration policy requires that you never publicly post any of the code or other writing that you create as solutions to our assignments, instructor-only postings allow you to post code in a manner that does not violate this policy.

Teaching Assistants

We have a large staff of undergraduate teaching assistants, all of whom have taken and done well in COMP40. In general, teaching assistants can be found in the JCC at the back of the second floor and in the labs in rooms 235 and 240. The schedule of which TA's will be working when will be regularly posted and updated on Piazza. We will be using a Terminal-based system called Halligan Helper to manage the queues of students requesting TA help in office hours and labs.

Stackoverflow

Stackoverflow is a website that is dedicated to answering any and all questions about programming. "Questions about programming," however, is not the same as "questions about homework." Stackoverflow is a great resource, but please follow these guidelines:
  • Stackoverflow has actually already answered the question of how to ask homework questions. Read it.
  • Log in using your real name. If you already have another login, put your real name in your profile.
  • Put your Tufts affiliation in your profile.
  • Always search before posting a question to ensure that your question has not already been answered.
  • Questions about languages, tools, and error messages are OK. Examples:
    • Gcc gives you an error message you don't understand. You Google the message and find nothing, or you don't understand the explanation, or you don't understand how to make your code right. Ask on Stackoverflow.
    • Your use of the C stdio library isn't working out the way you expected.
    • You can't get GDB to work right.
    • You've written some C code that you think should be right, and you can't understand why the compiler rejects it (or why it dumps core).
  • Questions related to homework and problem-solving are not OK. Examples:
    • How do I remove black pixels from the edge of an image?
    • How do I solve Phase 3 of The Bomb?

Academic Support at the StAAR Center

The StAAR Center (formerly the Academic Resource Center and Student Accessibility Services) offers a variety of resources to all students (both undergraduate and graduate) in the Schools of Arts and Science, Engineering, the SMFA and Fletcher; services are free to all enrolled students. Students may make an appointment to work on any writing-related project or assignment, attend subject tutoring in a variety of disciplines, or meet with an academic coach to hone fundamental academic skills like time management or overcoming procrastination. Students can make an appointment for any of these services by visiting go.tufts.edu/TutorFinder, or by visiting the StAAR Center website: go.tufts.edu/StAARCenter.

Lab scheduling and procedures

This class has a mandatory 75-minute laboratory session. Most of the lab sessions are designed to help you develop key skills or code that you will need to complete your programming projects. Our objective is to get you launched on a problem by providing 75 minutes of guidance and real-time feedback.

Students who registered using SIS chose a lab time when registering. The few students who were admitted later will be given instructions for choosing a lab. During the term, if you would like to switch to another lab, you may do so as long as there is space available. However, we discourage repeated switching. We will use rooms 235 and 240 as our main rooms: use them if there is space available. SIS may have asked you to choose a room but we don't care which room you are in. You and your partner can choose any available workstation in 235 or 240.

Homework

This is a project-based course. A large portion of the work involves programming assignments that are designed to help you get comfortable with and learn to use the material we introduce in lecture. Self-sufficiency is also a major emphasis of these assignments. You will learn many of the necessary details on your own as you complete the homeworks and labs.

We require that everyone do pair programming during the term. Exceptions are made only in unusual circumstances (e.g., your partner drops the course and it's too late to assign another). More information about pair programming in CS 40 is available in the section on pair programming. Read it! You are responsible for knowing the rules.

These assignments are difficult and you will almost surely need help. Remember that a short conversation during office hours or with a TA in the lab can save hours of aimless frustration. Your fellow students (except your partner, of course) are not allowed to look at or help you with the details of your code. However, we strongly encourage students to teach each other concepts, programming techniques, details of machine architecture, etc.

Information required with every submission

Each programming assignment submission must include a README text file giving the following information:
  • Your names. Every source file as well as every written document you submit must have your names (both partners) included.
  • The CS login (e.g. mmonro02) for you and your partner.
  • Indication of what aspects of the project have been implemented correctly and what aspects have not been implemented correctly.
  • Identify anyone with whom you have collaborated or discussed the assignment.
  • Say approximately how many hours you have spent completing the assignment.

Structure and Organization

All of the code that you submit will be graded for structure and organization as well as functionality. When you work professionally as a programmer, your work will be used and modified by others. Although many CS students are tempted to assume that running code is a substitute for clear explanations in English, the converse is typically the case. Many otherwise useful designs or implementations are abandoned because other programmers cannot easily figure out how they work. In short, a solution to a problem is of little value if that solution cannot be understood and modified by others.

For those reasons, formatting matters. When you submit your work, it should be immediately obvious that it was written to be understood by others. For many homeworks, especially those involving substantial programming, a substantial portion of your grade will be based on the structure and organization of your code, as well as comments and other documentation. Hint: Just as with a paper for a literature course, the first draft of a program that works is not usually the version to submit.

All code submitted for this course must abide by our course coding standards. These standards are based on the Linux kernel coding standards. They will give you a feel for the expectations of professional software development. Many organizations (Apple, Microsoft, etc.) have a "house style" to make it easy for developers to read and work on each other's code.

Homework Grades

Your homework grades will be based on the course staff's judgement of the quality of your work and your mastery of the material. Grades are assigned on the same scale used by the National Science Foundation:
  • Excellent work is outstanding in all respects. To be ranked excellent, the work must truly excel. That is, it must exceed expectations in some way. The normal top grade for work in CS 40 is Very Good, and students who consistently produce Very Good work earn A's. Grades of Excellent are awarded only in cases of true distinction.

    Excellent documentation will address exactly the key issues, and the degree of detail will be exactly appropriate.

    Excellent code will be very well thought out and implemented. Representations will be well documented in the code itself. Excellent code will show evidence of thorough attention to abstraction and modularity. Excellent code will be so simple that it obviously has no faults. Instructors will see no obvious ways to make excellent code simpler or clearer. Layout will be consistent and will make good use of vertical space. Excellent code will be of such high quality that the course staff would be happy to maintain it.

  • Very Good work is of high quality in nearly all respects. An assignment that does everything asked for, and does it well, will earn a grade of Very Good.

    Very good documentation will address most key issues, with a good amount of detail.

    In Very Good code, representations will be well documented. Key assumptions (non-null pointers, non-zero divisors) will be validated by assertions. Individual functions will be well organized and readable. Some attention will have been paid to abstraction and modularity, although one or two opportunities may have been overlooked. Nevertheless, very good code will maintain a single point of truth for properties of algorithms and data structures. Instructors may see one or two ways to make code simpler or clearer. Layout will be consistent and will make good use of scarce vertical space. Small errors may be evident from reading the code.

  • Good work demonstrates quality and significant learning.

    Good documentation will cover some key issues, but significant issues may have been overlooked or may have been covered with insufficient detail. Vague generalities may appear where precise specifics are expected.

    In Good code, representations will be documented, but documentation may not be up to expectations. Some assertions will be present, but perhaps not as many as there should be. Individual functions will be well organized and readable. Opportunities for abstraction and modularity will probably have been overlooked: representation may be exposed unnecessarily, too many unrelated functions may have been gathered in one file, or both. Command-line processing may be mixed with program abstractions, for example. The code may not always maintain a single point of truth for properties of algorithms and data structures, but duplication will be minimal. Good code will get the job done, but possibly in a way that could be shorter or simpler. Layout may be inconsistent in a few places. Errors may be evident from reading the code, but instructors will believe that code could be made correct with only modest changes.

  • Fair work is lacking in one or more aspects; key issues need to be addressed. “Fair” is the lowest satisfactory grade.

    Fair documentation will show evidence of effort, but the degree of coverage and detail will be significantly short of what the course staff believe is needed to foster success.

    Fair code will contain significant faults. Representations may be undocumented. Instructors may not be able to figure out what all functions do. Layout may be inconsistent or waste scarce vertical space (e.g., every other line may be blank). Fair code may show evidence of a 'clone and modify' approach to program construction. Possibly a Fair program could be replaced by code half its size. Given Fair code, instructors may believe major changes would be required to make the code correct, or instructors may be unable to understand why the code might be correct.

  • Poor work shows little evidence of effort or has other serious deficiencies. “Poor” is an unsatisfactory grade.

    Poor documentation may fail to address key issues or may address them perfunctorily.

    Poor code may be undocumented or inappropriately documented (e.g., overcommented). Poor code will often be lengthy out of all proportion to the problem being solved. Poor code may be laid out on the page in a way that is hard to read. Poor code often shows evidence of its history: extra copies of functions, unused logic left lying around, old code commented out, and so on. Poor code may be so complex that it has no obvious faults.

  • No Credit will be received for work not turned in, for parts that are incomplete, or for work that is non-functional or appears to bear no relation to the problems assigned.

    You will receive No Credit for work that you cannot explain.

    No Credit will be received for work that is deemed to be plagiarized. Code submitted for CS 40 may be examined for potential plagiarism using automated heuristics. Plagiarism is a form of academic fraud, which is unacceptable at Tufts. If academic fraud is suspected, a report will be filed with Judicial Affairs.

Extra Credit

Some homework assignments will offer opportunities to earn extra credit, which will go towards that assignment's final grade. Extra credit is just that: extra. It is possible to earn an A+ without doing any extra credit.

Late Submissions

Homework must be submitted by 11:59 PM on the specified due date. However, we recognize that the exigencies of college life occasionally interfere with on-time submission. If you have difficulty getting homework in on time, you have two options:

For ordinary difficulties, each student is automatically issued six "late tokens." By expending a late token, you get a 24-hour extension on all deadlines associated with the given assignment. For example, if a design document is due on Tuesday and the code is due on Friday, expending a single late token makes the design document due on Wednesday and the code due on Saturday. Expenditure of late tokens is governed by these rules:
  • No more than two late tokens may be expended on any single assignment.
  • When you are out of tokens, late homework will no longer be accepted and will receive a score of No Credit.
  • Both members of a group must have enough late tokens to receive credit for a late submission. For example, if one student in a group has a late token but the other does not, both students will receive No Credit if the submission is late.
  • If you intend to use a late token, you must not submit work before the deadline.
For extraordinary difficulties, such as serious illness, family emergencies, or other extraordinary unpleasant events, your first step should be to make contact with your advising dean. You must take this step before the assignment is due. Your dean will work with the course staff to make appropriate arrangements.

Solutions to homeworks will not be posted online until the last assignment is turned in or until the 48-hour token deadline has passed.

Regrade Requests

These assignments are complex to complete, and we try hard to grade them fairly and carefully. Still, mistakes do get made, and when that happens we want to know about it. We also want to be sure you understand the reasons for the grade you received. If you suspect we have made a mistake in grading a homework assignment, you have seven days after the assignment grades have been released to submit a regrade request via Gradescope. In such cases, we will review your request and potentially assign a new grade if the request is valid. You are always welcome to ask for an explanation of the grade you received.

Test Cases

Developing test cases is a skill that every programmer must learn. It's hard. It's takes time. You will come to see that your grades in CS 40 relate directly to how creatively you test your work.

Sharing of test cases is not allowed. You may use images or data that you find online to test your code, but you may not share these or other test cases with your classmates. Use good judgment in questionable cases: it's fine to tell people "there are some really interesting JPEGs on Flickr that might be useful." It's not OK to post "I got a brightness of 3.74 for daffodil.jpeg, what did you get?" If in doubt, please ask the course staff.

Collaboration and Academic Integrity

All students must read and adhere to the policies in the Tufts Policy on Academic Integrity.

Pair Programming

Learning to work with other programmers is an important skill that you will almost certainly need as a professional. Specifically, working as a programming pair allows you to learn more, work faster, and tackle bigger projects. All of the CS 40 homework assignments are to be completed in teams of two unless you have been given explicit permission from the course staff to work alone. All students are responsible for understanding and adhering to the following rules and policies relating to pair programming:

Q. Is pair programming required?
A. Yes. Exceptions are very rare, e.g., if you're halfway through a project and your partner drops the course or gets sick, etc. If there are an odd number of people in the course, we will pick one person for each assignment who will work alone. The other students will work in pairs.

Q. How is my partner chosen?
A. You will choose your own partner for each assignment. You may work with the same partner for up to three projects, but not more; so, you will likely work with at least four partners over the course of the term.

Q. Can my partner and I divide the work on a project?
A. NO! In CS 40, both partners must be present working together when design decisions are made, when design documents are created, when code is written, when test cases are created, and when testing is done. Both partners are responsible for understanding and agreeing to all design and coding decisions. In short, you are not dividing the work, you are working together. This policy will be very strictly enforced.

Q. How do we deal with scheduling problems?
A. It is your responsibility to choose partners whose work habits and availability are compatible with yours.

Q. What if my parner is in a different lab?
A. While it is easier to partner with someone the same lab section, it is not required. If you are in different labs at the same time, then one of you should just go to other's room. Try to go to the less full section. If you are at different times, then one partner should just go to the other partner's lab. Again, it's nice if you can move to the less full section, but it may not be possible for you to know, given that others will also be switching. So, prioritize your schedule. Normally, the moving around balances out.

Q. What if my partner gets sick, etc.? What if my partner drops the course?
A. The course instructor is always available to talk to you about problems that affect your work in CS 40. When emergency circumstances arise though, your first step should usually be to contact your advising dean for undergraduate education. Such problems typically require a coordinated approach across multiple classes, and the dean will help us verify that you have legitimate reason for requesting relief.

For minor problems, for example a minor illness that delays your work just a bit, we provide late tokens that allow you to submit assignments up to two days late if you have not already used up your allotment of six tokens. No permission or prior contact with the instructor is necessary: just submit your project when it is ready, and the tokens will be accounted automatically.

If your partner drops the course: If it is early enough in the assignment cycle, you may be able to find another partner. Check Piazza or post on Piazza. If it has already been a day or two, then contact your instructor right away. We will determine how to proceed based on the timing and what we know about other students' partnership situations.

Q. What else should I know about pair programming?
A. The CS 40 Pair Programming Code of Conduct give more detailed advice on navigating the intangible aspects of working with a partner. This article by Williams and Kessler may also help you to understand the motivation behind the pair programming requirement.

Other Collaboration

The following table is presented to students on the first day of the course. It summarizes some of the important rules as to who may help you with your designs, code, debugging, etc.

Who Allowed Not Allowed!
Current COMP 40 students other than your partner
  • Teaching each other technology (C, caches, etc.)
  • Discussing overall approaches to HW problems
  • Debugging compile scripts, sharing editor tricks, etc.
  • Showing others your solution code
  • Sharing or looking at other peoples' solution code
  • Sharing test cases
Friends, family, former CS 40 students, etc.
  • Studying technology (C, caches, etc.)
  • Debugging compile scripts, sharing editor tricks, etc.
  • Technical discussion of homework assignments
  • Having others look at or help debug your code or test cases
  • Having others show or give you their solution code
CS 40 TAs and Staff
  • May help you with all aspects of your work
  • Rarely: may authorize others to help with your code
  • Staff will help you learn to find answers, but will generally avoid giving away answers
Chat bots, online code-writing assistants, etc., whether using AI technology or not In general, the rules are the same as for getting assitance from other people who are not on the course staff or currently taking CS 40. The following are allowed:
  • Studying technology (C, caches, etc.)
  • Debugging compile scripts, sharing editor tricks, etc.
In general, the rules are the same as for getting assitance from other people who are not on the course staff. The following are forbidden:
  • Any research or assistance applicable to the specifics of the homework logic, solution structure, etc.
  • Inputting any of your solution code to a tool that may suggest improvements to the code or that would help you debug it, except of course that local debuggers such as gdb and valgrind, analyzing your running code, are allowed
  • Any interaction likely to result in your retrieving someone else's solution code or design documentation. (If you do inadvertently find such information on the Internet, you are required to promptly report to your professors what you found and where you found it, and of course you must immediately cease reading the details of such material.
A few important highlights to note:

Anyone can help you learn about the languages, machines, technologies, and libraries we study. E.g., if your sister is a professional programmer, she can help you learn C, understand the Hanson book, and write and debug programs (that are not part of the assignment) to experiment with those technologies.

Only current course staff, including TAs can look at or help you with the code you develop as solutions to our CS 40 assignments. So, your sister can help you write a little test program to experiment with Hanson's Atom_T or Seq_t, but she must not help you design, code, or debug code that uses those same ADTs as part of the solutions to one of our assignments.

You and your pair programming partner should of course share and collaborate on everything related to the assignment that you're working on together.

Other students in CS 40 must not look at your code (Makefiles and compile scripts are the sole exception). You may not team up across partner groups to collaborate on solving homework problems. However, you may have limited general discussions of approaches to our assignments. It is OK for small groups of students to discuss the concepts underlying a problem, and to suggest directions for exploration and general approaches to solutions. The line isn't always quite clear. We want to allow you to help each other a bit, but ensure that each team ultimately decides on and codes their own solution. If you are unsure what's acceptable, ask the instructor.

The internet at large can and should be used extensively as a reference on the C programming language, computer architecture, data structures, and algorithms. However, it is not OK to search the internet for material specific to this course. This includes solutions to CS 40 homework assignments, exam solutions, and notes taken during previous semesters of this course. In the same spirit, it is not OK to post any of these materials for future students to find.

The prohibition against posting code on online fora includes, for example, posting your solutions in a publicly accessible location like github. Such postings will be considered violations of course policy and of academic integrity and will reported to the dean's office.

Software/Platforms

You do not need your own computer to do the work in this course. The computers in department labs have everything you need. If you need an account for CS machines, please send email to staff@cs.tufts.edu. You may ask for bash as your login shell (the default for students is tcsh).

Programming assignments will be in the C programming language and will be evaluated on the department's 64-bit GNU/Linux servers and lab computers. For remote access, you can ssh into homework.cs.tufts.edu to use the department servers.

While it may be possible to complete some assignments using other machines, compiling and running your code on the department servers (either in person or remotely) is the best way to guarantee that your code will behave as expected when it is run through our grading software. It is your responsibility to ensure that your code can be run on the department machines. Consult the course resources page for other helpful information.

Accomodations for students with disabilities

The following is Tufts' policy on support for students with disabilities:

Tufts University values the diversity of our students, staff, and faculty; recognizing the important contribution each student makes to our unique community. Tufts is committed to providing equal access and support to all qualified students through the provision of reasonable accommodations so that each student may fully participate in the Tufts experience. If you have a disability that requires reasonable accommodations, please contact the StAAR Center (formerly Student Accessibility Services) at StaarCenter@tufts.edu or 617-627-4539 to make an appointment with an accessibility representative to determine appropriate accommodations. Please be aware that accommodations cannot be enacted retroactively; all accomodation notes must be provided to the instructor within one week of the note being written to guarantee consideration.

In CS 40, we are dedicated to helping every student have a successful and rewarding experience. If you have a disability or any other special circumstance that you feel might need special accommodation, please email the course instructors, or contact the StAAr Center.

Policies for Students Retaking CS 40

Policy updated for Fall 2023.
If, for whatever reason, you are enrolled in CS 40 for a second time, then pairing you with a new CS 40 student technically violates the academic integrity policy laid out in the table above: you would be a previous CS 40 student engaging in a technical discussion about the homework with a new CS 40 student. However, forcing a student to work by themselves for an entire semester can be a disadvantage (two brains are often better than one!). To strike a balance between these conflicting notions, the professor will approve one of the following options for students retaking the course:
  1. Simply bring over your course grades for the assignments you completed the last time you took the class. Follow along with the course otherwise, and once we get to assignments you had not completed you will work on them with a partner following our standard policies.
  2. Complete the first assignment(s) alone, so that all new CS 40 students have the learning experience associated with working through the assignments for the first time. Inform the TAs you are working alone, and they will be more flexible in the kind of help they offer. After the first assignment, you will work on further assignments with a partner following our standard policies.
Please contact the professor at the start of the term to discuss the options.