CS 42: Principles and Practice of Computer Science
Syllabus, Fall 2011
Is This Course for You?
This is an accelerated introductory computer science course, designed
for students with significant computer science and/or programming
experience. We assume that you have taken (and done very well in) AP
Computer Science or a similar introductory computer science or
introductory programming course. We assume you are familiar with
Object Oriented programming, likely in Java. You should be
comfortable programming in at least one real programming language.
This course moves fast and covers a lot of ground, but it is also a
lot of fun, and we get to study some very awesome CS concepts. This
course covers most of the material in both CS 5 and CS 60. After
completing this course you will be eligible to take any course that
has CS 60 as a prerequisite.
If you are unsure about your placement in this class, please speak
with Prof. Stone ASAP. It is
possible to switch to CS 5 Black (which meets at the same time on the
same days), but the earlier you switch to the right section for you,
the better.
Overall Course Aims and Objectives
- Aim 1: To give you a broad understanding of computer science as a
discipline. Specifically:
- Program in many different programming language styles and languages, e.g, Rex, Python, Prolog, JFlap
- Construct finite state automata and Turing machines, show what they can and cannot compute, and understand the significance of these results
- Describe how different programming styles lead to different
approaches to problems.
-
Aim 2: To help you design and develop programs to solve more
sophisticated problems than those previously
encountered. Specifically:
- Understand the difference between data structures and abstract data types (ADTs) and build several data structures for a variety of ADTs
- Design, implement, and test user-interactive programs in various
languages.
Course Mission Statement
CS 42, Principles and Practice of Computer Science, provides the student with a broad overview of the science of computer science, at the same time providing sufficient depth in a number of key conceptual areas that are intended to serve both majors and non-majors well. These concepts include:
- Ways of thinking about solving computational problems
- Ways of creating computational solutions to problems relevant to a variety of disciplines
- How to think abstractly about problems, and how problems are solved by development of appropriate abstractions
- Views of information and data, how these are structured in the computer, and how they are manipulated to achieve desired ends
- Structural disciplines appropriate to computational problem solving, such as decomposition into sub-parts, iteration, and recursion
- Basics of logic applied to computation
- How to create a specification for a program and establish its correctness
- How programming languages are chosen for suitability to solving particular problem classes
- How layers of abstraction are developed in both hardware and
software to make computational problem solving intellectually
manageable
All of these concepts are important in both computer science and
engineering. Programming in a variety of languages is used as a
vehicle to demonstrate concepts. Language choice is not specifically
made to match the often-changing demands of industry. Instead, we hope
that each student gains experience in as wide a range of programming
practices as possible. Underneath each assignment's language are
conceptual points that are language-independent.
The overarching goal is that, at the end of CS42, you'll feel
comfortable programming in any language -- even one you've never seen
before! That is, you will be a savvy computational thinker, not
dependent on any particular technology.
Logistics
- Class Times and Place: Tuesdays and Thursdays,
Dartmouth (Modular Classroom) South
- Course Homepage: http://www.cs.hmc.edu/cs42
- Instructor: Chris Stone
Office: Olin 1251
Phone: 909 607-8975
Email: stone@cs.hmc.edu (the best way to contact me
individually; but see below!)
Office Hours:Monday, Tuesday, Wednesday 4&ndash5pm;
Thursdays 3–4pm, or by appointment
- Graders/Tutors (aka “Grutors”) There are
several grutors for this course whose mission in life (at least some
of the time) is to help convey the wonder of CS 42! They will be
holding regular hours in the Beckman CS labs in B102 and B105 (the
link below has specific hours). They will also be grading your
assignments (but not the exams). A complete schedule of tutoring
hours can be found here.
- Help via E-mail: You can (and should) send short,
homework-related questions to
cs42help@cs.hmc.edu. Both
the intructor and the grutors will get your message, and so this
is the fastest way to get your questions answered.
For more extensive help, please see Prof. Stone or a grutor in person. In
particular, for help with the submission system (a forgotten password,
for example), contact Prof. Stone. For help with the computing system you're
using (your machine or one of the lab machines) your best bet is to
seek out one of the many Mudders who know the system well!
Switching Courses
If you decide that CS 42 is not right for you, you may switch into CS
5 Black. Please do your best to make this decision before the official
add date, otherwise things get very complicated. Talk to Prof. Stone
as soon as you feel that CS 42 might not be the right place for you.
Attendance
On-time attendance at lectures is required in order to pass this course.
If you are ill and cannot attend or an emergency arises, please
contact Dean Jacobsen before the missed class if at all possible (or
very shortly thereafter if not). If you need to miss class for any
other reason, you must get permission in advance from the Associate
Dean for Academic Affairs (Dean Jacobsen).
Your first two unexcused absences will have no impact on your grade.
For each of your next three unexcused absences, you will lose
10% of your participation grade. Your sixth unexcused absence will result in a
grade of "No Credit". There are no exceptions to this rule.
Optional Text
There is no required textbook for this
class. We try to provide everything you need to know in lectures
or via web resources (linked from the References page).
However, some
students might find the following textbooks useful:
Assignments and Exams
There will be an assignment every week (with
exceptions for breaks). Unless stated otherwise, homework is due each
Monday at 11:59 PM. Since we use an automated procedure to determine
submission time, if you submit even slightly after midnight, it will
be recorded as being submitted the next day.
You have three late days or "CS 42 Euros" that you may use at your
discretion -- you don't need to tell us in advance. A late day allows
you to turn in an assignment 24 hours late with no penalty. You may
not use two late days on the same assignment. Late homeworks will not
be accepted once these late days have been used. In cases of illness
or emergency, you should contact Dean Jacobsen to arrange an extension
and have him contact me.
In addition to weekly assignments, there will be two midterm exams
and a final exam. See the exam schedule
page for up-to-date details.
Attendance
On-time attendance at lectures is required in order to pass this
course.
If you are ill and cannot attend or an emergency arises,
please contact Dean Jacobsen before the missed class if at all
possible (or very shortly thereafter if not). If you need to miss
class for any other reason, you must get permission in advance from
the Associate Dean for Academic Affairs (Dean Jacobsen).
Your first two unexcused absences will have no impact on your grade. For each of your next three unexcused absences, you will lose 10% of your participation grade. Your sixth unexcused absence will result in a grade of "No Credit". There are no exceptions to this rule.
Optional Text
There is no required textbook for this class. We try to provide
everything you need to know in lectures or via web resources (linked
from the References page).
However, some students might find the following textbooks useful:
Grading
This course is considered a first-year course, and is graded
on a Pass/No Pass scale. There are three graded components of
this course, weighted as follows:
- Assignments (~100 points each × 12 = 1200 points)
- Exams (2×150 point midterms + 1×300 point final = 600
points)
- Participation (200 points total)
Using the point values above, you will see that the breakdown is
roughly 60% of your grade for assignments, 30% for exams, and 10% for
participation.
Final grades are computed with this Racket code as our rough
guideline (exact boundaries subject to change). Note that letter grades will be provided for your
information only, and they will not be recorded.
(define (score p)
(cond
((>= p 0.97) "High Pass")
((>= p 0.70) "Pass")
(else "We hope not to have to use this option"))
IMPORTANT GRADING NOTES:
-
You must independently pass each
component of this course to pass the course as a whole. This
means:
- A score below 70% on the homework or the
exams will result in a grade of “No Credit”
- More than 5 unexcused absences
will result in a grade of “No Credit”
- Borderline grades may be moved up or down based on
exemplary or particularly poor performance in some aspect of
the course.
-
We will use guidelines in grading the programming assignments
which
will be approximately as follows:
- 70% of the points will be given for a program that meets the
exact specifications of the assignment.
- 30% of the points will be given for good design, style, testing
and robustness. Good design and style means, for example, that your
program is divided into small logical functions, new classes are
defined and used when appropriate, and the program uses efficient
algorithms and data structures. Your program should also be robust in
the sense that it handles minor aberrations in user input, though
extensive input error-checking is not required unless so specified.
Finally, the code must be readable and well-documented.
We will try to give you very clear feedback indicating what could be
done to improve the program. If the feedback isn't entirely clear to
you, please talk to Prof. Stone or one of the grutors.
- Participation includes good-faith effort on our in-class “quizzes.”
Actual results on those
quizzes do not matter at all. Attendance also counts towards
participation, as does answering questions (or asking good questions).
Collaboration Policy/Pair Programming
For most of the programming assignments you will be permitted to “pair
program” on some problems if you wish. The rules and guidelines
for pair programming
are as follows:
- Both members of the pair must be at the same computer
together while collaborating. One student will be the "driver" who
controls the keyboard and mouse. The other is the "navigator"
who observes, asks questions, suggests solutinos, and thinks about
sligthly longer-term strategies. It is not
permissible for one member of the pair to work on the code while his or
her partner is not there participating actively.
- The person typing at the keyboard must be swapped
every 30
minutes. Please be vigilant about this.
- You must work with the same partner for the entire
assignment. You may switch partners between assignments.
(Sometimes this is required. See below.)
- Only one partner needs to submit a pair
programming file.
That file should include a comment on top of each submitted
file that indicates that this was a pair effort and should give the
names of both members of the pair. This will help ensure that the
graders know where all of the files are.
- Periodically, we will announce that its time to
switch
partners (sort of like in square dancing!). At that point, you may
choose a different partner but may never go back to program with an
earlier partner.
- To “learn the do's and don'ts” of
pair programming and
to see pairs in action, view this entertaining video about pair
programming
from North Carolina State University: An
Introduction to Pair Programming for Students
Now that you know the rules, here are some pair programming
guidelines to help you get the most out of your experience:
- You should try to choose a partner whose skill level is
similar to your own. We realize this may be difficult to
judge, but we've found that partnerships are most productive when pairs
work at about the same level.
- If you and your partner have different experience levels, it is
extremely important that the
more experienced partner does not simply take over. Both experienced
and inexperienced students will need to draw on their reasoning and
problem solving skills. A more experienced partner may sometimes feel
frustrated or slowed down by a less experienced partner, but the
experienced partner still benefits from the teamwork in many ways. The
less experienced partner's requests for clarification often uncover
flaws in an approach or solution; the exercise of providing a clear
explanation solidifies and deepens the explainer's own understanding
and the teamwork and communication skills they gain have great value
in both the academic realm and the job market.
“My
partner had never coded anything before so I was able to
teach him
a little bit about how it worked. The teaching bit helped me a lot
with
understanding
the labs and passing the
exams.” —a CS student
The less experienced partner may feel that questions hold the other
partner back or that there is no benefit to participating actively,
but pair programming studies show that paired work is consistently
better than work the stronger partner does alone. It is each partner's
job to understand the whole task; that means asking questions when
necessary and answering them when possible.
- Pair programming is shown to help, not hinder, your successful
completion of this course, so we strongly encourage you to use it. It
is important that you understand the processes and expectations up
front so you can gain the most benefit. If you are unsure of any of
the aspects of pair programming and how it is implemented in the
course, see Prof. Stone right away.
Whether you are programming individually or as a pair, there are a
few important rules regarding cooperation. You are always welcome and
encouraged to discuss approaches to solving homework problems
with any classmate, the grutors, or Prof. Stone. You may not share any written/typed materials of any
kind. In particular, you may not send or receive code that is
related to this course by e-mail, on the web, from another person's
file or printout, or in any other form. This rule applies to two
people working as a pair with the following exception: The code may be
sent by e-mail from one member of the pair to the other after the code
is submitted for grading. Moreover, the pair may print out a copy of
their code to work on together.
You may wonder if it is permitted to help a classmate (other than
your partner if you are pair programming) debug a program and, in the
process, look at their code. This is permitted, assuming that it is
done with the intent of helping your classmate learn, and not with
intent of gleaning code that might be used in your own program, or
with the intent of simply giving away answers. Use your good judgement
here. If you're not sure about what's appropriate, please talk to
Prof. Stone.
All conduct in this course should
be conducted in accordance with the Harvey Mudd Honor Code. If you
are an off-campus student and unfamiliar with the honor code, please
talk to Prof. Stone.
Students with Disabilities
The college is committed to complying with the Rehabilitation Act of
1973 and the Americans with Disabilities Act of 1990 by providing
reasonable accommodations for students who are disabled. Students
requiring specific accommodations for a physical, psychological,
medical or learning disability should contact the Dean of Students at
909 621-8125. The Dean will review your concerns and determine, with
you, what accommodations are necessary and appropriate. All information
and documentation of disability is confidential.