ORC. Motivated by problems that arise in a variety of disciplines, this course examines concepts and develops skills in solving computational problems. Topics covered include abstraction (how to hide details), modularity (how to decompose problems), data structures (how to efficiently organize data), and algorithms (procedures for solving problems). Laboratory assignments are implemented using object-oriented programming techniques.
Prerequisite. CS 1, Engineering Sciences 20, or placement through AP or local placement exam.
Who, when, where(Note: all times are Eastern time zone)
- Tim Pierson | 210 Sudikoff
office hours: most weeks Tues. 1:40 pm - 2:30 pm, Wed 9:00 am - 10:00 am, Thurs. 1:40 pm - 2:30 pm (confirm via Canvas calendar), and by appointment. Find Zoom links to office hours on the Canvas calendar.
- Graduate teaching assistant
- Sayanton Dibbo
- Section Leaders
- Aditya Choudhari, Alex Hamel, Brian Morrion, Dylan Bienstock, Gokul Srinivasan, Gwen Wattenmaker, Henry Kim, Irene Lam, Jessica Cheng, Katherine Lasonde, Kelly Rutherford, Lily Maechling, Matthew Roth, Megan Ren, Nina Paripovic, Satch Baker, Scott Gibbons, and Sudharsan Balasubramani.
- E-hour | MWF 1:10 pm - 2:15 pm | Online (Zoom links on Canvas) F-hour | MWF 2:35 pm - 3:40 pm | Online (Zoom links on Canvas)
- Lectures will be online and recorded this term using Zoom — see Canvas for access details. When you join the online meeting, please mute your microphone. If you have a question, please hit the "Raise hand" button on Zoom. If I do not call on you in a short period of time, please unmute and ask. We will work out more rules as we go...
- I do not plan to regularly use x-hours, but I will use them on the first week of class. I may also use them for missed classes, to catch up on material, or for optional, informal session to work through examples. Make sure to keep this time slot free in case we need to use it.
- Section meetings (recitation)
- These are required weekly small-group meetings with Section Leaders 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.
- Section Leader office hours
- Each Section Leader will hold a total of 3 hours of office hours per week (times and locations maintained on Canvas). These will be spread out to encourage you to start early and ask conceptual questions as you dive in, while still providing some help with debugging closer to assignment due dates. Slack (below) is the way to get help any time.
- Help: Slack
- Expect an invite to our Slack channel after the first day of class. I encourage you to ask and answer questions there. Make sure you abide by the honor code described below!
- Monitor Canvas for periodic course-wide announcements.
- Data Structures and Algorithms in Java, 6th edition, by Michael T. Goodrich, Roberto Tamassia, and Michael H. Goldwasser. Available in paperback or as an e-book (the e-book is much cheaper). The textbook is not strictly required; I'll provide all of the information you'll need for the course. The book, however, takes a deeper dive on some subjects and is an excellent resource to see what professional Java code looks like. Many students have found the book helpful.
All homeworks (short assignments and problem sets) for this class are to be submitted electronically via Canvas before class. 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.
Requirements for code submissions:
- 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.
- Include your name and your partner's, or if you worked alone, state "no partner" in an
- If you worked with a partner and ended up with a single shared code, indicate that in a comment in the code and on the submission. Both of you should submit the same code. The code will then be graded once with the same grade assigned to both of you.
- If you worked with a partner but wrote separate code, indicate the collaboration but that you have different submissions. Indicate this in both the code and on the submission. Each of you should upload your own code, and each of you will get a separate grade.
- Collect all your code files into a single zip file and upload that, rather than a bunch of separate files. (Doesn't apply to assignments with a single file.)
- 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:
- 2 (correct and good), 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 meeting on campus.
- Short assignments (10%)
Short programming or written exercises to practice the
concepts from one class before the next class.
- 2 (correct and good), 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 (30%)
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 a partner on these assignments (see Collaboration below); each partner should upload the same solution.
- 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.
Penalties: < 8 hours: 10%; < 24 hours: 20%; < 48
hours: 40%; more: no credit.
You are allowed at most one late submission (up to 48 hours) with no penalty; no excuse required. The purpose of this 48-hour "free pass" extension is to cover unusual events that may occur during the term. Use your extension wisely; I will not grant multiple extensions. Indicate in your submission that you are electing to use your extension; no undoing the choice. This cannot be combined with a penalty (e.g., you can't take an 8-hour penalty on top of the 48-hour free pass). If you are working with a partner, this counts as the free pass for both of you.
- Exams (55%)
- There will be two midterms (15% each) and a final exam (25%). I currently plan to hold the exams online this term and will provide specific instructions as we get close to the exam dates.
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
- Some homeworks have specific extra-credit problems; 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 are recorded separately from
other grades, and may be used to help make borderline letter grade
assignments at the end of the term (those with substantial
extra credit would get the higher grade if their grade is on the
borderline). Extra credit points can only help, never hurt, your
final grade, regardless how much or how little extra credit you or
your classmates choose to do. You should not, however, view extra
credit as a substitute for doing good and thorough work on your
assignments, and should not attempt it until you have completed the
main assignment, as it will only be used in rounding borderline
Extra credit will also be given to frequent good contributors to Slack (both asking and answering questions).
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.
Dartmouth's honor code 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 also reserve the right to assign a failing grade for an assignment or an exam if I conclude that the honor principle has been violated, regardless of the finding from the Committee on Standards. If you have questions, ask!
Elaboration (thanks to many CS 1 and 10 instructors over the years)
- On exams, all work must be your own.
- You will work on short assignments individually. Programs that you turn in, however, should be created, typed, and documented, and the output generated, by you yourself.
- 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.
- 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—especially a Mac in Sudikoff—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.
- You should attribute the proper source in any code 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.
- 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 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 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.
- 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.
- 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, but you did not indicated 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.
I will record class sessions on Zoom and will post those videos on Canvas. My plan will be not to record office hours, certainly not one-on-one, but not small groups either. If I think that a question or answer from office hours would be good for the entire class to see, I will prepare a separate note or video, or include it in the next lecture. This is what I do normally in my classes. If I hold a problem session or X hour where the entire class is invited to come prepared with questions, I will record that because it is essentially a class session. But I will probably edit it before posting so that it's quicker for you to rewatch
From the Dean of the Faculty to students regarding recording of class sessions:
(1) Consent to recording of course and group office hours
- a) I affirm my understanding that this course and any associated group meetings involving students and the instructor, including but not limited to scheduled and ad hoc office hours and other consultations, may be recorded within any digital platform used to offer remote instruction for this course;
- b) I further affirm that the instructor owns the copyright to their instructional materials, of which these recordings constitute a part, and distribution of any of these recordings in whole or in part without prior written consent of the instructor may be subject to discipline by Dartmouth up to and including expulsion;
- c) I authorize Dartmouth and anyone acting on behalf of Dartmouth to record my participation and appearance in any medium, and to use my name, likeness, and voice in connection with such recording; and
- d) I authorize Dartmouth and anyone acting on behalf of Dartmouth to use, reproduce, or distribute such recording without restrictions or limitation for any educational purpose deemed appropriate by Dartmouth and anyone acting on behalf of Dartmouth.
(2) Requirement of consent to one-on-one recordings
By enrolling in this course, I hereby affirm that I will not under any circumstance make a recording in any medium of any one-on-one meeting with the instructor without obtaining the prior written consent of all those participating, and I understand that if I violate this prohibition, I will be subject to discipline by Dartmouth up to and including expulsion, as well as any other civil or criminal penalties under applicable law.
Given the online nature of this course, it is required that students have the ability to stream 1 hour of video content each day. We will do our very best to plan for and accommodate any limitations to your access to the required technology. It is impossible for us to plan for every possible technology constraint. Therefore, please let us know what barriers you have to completing the online course as soon as possible. Given current disruptions in the supply chain we would like to plan as far ahead as possible.
Students requesting disability-related accommodations and services for this course are encouraged to schedule a phone/Zoom meeting with me as early in the term as possible. This conversation will help to establish what supports are built into my course. In order for accommodations to be authorized, students are required to consult with Student Accessibility Services (SAS; Getting Started with SAS webpage; firstname.lastname@example.org; 603-646-9900) and to request an accommodation email be sent to me. We will then work together with SAS if accommodations need to be modified based on the learning environment. If students have questions about whether they are eligible for accommodations, they should contact the SAS office. All inquiries and discussions will remain confidential.
The academic environment at Dartmouth 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 your undergraduate dean, Counseling and Human Development, and the Student Wellness Center.
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 before the end of the second week of the term to discuss appropriate accommodations.
While the COVID-19 pandemic has already drastically disrupted this course, it has the potential to result in further personal impact which may prevent you from continuing engagement in the class. This may be due to contraction of the disease by you or a loved one, increased familial responsibilities, financial difficulties, or impacts on your mental/emotional health.
We have structured the course so that these disruptions will not necessarily prevent you from successfully completing this course. First, we will record and post each lecture. This will enable flexible viewing of the course content. Second, we will schedule opportunities for live interaction with the instructor and TAs during diverse times throughout the week. Third, the labs have been designed so that they can be completed at home.
In the event that you are directly or indirectly impacted by COVID-19 in such a way that will affect your performance in the course, it is imperative that you reach out to the instructor as soon as possible. You may also reach out to your undergraduate Dean if that would make you more comfortable. We cannot assist you if we don’t know there is a problem. Our first priority is your health and security. We will work to put you in touch with appropriate resources to assist you. In addition, appropriate accommodations will be implemented.
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.