CS 10 is the second prerequisite for the Computer Science major and minor. It covers fundamental concepts in computer science, in two broad areas: object-oriented programming and data structures. In particular, we'll use object-oriented programming to implement data structures. We'll understand why the data structures work and analyze their efficiency. We'll also lean heavily on abstraction, so that we can separate the what from the how.
Now, data structures can be cool on their own, but they're even better when we apply them to solve interesting problems. That's what we do in CS 10.
Here's the ORC description of the course:
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.
Scot Drysdale
Office: 248 Sudikoff
scot@cs.dartmouth.edu
646-2101
248 Sudikoff
If you'd like to meet with me outside of office hours, please contact me and we'll set up a time.
Additionally, if my office door is open and I'm not obviously engaged in something, feel free to knock and drop in. If I'm busy, I'll let you know nicely. I try to be highly available to students.
Keith Carlson
Keith.E.Carlson.GR@dartmouth.edu
Office: 108 Sudikoff
Phone: 6-3297
Office hours: Tuesdays 1:00-2:00 and Thursdays 4:00-5:00
Charlotte Blanc
Erin Connolly
Tyler Crowe
Ali Dalton
Stephanie Her
Jonathan Huang
Andrew Kim
Juan Torres
Joshua Utterback
Yifei (Shawn) Xie
In order for you to take this course, you must have fulfilled one of the following prerequisites:
If you do not have any of the above prerequisites, you should see Professor Drysdale as soon as possible.
I need to know a little about you. Please fill out this questionnaire and send it to me as soon as possible.
We will occasionally use x-hours, so keep the x-hour times available for this course. In particular, this we will use the x-hour this Thursday to replace the class cancelled for MLK day and a later x-hour as a midterm review. However, I reserve the right to schedule other x-hours as the need arises.
I like it when you ask questions in lecture. I really do. I understand that it can be intimidating to raise your hand for a question in a fairly large lecture, but please do not hesitate to ask questions. Don't worry about what anyone thinks of you for asking questions. I'll think more of you if you understand the material, and if you need to ask questions, that's fine. And don't worry about what the other students might think. 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!
If you still are reluctant to ask a question in lecture, even after all the encouragement in the last paragraph, feel free to write it down and ask me, the TA, or any section leader after class, by email, in office hours, or in lab hours. We want to help you!!
Occasionally, I might elect to answer a question later or after lecture. That will usually be because the answer to the question is tangential to the material we're covering, or simply because I am pressed for time. But please feel free to ask; I'll let you know nicely if I cannot answer the question then and there.
You are invited to attend a one-hour recitation section meeting each week. Attendance is optional. The potential times for section meetings are Wednesday afternoons and evenings, and Thursday mornings, afternoons, and evenings.
Download this form, and follow the instructions. You must fill it out and email it to the TA Keith Carlson by 1:00 pm on Thursday, January 7, even if you don't intend to ever attend a recitation section. (That's because, as in CS 1, your section leader will also be your grader.) The recitation section schedule will be determined later that day, and your section assignment will then be posted on the Recitation Sections page on the Canvas site. The first recitation sections will meet the week of January 11.
We recognize that occasionally (which means "not on a regular basis"), you might not be able to attend the recitation section to which you have been assigned. In that event, please find another section to attend that week. Make sure that your regular section leader knows that you'll be attending another section, and make sure you get permission in advance from the section leader whose section you'll be visiting.
There is no fixed scale for assigning letter grades. The median grade for the course is usually a B+, but I make no guarantees in advance. The median grades depend on you.
There will be a midterm exam on Thursday, February 11, 6:30 pm to 9:30 pm in LSC 100. If a scheduling conflict prevents you from taking the midterm exam at the scheduled time, you must let me know by 5:00 pm on the preceding Monday (February 8). No exceptions.
The final exam is scheduled by the Registrar. It is scheduled at 11:30 on Saturday, March 12 in 104 Wilder.
Before each exam, I will post a web page to help you review. There will also be a review session before each exam.
Each of the two exams counts 20% of your final grade.
Short assignments are relatively brief exercises that you will turn in at the next Monday, Wednesday, or Friday class. In some cases, you might have two classes to work on a short assignment. Short assignments will usually consist of one or two short programs to help you understand the concept being covered.
You will submit short assignments through the Canvas site. They will have a timestamp, and so we will know when you submitted them. They are due at 10:00 am sharp on the day that they are due. If your short assignment comes in at 10:01 am, it is late. Short assignments handed in late will receive no credit.
Your section leader will grade your short assignments on a scale of 0, 1, or 2.
You may resubmit up to five short assignments on which you get a 1. If you resubmit a short assignment, you may resubmit it one time, and you have to resubmit by the start of the next Monday/Wednesday/Friday class after you got back your original assignment. When you resubmit a short assignment, we ask that you do a two things as a courtesy to your section leader. First, please make it clear that it is a resubmission. Second, send an email to your section leader to let him or her know that you have resubmitted. You are allowed to look at the sample solution before resubmitting, but should not simply copy it.
In-depth lab assignments will be due on certain Wednesdays through the course; you will usually have one week to work on each lab. You are not required to complete the lab assignment in the lab. You may use your own computer wherever you like, just as you do for short assignments.
Lab assignments require a significant time commitment. Start early, and if you need to, get advice from me, the TA, or a section leader. Remember that you can get help at lab hours.
Like short assignments, you will submit lab assignments via Canvas. They are due at 10:00 am on the day they are due. If your lab assignment comes in at 10:01 am, it is late.
If you hand in a lab assignment late but by 5:00 pm the day it's due, we will deduct 10%. If you hand it in between 5:00 pm the day it's due and 5:00 pm the next day, we will deduct 30%. We will not accept it after 5:00 pm the next day, and you will get 0.
There are two ways that you can get an exemption from this lateness policy. First, if something happens beyond your control that prevents you from doing your assignment on time, then we can excuse a late assignment. Second, you may be able to arrange in advance to submit your assignment late. You will need a good reason to do so. Note that you need to ask in advance. The day the assignment is due does not count as "in advance." Only Professor Drysdale is authorized to excuse late assignments. Neither the TA nor any section leader is authorized to excuse late assignments.
Yes, this lateness policy is harsh. Why? Because in the past, those who have fallen behind have had a devil of a time catching up. So we are trying to prevent you from falling behind. Yes, 30% off for a lab assignment handed in at 5:01 pm sucks. In the past, students have complained that they could have handed in something substandard on time and gotten more points than if they had handed in something really good a little late. Unfortunately, the Real World works this way as well. Imagine showing the World's Best Software…a week after the trade show. It is up to you to plan your time carefully and get your work in on time!
I am, however, not a complete ogre. We will give you a discount on one unexcused late lab assignment submission. There are three possibilities:
If you submit a problem set late you are not allowed to look at the posted sample solutions until after you submit your solution.
Everything will be submitted through Canvas. 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 the Grab utility on a Mac or the PrntScrn button on Windows.
If an assignment requires you to submit multiple files, zip all the files into a single zip file and submit that. If you have to revise your submission, submit your new zip file once more, with V2 appended (V2 for Version 2, V3 for Version 3, etc.); only the last version will be graded.Much of the learning in this course comes from doing the programming exercises. On some lab assignments, you may work jointly with one other person, if so stated. 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 submit a single 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, although you may work with different partners on different assignments.
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.
I suggest that you borrow a practice from Extreme Programming, a method of writing code that many businesses find quite effective. It is called Pair Programming. 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. 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 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.
Some of the assignments may suggest extra credit work. Extra credit in this course will be tallied separately from regular scores. If you end up on a borderline between two grades at the end of the course (or are being considered for a citation), extra credit will count in your favor. Failure to do extra credit will never be counted against you, however. You should do extra credit work if you find it interesting and think that it might teach you something. It never pays to skimp on the regular assignments in order to do extra credit problems.
One corollary of the way in which we count extra credit is that if you get a 30 on a lab assignment and also 5 points of extra credit, that is not the same as getting a 35 with no extra credit. The latter—35 points with no extra credit—is far better.
Sample solutions for all of the homework assignments will be posted under the "File" tab in Canvas after the assignment is due.
There are many ways for you to get help. You can visit me or the TA during office hours, you can go to 003 Sudikoff when course staff is there, or you can make an appointment with me, your section leader, or the TA. You should also feel free to ask for help by email. You can email a specific person, including me. For a faster response, you can get an answer from the first member of the course staff (again including me) to read your message by emailing to
This account is a mailing list consisting of me, the TA, and all section leaders. (Note that you have to put cs. after the @ in the address.) We will try to respond as soon as possible.
If you visit me or any of the course staff for help with a program that you are writing, make sure that you can get to an electronic copy of your program. That way, we can try to compile and run it. It's nice to have a printed version of your program, but we cannot compile and run a printed version.
When you email a program to one of us, you just need to add your program as an enclosure to your email, along with additional information as to what problems you have observed. When you email a question, please be as specific as possible, and tell us what you've done to try to figure out a solution for yourself. We reserve the right to not answer emails that say nothing more than "My program doesn't work; where is the problem?" Make sure you send your program as an enclosure; do not copy and paste your program into the message.
If you have a question that does not require you to attach your code, then you might find Piazza to be a better source of help. Other students in the course can give you answers to your more conceptual questions, and you might find the answer already posted there. Never include your own code in a post to Piazza.
You can sign up for Piazza via this link: https://piazza.com/dartmouth/winter2016/cs10/
Once you are signed up you can participate via this link: https://piazza.com/dartmouth/winter2016/cs10/home
The Tutor Clearinghouse is another source of help. They will have private, one-on-one tutors available for this class. The tutors are recruited on the basis that they have done well in the subject, and they are trained by the Academic Skills Center. If you are on financial aid, the College will pay for three hours a week of tutoring. To get a tutor, go to 301 Collis and fill out an application.
Several days per week, there will be course staff in 003 Sudikoff to lend a hand with assignments or anything else you would like help with.
003 has a number of Macs that are available for your use.
You might find it useful to do some of the assignments right in the lab. Many of the problems that will stump you and waste your time if you are working alone can be cleared up in moments by the course staff. Then again, you might not find it useful to work in the lab, depending on how many of your fellow students are competing with you for machines, seats, and the attention of the course staff.
Please prepare before going to lab; course staff can be much more helpful if you've already made a solid effort at solving the problem you are working on.
003 Sudikoff is locked at all times, but if you're registered for CS 10, you should be able to get in with your Dartmouth ID. The entrances to Sudikoff are locked after 6:00 pm, but if you're registered for CS 10, you should be able to get into the building with your Dartmouth ID. The second floor of Sudikoff also requires card access after 6:00 pm, and again, your Dartmouth ID should get you in, if you're registered for CS 10.
Note that there are several restrictions that come with access to Sudikoff. Among them are that you are not to lend your Dartmouth ID to anyone else in order to allow them into the building or labs. Also, you must not bring food into 003. You may eat at the tables in the hallway outside the lab. Food in the labs can make the keyboards darned unpleasant to use, and it can even render machines unusable.
The main textbook is Data Structures and Algorithms in Java, 6th edition, by Michael T. Goodrich, Roberto Tamassia, and Michael H. Goldwasser. You can get it from Wheelock Books, can purchase or rent it though Amazon, or you can purchase an e-book version directly from the publisher, Wiley.
A secondary textbook is free on web: Problem Solving with Data Structures: A Multimedia Approach, by Guzdial and Ericson. (This is the first 4 chapters of a preliminary version of a book that they are writing.) We will be using this early in the term.
We will be using Eclipse Java IDE, Mars Release. (Yeah, that mumbo jumbo doesn't mean anything to me, either.) This software is a free Integrated Development Environment (IDE) that runs on both Windows and Mac OS X. You will install this software on your own computer as part of the first short assignment.
In class I will sometimes use the interactive programming environment DrJava to demonstrate concepts. It has an Interactions window, where I can type commands and immediately see results. You are free to use DrJava yourself, if you wish. It may be easier to do the first assignment or two in DrJava, but later assignments are usually easier to do in Eclipse. The first short assignment will ask you to install both on your computer.
Unfortunately for Windows users (and, yes, we know that many Dartmouth students have opted for Windows), the Mac will be the "primary" machine supported. The CS undergraduate lab for this course contains only Macs. I use a MacBook Pro. Some of the course staff have experience with Windows, however, so you may find it a good idea to ask them your Windows-specific questions. Because I don't run Windows, I will be unable to help you with Windows-specific problems. Indeed, one great asset of our course staff is that many of them can help you with Windows issues.
Note that you can always email your program to yourself. So even if you normally run Windows but you want to work on a Mac in the lab, you'll be able to work on your own code.
All documents, class examples, lab assignments, short assignments, and sample solutions related to the course will be on the web. I will also post class notes (although they are notes, and not intended to be a textbook). You can get at them through Canvas, or you can dial direct and go to http://www.cs.dartmouth.edu/~cs10/. Presumably you know how to find the web pages, since you're reading this one. The first short assignment tells you how to find the CS 10 information on the web.
On exams, all work must be your own. You should work on short assignments alone, but you can get help from the course staff and can discuss the assignment with classmates during the design phase. Programs for short assignments should be created, typed, documented, and output generated, by yourself. For the lab assignments, you may consult freely with instructors and classmates during the phase of designing solutions, but you should then work individually (or with a single partner, when allowed) 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. If you work with a classmate on any assignment, you should tell us who you worked with in a comment at the beginning of your program.
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. And it even includes code that you take from class examples, the textbook, or the assignments. (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. Also, code that we distribute will usually have an author at the top. Just add your name, saying "modified by Jane Doe to solve Lab 1" or whatever.)
If you resubmit a short assignment and use code from the published solution (or even look at the sample solution to get ideas), you should attribute that. 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 professor 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 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 have had some uncomfortable situations occur in the past, and I want to make it clear what the policy is. Two students, Alice and Ralph, discuss an assignment and design their code 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. Trixie and Ed start working independently on a program. Trixie finishes and has a working version. Ed has trouble with his. Trixie helps Ed debug. That is fine. But then Trixie 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. Or worse, she gives Ed an electronic copy of her program so that he can just paste in the correct code. Either action 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 when we let you collaborate to a limited extent. 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 question 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 find 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 you copy any portion of your program from your friend Elvira and represent it as your work, 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 COS 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.
You don't need to cite if you wrote the code yourself. You don't need to cite just because you're
using a construct you saw elsewhere. For example, you need not cite for using
System.out.println("Hello")
, even though it was in the class examples. That
would be like citing "printing press" in an essay! Nor do you have to cite just because
you use a while-loop, even though you saw a while-loop in a class example. It's when you lift several
lines of code from elsewhere that you need to cite.
To cite, include in a comment—near the top of your file is fine—stating where you got the code from:
// Based on code from page 66 of the textbook.
Please do not cheat. Cheaters—whether or not they are caught—bring dishonor upon themselves and upon everyone else at Dartmouth. To do that, for just a few lousy points in a course, is [insert your favorite strong adjective meaning "stupid" here]. Furthermore, if you cannot solve the short assignments and lab assignments on your own, then you will have trouble with the exams.
I have served on the COS, and I have seen what happens to students who are caught cheating: they take an involuntary vacation from Dartmouth for several terms. I have brought several Academic Honor Principle cases to the COS, and I hate having to do so. Please don't make me.
If you are working on a computer that is not yours—especially a Mac in 003 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.
To remove your code, you'll want to delete it from the Eclipse workspace. And you'll also want to move any other copies on the computer to the Trash (or the Recycling Bin) and empty it.
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.
I encourage students with disabilities, including "invisible" disabilities such as chronic diseases and learning disabilities, to discuss with me after class or during my office hours appropriate accommodations that might be helpful to you.
Students with disabilities enrolled in this course and who may need disability-related classroom accommodations are encouraged to make an appointment to see me before the end of the second week of the term. All discussions will remain confidential, although the Student Accessibility Services office may be consulted to discuss appropriate implementation of any accommodation requested.
Read the material I ask you to read, and follow the instructions. Many students have wasted a lot of their valuable time, and their grades have suffered, simply because they did not follow directions.
Start all assignments early. With few exceptions you'll know everything you need to do an assignment at the time that you get it. There is no reason to procrastinate. If you start early you will have enough time to get stuck, put the assignment aside, and later get help from the course staff. You will be able to do that several times during the week (when we usually are not very busy). That works better than trying to get help the night before the assignment is due (when we are often very busy, with waiting lines.)
At the same time, do not be afraid to get help. The purpose of this course is not to waste your time. If you are spinning your wheels and not making progress on a problem, please see me, the TA, or a section leader. We can point you in the right direction without giving away the store.