Syllabus

Course Description

This course is an introduction to computer science in the context of scientific, engineering, and commercial applications. The goal of the course is to teach basic principles and practical issues, while at the same time preparing students to use computers effectively for applications in computer science, physics, biology, chemistry, engineering, and other disciplines. Topics include: programming in Java; hardware and software systems; algorithms and data structures; fundamental principles of computation; and scientific computing, including simulation, optimization, and data analysis.

Textbook

R. Sedgewick and K. Wayne, Computer Science: An Interdisciplinary Approach, Addison–Wesley Professional, 2016. ISBN 978-0134076423. We will be referencing this text all semester. The lectures are based on its contents. Students can access the Princeton’s designated eCampus bookstore and purchase books and course materials easily and securely through a single sign-on process. To do so, please log in with your Princeton NetID and password. Errata for the textbook can be found here.

Course Organization

This course includes lectures, precepts, programming assignments, a final project, two written exams, and one programming exam:

Lectures. You are expected to attend and participate in lecture. Lecture participation accounts for 2.5% of the course grade.

  • Lecture Absences. The first four absences are automatically waived. This is intended to account for illnesses, religious observances, and varsity athletic competitions, along with technical issues with your iClicker app. Please do not request a waiver unless you will be exceeding this limit. To request a lecture attendance waiver, contact the Course Administrator.

Precepts. Precepts meet twice per week (either Monday/Wednesday or Tuesday/Thursday). Working within a small group, your preceptor will review key learning objectives for the week’s lectures and precept exercises. The precept will involve question and answer, group discussion, etc. Each precept involves working with a partner on interactive exercises and problem sets. Precept participation counts for 2.5% of your overall grade.

  • Precept Absences. The first four absences are automatically waived. This is intended to account for illnesses, religious observances, and varsity athletic competitions. Please do not request a waiver unless you will be exceeding this limit. To request a precept attendance waiver, contact the Course Administrator.

If you cannot attend your scheduled precept, you can visit another precept and this will count as attendance – but please let your regular preceptor know about it, as well as the preceptor of the one you visit. If you miss a precept entirely, it’s still a good idea to contact your preceptor to let them know what’s up. Arriving significantly late to a precept or leaving significantly early does not count as attendance (unless given permission from the instructor).

Programming Assignments. There are ten (10) programming assignments, all equally weighted.

  • The acknowledgments.txt File. All assignments must include a file named acknowledgments.txt, which includes your acknowledgment of original work (as specified in Rights, Rules, Responsibilities), any citations, names and dates of those who provided help, etc. Submitting the acknowledgments.txt indicates that you have stopped working on your assignment and your submitted work is ready to be graded. Your assignment solution will only be graded if the acknowledgments.txt is submitted.

  • Late Work. Assignments are due at 11:59pm ET on Sunday evenings. If any part of an assignment is submitted late, the entire assignment will be marked late. We consider your assignment submitted as soon as you submit the acknowledgments.txt file.

  • Penalties for late submissions. Late assignments are assessed a penalty equal to 10% of the possible points on the assignment per day (or partial day) late. The penalties for your first four late days are waived automatically. This is intended to account for illnesses, religious observances, and travel. To request an extension beyond that, post in the appropriate Ed Discussion forum. Please do not contact course staff if you need to utilize one (or more) of your automatically waived late days.

  • Additional Late Days. Additional late penalties will be waived only in the case of a medical or personal emergency, as documented by your residential college Dean or Assistant Dean for Studies, who must provide a recommendation to the course administrator. We will make a decision on any waivers or accommodations based on this recommendation. Notes from McCosh cannot be accepted for late work.

  • Late Days and Partners. If you are working with a partner, any late penalties apply to the group. The number of free late days a group can use is the minimum of the number of free late days each member has remaining.

Final project. The final project is approximately the length of two programming assignments. We encourage you to work with a partner. It is due on Dean’s Date at 5:00pm ET. You may not use late days on the final project. We will not accept any work after Dean’s Date without a residential college Dean or Assistant Dean for Studies recommendation and our approval.

Exams. There are two written exams and one programming exam during the semester. There is no final exam. No makeup exams will be considered without a Dean’s and/or Assistant Dean’s recommendation and our approval in advance.

Regrades. If you feel a mistake has been made grading your work, please use the regrade request features of codePost (programming assignments, programming exams) or GradeScope (written exams). Regrade requests must be submitted within three (3) days of your work being returned.

Attendance regrade requests must be made within three days after attendance grades are published.

Final Grades

Your final grade will be calculated based on a weighted sum of all the assignments, final project, exams and participation. The final letter grade cutoffs will be determined at the end of the semester based on overall class performance, but not curved to any specific distribution. Staff discretion may be applied to adjust borderline cases - for example, answering student questions on Ed Discussion can be used to bump borderline grades.

Grade Contributions Weight
Programming Assignments 37.5%
Final Project 7.5%
Lecture Participation 2.5%
Precept Participation 2.5%
Written Exams:
two written exams, one programming exam
50%

While final letter grade cutoffs will be determined at the end of the semester, a 93.0% will guarantee an A, 90.0% for an A–, 87.0% for a B+, 83.0% for a B, 80.0% for a B-, 77.0% for a C+, 73.0% for a C, 70.0% for a C-, or 60.0% for a D. You risk course failure if you earn below 60.0% of the available points.

Contacting Course Staff

The best way to contact course staff is to use our Ed platform. We encourage you to post publicly (attributed or anonymously) as your question may help others. Private posts are appropriate for issues that apply only to you. The reason we ask you to use Ed to ask questions, even private ones, is because the entire COS 126 staff can see your message without being forwarded; and also, since it is in a dedicated area, it does not get drowned out by other emails. Please do not post your assignment code on Ed, even in private posts.

Course Collaboration Policy

This course permits (and encourages) many forms of collaboration, including with course staff, classmates, and lab TAs. However, you must be careful to collaborate only as authorized below. Here is an executive summary:

your partner course staff COS 126 alums classmates AI Chatbots Other
discuss concepts with … yes yes yes yes yes yes
acknowledge collaboration with … yes yes yes yes yes yes
show your code/solutions to … yes yes yes no no no
view any code/solutions of … yes no no no no no
copy any code/solutions from … yes no no no no no

Concepts. Understand the difference between concepts and actual code. You may discuss general concepts, e.g., what is the syntax of a for loop, or explain how to input a sequence of numeric values. But you may not discuss specific code-related solutions to programming assignments.

Collaboration with an AI chatbot. You may not use AI composition software (such as ChatGPT, Copilot, Jetbrains AI Assistant, Gemini, Meta AI, …) to create or debug programming assignment code. You may use these tools to discuss concepts (see above) related to lecture, reading and/or precept. However, you may not use these tools to help you understand or assist in completing programming assignments.

If you are uncertain about how or when to use AI tools, please consult with the course staff prior to their use.

Caveat emptor! While modern AI technology can produce impressive results, there are occasions when these results may be incorrect, incomplete, inconsistent, especially with respect to COS 126 topics. Exercise caution and verify information as needed.

Your solutions. You must individually compose all of your solutions. The term solutions refers to any of the products created when completing a programming assignment, such as source code (including comments) and the readme.txt file. It includes both finished and unfinished products, regardless of correctness or completeness.

  • You must never expose solutions to anyone who is taking COS 126 now or who might take COS 126 in the future. Do not post solutions in public code repositories.
  • You must never receive or view any solutions to a programming assignment (or variant of an assignment) other than your own. This includes other students’ solutions, solutions available on the Internet, code generated by tools (e.g., ChatGPT, Copilot, Jetbrains AI Assistant, Gemini, Meta AI, …), etc.

All the rules above continue to apply after assignments are graded and after the end of the semester.

Collaboration with course staff. You are welcome to discuss your solutions with course staff members (instructor and preceptors) in office hours or via private Ed Discussion posts. Do not post code on Ed or email us your code; instead, submit your code via TigerFile - the course submission system.

Collaboration with classmates. We encourage you to discuss common concerns with classmates either private via personal interactions or publicly in the Ed Discussion course forum. These discussions must be kept at a general level, without exposing your solutions.

For example, you may discuss: But, you may not:
How to interpret an error message. For example, “What does StackOverflowError mean?” Look at another classmate’s solutions (or show another classmate your solutions).
How to use a feature in IntelliJ. For example, “How do I start the embedded terminal?” Lead a classmate step-by-step through any part of the assignment (or allow a classmate to lead you step-by-step through any part of the assignment).
Clarifications for the lecture videos, lecture slides, textbook, old exam questions, or the assignment specifications.

Collaboration with students who have already taken COS 126. Anyone who successfully completed COS 126 in a previous term, including lab TAs and peer tutors, may assist you in the following ways:

  • They may look at your code.
  • They must not write, type, or dictate code.
  • They may help debug, but they must not give step-by-step directions on how to complete the assignment.
  • They should give thought-provoking suggestions rather than dictating what to change.
  • While helping you, they must not look at any other solutions, including their own.

Collaboration acknowledgment. You must acknowledge all collaboration in the acknowledgments.txt file for that week’s assignment. Please include the names (and dates) of lab TAs, preceptors, students, and/or any other resources who provided assistance. You must also indicate if you helped another student on an assignment.

Collaboration with a partner

On certain assignments and the final project the collaboration policy is relaxed to allow working with a partner, subject to the following rules:

  • Choose a partner whose skill level is close to your own - only two partners per group.
  • Your partner does not have to be in your precept.
  • Complete all work with your partner, sharing the same screen. This includes debugging, testing, commenting, writing the readme.txt and acknowledgments.txt, and submitting the files.
  • You and your partner must work together on all components. You may not split up the work. One partner may not start the assignment/project without the other partner present.
  • Go to office hours or the Lab TAs with your partner; one partner may not edit the code without the other partner present.
  • Use the following pair programming protocol: one partner, the driver, types the code and the other partner, the navigator, reviews the code, identifies bugs, and asks questions. Swap roles every thirty (30) minutes.
  • Do not post your code where it is visible to anyone but you and your partner. Code can be shared using Google Drive, Dropbox, etc.
  • If you are working with a partner, any late penalties apply to the group. The number of free late days a group can use is the minimum of the number of free late days each member has remaining. So you may want to discuss this before you form a partnership.
  • You and your partner must indicate that you both adhered to the partner collaboration rules in the acknowledgments.txt file.
  • To dissolve a partnership, you must contact the course administrator.

Plagiarism

Plagiarism and abetting plagiarism are serious academic infractions. Programming is a creative work and the academic regulations that apply to plagiarizing prose also apply to plagiarizing code. Princeton’s Rights, Rules, Responsibilities defines plagiarism as the use of any outside source without proper acknowledgment. It ranges from verbatim copying (e.g., cutting-and-pasting code) to thorough paraphrasing (e.g., changing variable names or rearranging code).

Outside sources and citations. Copying or adapting code that is not yours is permitted only if it comes from the course materials (i.e., the course textbook, companion booksite, programming assignment specifications, lecture slides, lecture videos, and precepts). If you do so, you must cite any code that you copy or adapt (with the exception of code that is included with the assignment).

Plagiarism detection. We use sophisticated software tools that are able to detect plagiarism, including thorough paraphrasing. For example, we compare each submission (including interim submissions) against a code database, which includes all submissions from this offering, previous offerings of the course or from other sources. These checks may be done periodically during the semester or even after the semester ends. While we take no pleasure in bringing cases to the Committee on Discipline; it is our duty to keep the playing field level for the overwhelming majority of students who work very hard in this course and follow the rules.

Regret clause. If you neglect to cite a source on a programming assignment in this course, you may resubmit your acknowledgments.txt file, adding proper acknowledgments, at any time before Dean’s Date. You must also notify the course instructor. If the source is unauthorized, you will likely receive a zero (0) on the assignment (for violating course policies). However, with proper acknowledgments, this would not be plagiarism, so we would not initiate a Committee on Discipline (CoD) case. Once a case has been submitted to the CoD, the matter is outside of our control and the regret clause cannot be invoked.

Penalties. We refer alleged academic violations (including plagiarism and abetting plagiarism) to the CoD. If found responsible, the typical penalty is an F as a course grade plus whatever penalty that the CoD imposes. (The typical CoD penalty for plagiarism is suspension from the University for at least one semester.) Violators of course policies that are not adjudicated by the CoD will receive penalties based on the severity of the violation, ranging from a warning (for violations that are both unintentional and innocuous) to an F in the course (for violations that are both intentional and serious).