Welcome to COSC 10!
In CS10, you will develop skills in solving computational problems, inspired by challenges that arise in a variety of disciplines. Your learning will be centered on four foundational pillars of computer science:- abstraction (how to hide details),
- modularity (how to decompose problems),
- data structures (how to efficiently organize data),
- algorithms (procedures for solving problems).
Your learning will be reinforced through short assignments, weekly recitations, exams, and programming assignments in Java following objected-oriented programming techniques, addressing real-world problems.
While generative AI tools, like chatGPT, Gemini, Grok, Claude, can write code (at least for known problems), this course will build the expertise that AI lacks:
- CS10 (and computer science in general) is not just about writing code, but about developing timeless, transferable problem solving skills to approach complex problems,
- generative AI might not produce the correct results and it is important for computer scientist to be able to understand their correctness and analyze its properties (e.g., efficiency, robustness).
Prerequisite. CS 1, Engineering Sciences 20, or placement through AP or local placement exam.
Who, when, where
- Class Meeting
- 12-hour | MWF 12:50 pm - 1:55 pm ET; x-hour Tu 1:20 pm - 2:10 pm ET |
Location Rocky
003
- Recitation section Meetings
- Starts from week 2, 1 hour per week; please see the related
Canvas page for finding out which section you're assigned to, time, and
place (see details below; note the assignment will
be finalized by Tuesday night after your response to the survey).
- Office hours
- Each teaching team member will have 3 hours per week. Please see the
calendar on the Canvas course for the time and place (details below).
- Contact
- Please feel free to reach out to any of us in the teaching team -- we're here to help. The communication platform for getting help is Slack (add the first time via Canvas) as detailed below.
- Announcements
- Monitor Slack for periodic course-wide announcements, which you should receive also an email.
- Instructors
- Section Leaders
- Class lectures
-
Class lectures will be in-person in the room indicated above.
- X-hours. I do not plan to regularly use x-hours, but I may also use them for missed classes, to catch up on material, or for optional, informal sessions to work through examples. Make sure to keep this time slot free in case we need to use it and use it for your coursework when not used.
Class attendance and participation.
You are expected to attend lecture and section meetings in person unless you have made alternative arrangements due to illness or medical reasons. For the health and safety of our class community, please do not attend class when you are sick, nor when you have been instructed by Student Health Services to stay home.
One of the primary benefits of lectures, as opposed to books and videos, is the opportunity to interact. I will ask questions during class and you are welcome to ask questions. We will all enjoy the experience more, and everyone will learn more, if you do ask questions. It can of course be intimidating, but chances are that if you have a question, then at least one other student — and possibly many more — has the same question. You're doing the other students a favor by asking! Feel free to raise your hand, and we will get to it as soon as we can.
Laptop policy. Laptops and phones are distracting, not just to you, but to everyone around you (it's human nature to wonder what's up over there). There is recent research that attests to the negative impacts of learning and retention when multitasking. It has also been shown that writing notes by hand rather than on a laptop engages different cognitive processes and has direct (positive) consequences for learning. Since class notes are made available anyway, there's really no need to type. I recognize that there can be some value in following along with the examples right in front of you, so I won't ban laptops entirely, but I will strongly encourage you to try to abstain for those 3 hours a week.
We intend to record the class meetings and post them after the class, tentatively by the end of the day of that class, for students who cannot attend the class meetings, but emphasize that interacting in the class and working through the book and notes and doing the exercises you find there are the primary learning methods for the course.
- X-hours. I do not plan to regularly use x-hours, but I may also use them for missed classes, to catch up on material, or for optional, informal sessions to work through examples. Make sure to keep this time slot free in case we need to use it and use it for your coursework when not used.
- Section meetings (recitation)
- These are required weekly small-group meetings with Section Leaders
(undergraduates who have already taken CS10) to review lecture material, discuss
questions, go over homeworks, etc. They also provide an opportunity,
"programming drills", to practice the concepts.
Bring your laptop so you can do the drills. Groups and times will be posted on Canvas. If you have a conflict and you have to miss a section meeting, find an alternate section and arrange the make up in advance with both Section Leaders.
- Solve short assignments and recitation programming drills by writing relatively small code snippets to consolidate the concepts learned every week in class.
- Solve problem sets by writing programs to apply the concepts learned in class to real-world problems.
- Answer exam questions to solidify your learning and acquire skills, e.g., for technical interviews.
- Please write whether your work was your own and any sources
that were used to complete this assignment. An **example** of response is:
This work is my own, I talked with my classmate Alice and used the resources at the following links: https://help.java
I also used ChatGPT just for better understanding the concept of object-oriented programming and refining the grammar of the answers.
- Please ensure to read carefully the instructions on how to upload the file.
- For code:
- Use the default package (i.e., leave the package name blank when creating the file; make sure there's no "package" declaration in the java file).
- Use only relative pathnames for files (e.g., "pictures/smiley.png"), with files in a folder specified in the assignment write-up.
- For problem sets, include your name and your partner's, or if you worked alone, state "no
partner" in an
@authorcomment. - For problem sets, indicate that in a comment in the code and add yourself as a partner in Gradescope (here the instructions on how to add a group member). Both of you should submit the same code. The code will then be graded once with the same grade assigned to both of you.
- Section meeting programming drills (5%)
-
During the weekly meeting with your Section Leader (see Section meetings above), you will get
practice solving object oriented problems and will get feedback to aid your
understanding of the basic course material. You will be graded as follows:
- Grading
- 2 (correct and efficient), 1 (needs work), or 0 (nothing
of substance).
Lowest grade will be dropped. - Late policy
- Only available at the section meeting; bring your laptop! If you miss a programming drill, you are encouraged to complete the problem to solidify your knowledge, but it will not receive credit.
- Short assignments (10%)
-
Short programming or written exercises to practice the concepts from one
class before the next class. Short assignments are to be done individually
(e.g., no partner).
- Grading
- 2 (correct and efficient), 1 (needs work), or 0 (nothing
of substance).
A solution receiving a 1 may be revised and resubmitted once, before the next regular class period after it is returned, for a possible upgrade to 2. - Late policy
- Due via Canvas on the date and time noted on Canvas assignment. No credit for late submissions.
- Problem sets (25%)
-
A mixture of written and in-depth programming exercises, challenging you to
use the ideas we study in class to solve new problems. You may work with
one partner on these assignments(see Collaboration below); each partner
should upload the same solution. You are not required to work
with a partner.
- Grading
- Specific grading rubrics will be provided for each problem set, covering correctness (solving the assigned problem), structure (organization, use of techniques covered, efficiency), style (readability of code, clarity of documentation), and testing (your demonstration of correctness).
- Late policy
- Due via Canvas on the date and time noted on the
Canvas assignment. Late penalties:
- < 8 hours: 10%
- < 24 hours: 20%
- < 48 hours: 40%
- more: no credit.
- Midterms and final exam (60%)
- There will be two midterms and a final exam, each worth 20% of the final
grade (total = 60%). You are allowed to use one 8.5 x 11 inch note page for
each of the exams, but you may only include information provided by the
instructor or from the course web page. Including other
information on your note page is a violation of the Honor Principle. You can use both sides of the
page and it does not have to be handwritten. You may only use a note page
that you create yourself. You may not use a note page created by someone
else or created in conjunction with someone else (e.g., you and your friend
cannot create one page that you both print and use). The midterms will be
in the evening to allow more time than the hour scheduled for class.
If you have an academic conflict and need to schedule a make-up midterm, or if you have an accommodation, you must let me know at least a week in advance of the scheduled exam. I suggest you check for conflicts with other classes during the first week of the term. The final exam is scheduled by the registrar so that there will be no conflicts; thus an alternate schedule is possible only in the case of a documented illness (do not schedule travel before the final!).
If you have questions about your exam score, or would like a question re-graded, see your Section Leader within one week from the date that the exam was returned. If you request a re-grade of a particular question, we reserve the right to re-grade your entire exam.
- Extra credit
- Each problem set has a list of extra credit problems with associated points.
You may suggest other
extensions for possible extra credit; any exceptionally clever, creative, or
insightful work may likewise be awarded extra credit points. As its name
suggests, extra credit is always optional, and you should never feel that you
have to do extra credit problems.
Extra credit points will be added to your total points for that problem set (which could potentially be >100 all together). We will cap extra credit points at 80 extra credit points total across all problem sets (roughly equivalent to a half-letter-grade bump).
- Letter grades
- There is not a fixed scale, as it is impossible to pre-calibrate exam difficulty that precisely. The course median tends to be a B to B+, but that is not guaranteed. The lowest passing grade is normally 60%.
- #course-announcements: for this course, important course announcements will be made via this channel.
- #class-discussion: for questions and discussions on the concepts covered in the class.
- #help-assignments: for questions and discussions on the assignments.
-
Read the material recommended in the class. Participate in the class. Start all assignments early. With few exceptions, at the time you receive an assignment, you'll know everything you need to do it. The pace of the class is relatively fast and it can be easy to fall behind in the course.
Do not be afraid to get help. The purpose of this course is not to waste your time. If you are not making progress on a problem, please ask on Slack, and see us or a section leader.
Please talk to us if you are running behind. The most important thing for you is to finish the assignments and not worry about being late.
- On exams, all work must be your own.
- You will work on short assignments individually. Programs that you turn in should be created, typed, and documented, and the output generated, by you yourself.
- We will use Slack as a shared help system. Your public posts (questions and replies) must not reveal solutions (or even partial solutions) to the problems. As illustrated below, asking and answering questions in English is generally acceptable, while using Java as your language of communication is not. This might seem to make it harder to debug, but the act of phrasing a good question without just dumping your code can actually be very helpful to you.
- If you are working on a computer that is not yours or that someone else in the course might use, you should be very careful to remove your code from the computer when you are all done. You should probably email your code to yourself before you remove the code. Why do we tell you to do this? Because if you leave your code on a computer, and someone else can see it, then they can copy it and hand it in. If that happens, then we have a bad situation involving you (the copy-ee) and the other person (the copy-er), and it's difficult, if not impossible, to tell who was the copy-ee and who was the copy-er. By removing your code from the computer when you're done, you can avoid getting yourself into that situation.
- Whenever we ask you to turn in sample runs of your program, the runs you turn in must be the result of actually running your program. It is a violation of the Academic Honor Principle to falsely represent output as coming from your program if it did not. If you change your program, make sure to generate output from the version of the program that you hand in. It's amazing how a seemingly minor change to the code can cause a big change to the output of a program. Also, make sure that when you are running a program, that it is your program; it is easier than you might think on a public Mac to run a program that someone else had left on the machine.
- In the past, we have had a few incidents in which students turned in output that did not come from the program handed in. In each case, it turned out that the student had made a foolish mistake (in not rerunning the program or handing in an old version of the program or the output) and had not intended to misrepresent the work. Yet it caused many an uncomfortable moment for the student and also for the student's Section Leader and for the instructor as well. So please endeavor to verify that you're handing in output that comes from the very program you're handing in.
- It is not easy to come up with good homework problems that help you learn a concept, are interesting, and require an appropriate amount of work. Over the years we have developed and refined a number of homework problems, and I plan to reuse, often with modification, some of them for this class. You should not look at any solutions to homeworks assigned in previous terms, including sample solutions, or solutions written by other students.
- We will be running powerful software tools that detect suspicious similarities in software. These tools are quite sensitive, even to the obvious tricks that are often used such as changing variable names, spacing, comments, orders of code fragments, etc. It could take much more work to fool the software than it would just to do the assignment.
- We have had some uncomfortable situations occur in the past, and I want to make the policy clear. Two students, Alice and Ralph, who are not working as formal partners, discuss an assignment and design their basic approach together. That is fine. But then they decide that since their programs would be so similar, they might as well have Alice type in the code, have Ralph make his own copy of the file containing the code, and then have Ralph make his own minor changes. This is a violation of the Academic Honor Principle. Although you may discuss and design with others, the code you hand in must be entirely your own.
- Here's another situation that occurred. Tracy and Ed (neither are working with a partner) start working independently on a program. Tracy finishes and has a working version. Ed has trouble with his. Tracy helps Ed debug. That is fine (but Ed should note Tracy's help in a comment in his code). But then Tracy realizes that Ed has a section of code that is all wrong and the program she wrote has just the right code for that section. She shows Ed her program. That is a violation of the Academic Honor Principle. Or worse, she gives Ed an electronic copy of her program so that he can just paste in the correct code. That is also a violation.
- Another unfortunate situation involved Elsa looking at Ebenezer's code (not partners) to see how he'd gotten it working, in order to better understand the approach and figure out where she'd gone wrong. Similarly, Ziggy found a former student's code on-line and thought that by studying that code, he'd learn how things should really work, beyond just the descriptions and pseudocode in the assignment write-up and in the textbook. These are violations of the Academic Honor Principle. They undercut your own learning, as a key part of problem solving with computer science is being able to start with high-level descriptions (as provided) and figure out how to correctly implement them using suitable data structures and programming constructs.
- If you have any questions about whether what you're doing is within the Academic Honor Principle, do not hesitate to check with me. If it's late and you can't get hold of me, you're better off erring on the side of caution.
- Most violations of the Academic Honor Principle come down to failure to cite work that is not yours. If your code benefited from your friend Elvira's code (or an AI's code, see below), but you did not indicate that and represented it as your work alone, then you either intended to deceive or were careless about citing. Either case is a violation of the Academic Honor Principle. If you copy your entire program from Elvira but include the comment, "This code was copied in its entirety from Elvira," then you cited properly, though you didn't actually do the work. In this latter case, I would not report a violation of the Academic Honor Principle, though your grade on the assignment would be 0. But that would be far preferable to a Committee On Standards hearing.
- The same goes for code that you find in some other book or on the Internet. You are in violation of the Academic Honor Principle if you fail to attribute your sources.
- In addition to avoiding code on the Internet, do not post your own solutions
to the assignments or exams on public websites such as github. I realize you
may want to show your code to potential employers. In that case, post your code
to a
privaterepo and grant the potential employers access to your code on a short-term basis. - Special note on Artificial Intelligence-based code generators
- AI-based tools such as ChatGPT, CoPilot, Code Llama, and others can generate code for you based on natural language prompts that you provide. For this class, I do not consider it to be an honor principle violation for you to use these tools to create or debug your short assignment or problem set solutions. However, I strongly urge you to write the solutions yourself, rather than relying on these tools. Most of the true mastery of this course's material happens from striving to create correct and efficient code yourself, not from simply reading and copying another person or algorithm's code. Additionally, these tools will not be available on the midterms and final, so you'll need to fully understand the course material to succeed.
- If you choose to use an AI-based tool you must:
- Cite the tool and prompt(s) you used for each method (function) created or debugged with one of these tools, even if you modify the tool-produced code
- Be able to explain every line of code in your solution; specifically what the line does and why you included it.
- If you choose to use an AI-based tool you must not:
- Share the prompts you used with anyone (other than your partner, where partners are permitted)
- Share the tool's output with anyone (other than your partner, where partners are permitted). Other students must use the tool themselves and must evaluate the tool's output relative to their solution
- Use Java-provided code that we have not discussed in class. For example, if an AI-based tool suggests you use an ADT such as a Set, but we haven't covered Sets yet, you may not use them until we cover them. Once we've covered a concept in class, you may use Java-provided code unless specifically instructed not to use it.
- Remember: because code compiles and runs does not mean it is correct or efficient. Also, be aware that these tools typically store and analyze your prompts, potentially building a profile of you.
Ava Weinrot
Bill Zheng
Caroline Chung
Christian Nyamekye
Claire Chang
Jeffrey Song
Joyce Zhou
Lee Nowicki
Max Liu
Nand Patel
Nico Bezzerides
Owen Chen
Richmond Tettey
Sri Korandla
Warren Shepard
Detailed syllabus table of contents
Class meetings
Coursework and Grading
| Homework | Percentage |
|---|---|
| Section meeting programming drills | 5% |
| Short assignments | 10% |
| Problem sets | 25% |
| Homework total | 40% |
| Exams | Percentage |
| Midterm 1 | 20% |
| Midterm 2 | 20% |
| Final exam | 20% |
| Exams total | 60% |
To assess your learning, you will:
All of the coursework (short assignments and problem sets) will be submitted via Canvas, with the Gradescope integration, at noon before class so that the solution can be discussed. Even when an assignment has some written exercises, you are required to either type in a file or scan your written work and submit it electronically. To submit output from your program, submit a copy-pasted file in plain text format and/or a screenshot, as appropriate. For plain text, you can use a program like TextEdit, NotePad, or Emacs, or even Word, but be sure to save as plain text. For a screen shot, you can use Preview on Mac (under the "File" menu) or the PrntScrn button on Windows.
Please ensure to read the "How to get help" section of this syllabus: the pace of the class is fast and we are here to help you along the way so that you can succeed in your learning.
Please ensure also to read the policy regarding the honor code below which contains specific examples, so that you are aware of what is allowed/not allowed in the course in terms of collaboration and use of generative AI -- when in doubt, please ask.
Requirements for submissions:
How to get help
There are many ways for you to get help. In general, please reach out early on for any questions or comments -- we are happy to help.
Slack
We set up a Slack workspace for the class, which you can access directly from Canvas and choosing "Desktop App". There are two main channels:
Please use those public channels for public questions/comments. You are welcome to answer to other students' comments/questions, by starting a thread. This allows your classmates to benefit from seeing the question and subsequent response. We encourage you to contribute answers to other people’s threads, or initiate open-ended discussions on topics relevant to the class.
The instructors and section leaders will monitor at specific times the channels and will answer unanswered questions, typically within 24 hours; if you need our attention, please tag explicitly the teaching team by using the tag @teaching-team.
Note! Please be sensitive to the honor code and make sure not to post sensitive material (e.g. your code or solutions to exercises) publicly on Slack.
If you have an individual specific request, you can send a direct message to your section leader or the professor.
Note! Please do not email the teaching team individually with question, but ask (and answer) questions on Slack instead.
Do not hesitate to ping a second time if you don't receive a response within 24 hours.
Office Hours
You can visit us during office hours. We will have extensive office hours throughout the week. Note that each teaching team member's office hours uses a different office location, so please double check on the Canvas calendar and Slack for unexpected changes.
Each of you will have a section leader as a reference so that you can establish a closer contact and the secton leader can observe your growth over time and provide you suggestions. This assignment will be done in the first week. You're welcome to reach out to others in case for example you're not able to attend the office hours of your reference section leader.
If none of the times work, you may also send a direct message to potentially find a time outside of regular office hours.Collaboration
Much of the learning in this course comes from doing the programming exercises. Sometimes learning can happen more effectively when you can hash things out with someone else, so working with a partner will be allowed when so stated on the assignment. In such cases, you may work jointly with one other person. No more than two people may work together on a given problem set. If you choose to work with someone else, you and your partner must each submit a the same joint assignment with both names on it, and you must work with the same person for the entire assignment (you cannot work with one person for some parts of an assignment and a different person for other parts).
If you work with a partner, you are still responsible for understanding the entire assignment. That means that splitting the coding into two halves, doing your half, and never looking at your partner's half is not a good idea. You can learn a lot by reading your partner's code and figuring out how it works, whether it is correct, and how it might be improved. You can also catch things like poor or missing comments that could cost you style points when the assignment is graded.
When working with a partner, I suggest that you borrow a practice from Extreme Programming, a method of writing code that many businesses find quite effective. One person (the driver) sits at the keyboard. The other person (the navigator) looks at the screen as the driver types, asking questions, making suggestions, and catching errors. You can do this over Zoom with the driver sharing the screen. Both of you will understand the code better if you discuss it as it is written than if you just write it (or read it) by yourself. Regularly trade off who is driver and who is navigator.
The usual reaction to this idea is, "that will take twice as long!" In practice it is usually faster than each person programming alone. The reason is that errors are caught earlier, and the amount of time are saved when debugging more than makes up for the lack of parallelism in code writing. Also, the code tends to be better written. These are the reasons that this idea has been adopted in industry.
Important advice
Policies
Honor Principle
Dartmouth's Academic Honor Principle applies to this course, and academic misconduct policies will be strictly enforced. I will report suspected cases of cheating to the Undergraduate Judicial Affairs Officer. I will assign a failing grade for an assignment or an exam if I conclude that the honor principle has been violated. If the Committee on Standards finds that you violated the honor principle I will assign a failing grade for the entire course. If you have questions, ask!
You should attribute the proper source in anything that you submit that you did not write yourself. This includes code that you take from outside references, for example a book other than the course text. It even includes code that you take from the class examples, textbook, or assignments, other than the code given for that particular assignment. (I agree that may be tedious to attribute the source in code that we have given you, but we want you to be in the habit of attributing your sources.) Note also that proper respect for copyright laws as it applies to printed and software products is part of the Computing Code of Ethics. This requirement also applies to code created or debugged by AI-based code generators (see below for more details about AI-based code generators).
For the problem sets, you may work with a partner as discussed above. You may also consult freely with other classmates during the phase of designing solutions, but you should then work individually (or with your partner) when creating your programs—typing, documenting, and generating output. During the debugging stage you may discuss your problems with others in the class, but you should not copy code to "fix" bugs. To do otherwise is a violation of the Academic Honor Principle.
I realize that it can be hard to decide when you might be violating the Academic Honor Principle, so here is a good rule of thumb. If you are talking in normal English (or Chinese or German or some other natural language) you are probably OK. If you find yourself talking in Java code, you have crossed the line. So saying, "Your program runs forever because you have the wrong condition in the while loop" is OK. But saying, "Change while (x == 0) to while (x > 0)" is not.
Elaboration (thanks to many CS 1 and 10 instructors over the years)
Accommodations
I encourage students with disabilities, including "invisible" disabilities such as chronic diseases and learning disabilities, to schedule a meeting with us to discuss appropriate accommodations that might be helpful to you. This conversation will help to establish what supports are built into the course. Here are the details on how to start the process:
Students requesting disability-related accommodations and services for this course are required to register with Student Accessibility Services (SAS; Apply for Services webpage; student.accessibility.services@dartmouth.edu; 1-603-646-9900) and to request that an accommodation email be sent to me in advance of the need for an accommodation. Then, students should schedule a follow-up meeting with me to determine relevant details such as what role SAS or its Testing Center may play in accommodation implementation. This process works best for everyone when completed as early in the quarter as possible. If students have questions about whether they are eligible for accommodations or have concerns about the implementation of their accommodations, they should contact the SAS office. All inquiries and discussions will remain confidential.
Mental Health
The academic environment is challenging, our terms are intensive, and classes are not the only demanding part of your life. There are a number of resources available to you on campus to support your wellness, including: the The academic environment is challenging, our terms are intensive, and classes are not the only demanding part of your life. There are a number of resources available to you on campus to support your wellness, including: the The academic environment is challenging, our terms are intensive, and classes are not the only demanding part of your life. There are a number of resources available to you on campus to support your wellness, including: the Counseling Center which allows you to book triage appointments online, the Student Wellness Center which offers wellness check-ins, and your undergraduate dean . The student-led Dartmouth Student Mental Health Union and their peer support program may be helpful if you would like to speak to a trained fellow student support listener. If you need immediate assistance, please contact the counselor on-call at (603) 646-9442 at any time. Please make me aware of anything that will hinder your success in this course.
Title IX
At Dartmouth, we value integrity, responsibility, and respect for the rights and interests of others, all central to our Principles of Community. We are dedicated to establishing and maintaining a safe and inclusive campus where all community members have equal access to Dartmouth’s educational and employment opportunities. We strive to promote an environment of sexual respect, safety, and well-being. Through the Sexual and Gender-Based Misconduct Policy (SMP), Dartmouth demonstrates that sex and gender-based discrimination, sex and gender-based harassment, sexual assault, dating violence, domestic violence, stalking, etc., are not tolerated in our community. For more information regarding Title IX and to access helpful resources, visit Title IX’s website (sexual-respect.dartmouth.edu). As a faculty member, I am required to share disclosures of sexual or gender-based misconduct with the Title IX office. If you have any questions or want to explore support and assistance, please contact the Title IX office at 603-646-0922 or TitleIX@dartmouth.edu. Speaking to Title IX does not automatically initiate a college resolution. Instead, much of their work is around providing supportive measures to ensure you can continue to engage in Dartmouth’s programs and activities.Religious Observances
Dartmouth has a deep commitment to support students’ religious observances and diverse faith practices. Some students may wish to take part in religious observances that occur during this academic term. If you have a religious observance that conflicts with your participation in the course, please meet with me as soon as possible—before the end of the second week of the term at the latest—to discuss appropriate course adjustments.
Acknowledgment
This course is based upon a course originally developed by Professor Chris Bailey-Kellogg. I am deeply indebted to him for all of his hard work, as well as all other instructors over the years, including but not limited to Prof. Timothy Pierson and Dr. Kate Salesin. Also, special thanks to Ethan Chen '24, Pratim Chowdhary '25, and Bill Zheng '26 for their insightful comments and code contributions.