dh courses


Instructor: Zachary Dodds
Institution: Harvey Mudd College
Next HW:    Gold HW 11    will be due on: Sun., Apr 19, 11:59pm
Next Lab: Lab 11: vPython!    will be held on: Mon. April 13 or Tue. April 14
Submissions: CS submission site

CS 5 Course Syllabus

Welcome to CS 5! This course is designed to give you a broad introduction to the exciting, and sometimes misunderstood, field of computer science.

Course Aims and Objectives

This course has two central aims, each with a number of associated objectives:

  • Aim 1: To give students the tools to take a computational problem through the process of design, implementation, documentation, and testing.Objectives:
    • Break a broad problem down into specific subproblems
    • Write an algorithm to solve a specific problem, and then translate that algorithm into a program in a specific programming language (Python)
    • Write clear, concise documentation
    • Develop test cases that reveal programming bugs
  • Aim 2: To give students an understanding of the breadth of Computer Science as a discipline and how it exists in the world.Objectives:
    • Identify applications of computer science in society
    • Describe the big questions in computer science
    • Describe the relationship between a number of major sub-disciplines within computer science, including functional and imperative programming, computer architecture, and theoretical computer science

Content Overview

In brief, the material CS 5 covers is a superset of the following:

Week 0 Introduction to computation: CS, Python, and Picobot
Week 1 From data to information: strings, structures, and slicing
Week 2 CS’s fundamental building blocks: functions
Week 3 Self-similarity as design strategy: recursion
Week 4 Top-down vs. bottom-up problem solving: analysis and synthesis
Week 5 Computation’s physical building blocks: circuit design
Week 6 The nonliving world’s native tongue: assembly language
Week 8 Iteration in Python: repetition through loops
Week 9 Serious structures: nested loops and dictionaries
Week 10 Self-defined structures: objects and classes
Week 11 Piecing everything together: large-scale problem solving
Week 12 Piecing everything together: final projects
Week 13 Theoretical CS: state-machine models of computation
Week 14 Theoretical CS: provably uncomputable vs. currently uncomputable functions

Basic Information

Each week, this class consists of two 75-minute lectures and one 2-hour lab. The lab is optional, but highly incentivized – don’t miss it!There are three sections of CS 5.

  • CS 5 “Gold” is intended for students with little or no prior programming experience.
    • For the record, CS 5 “Gold” is also the Spring section of CS5
  • CS 5 “Black” is intended for students with prior programming experience (e.g. high school AP).
  • CS 5 “Green” is a course that presents computer science via a biological context and motivations

All sections of CS 5 provide the same foundational skills and will prepare you equally well for CS60 or other CS pathways you might choose.

  • Lecture Times and Locations:
    • CS 5 Gold: Big Shan (Shanahan 1430) M/W 1:15-2:30pm, Dodds
  • Lab Times: CS 5 has shared labs. CS 5 green has its own lab (Friday afternoons), and CS42 does not have a time designated specifically for lab work. Regardless of these formal lab times, there are many hours each week in which labs are staffed by student assistants – use them! Here are the 2015 lab times for CS5 gold:
    • Lab Section 1, Mondays, 2:45-4:45pm (CS 5 black and gold sections)
    • Lab Section 2, Mondays, 8-10pm (CS 5 black and gold sections)
    • Lab Section 3, Tuesdays, 2:45-4:45pm (CS 5 black and gold sections)
    • Lab Section 4, Tuesdays, 8-10pm (CS 5 black and gold sections)
  • Lab Location: The CS labs are in HMC’s Beckman B126, Beckman B101, B102, and B105 along HMC’s “CS hallway”
  • Lab attendance:
    • Labs are not officially required (we can’t do that for a three-unit class).
    • However, they’re incentivized: if you come to lab and give a full effort on the lab problems, you will receive full credit for those problems, even if you do not complete them
    • More importantly, they’re a great way to get guidance with new/unfamiliar challenges!
    • As long as there’s room (and there usually is), you are welcome to attend any of the CS lab sections without formally switching with the registrar.

Instructor Information

Zach Dodds

Course Content


There are two 75-minute lectures per week. Attendance at these lectures is important: during lecture, you will sometimes be asked to complete a short worksheet to get some initial practice with the material. Completion (not correctness) of these in-class exercises is part of your course grade.


Each week you have the option to attend a two-hour closed lab session. The labs are run by the course faculty and grutors (student graders/tutors). They provide a great opportunity for you to practice with new material on some fun problems in a supervised setting.Attendance at labs is not required, but we strongly encourage you to attend! Specifically, we incentivize the labs as follows:

  • if you attend lab and make a good-faith effort throughout, you will receive full credit on the lab problem(s) – which are always part of the week’s homework problems – even if you do not complete it within the two-hours.
  • we encourage you to complete the lab in your own time so that you can fully learn the material, but this is not required
  • if you don’t attend lab, the lab problem(s) are graded as usual, as part of that week’s homework assignment.

You’re encouraged to bring your laptop computer, if you have one, to lab. Using the guest accounts on the lab Macs, of course, is equally encouraged!


Each week you will be assigned a set of homework problems. These problems will be due on Monday evenings at 11:59pm, unless otherwise indicated.

Pair Programming/Partner programming

  • We use the term pair programming to describe a team of two people working on a single computer to solve a problem together.
  • We use the term partner programming when two people are working, each on their own computer, to solve a problem together.

Typcially, assignments contain one or more “individual” problems that each student must complete on their own.

For the rest of the problems, you may complete them alone or with one other student. If you choose to work with another student, you may pair program (one computer) or partner program (each with a computer). You and your partner will submit only one solution for each problem.

If you choose to work with a partner, you must work together — physically, in the same place — for every problem that you do together. While you are working, the computer screen(s) should be visible to both people. If pair programming, one person should type (the “driver”), while the other person observes, critiques and plans what to do next (the “navigator”). You should switch roles periodically, about every half-hour or so. Your overall solution must be a true joint effort, equally owned, created, and understood by both students.

Specifically, splitting up the problem(s) into parts and working on them separately is not permitted and violates both the letter and the spirit of the HMC (and 5Cs) honor code.

In the event that you and your partner make some progress together but then are unable to complete the assignment together, you may send each other the code that you developed together and then split up to work individually on the remainder of the program. You would then submit the problem individually, but should make a note along with the submission that this had happened. We expect that this will only occur in rare circumstances, such as when one member of the team falls ill.

Late Homework Policy
Homework is due on the day indicated (Sundays, for 2015) at 11:59 PM. At the beginning of the semester you will receive three CS 5 Euros (which has been losing value recently, so that we are considering a switch to bitcoin…). Each “Euro” provides one 24-hour extension on any one homework assignment, i.e., a “late day.” If you submit your homework after the deadline, you will automatically be charged a CS 5 Euro.

You do not need to tell us that you’re using a “Euro” extension — the submission system will notice that based on your submission time and “bill” your virtual account a Euro. Homework that is more than 24 hours late or submitted after the deadline when no CS 5 Euros remain results in undefined behavior.

In extreme circumstances (such as serious illness), if you require an additional extension or a longer extension, you should talk to your instructor and the Dean of Students.


There will be one midterm exam and one final exam. The exams are in-class and closed-book. However, you are allowed to bring one double-sided sheet of notes (hand-written or word-processed) to the midterm and two such sheets to the final exam. You will have 75 minutes to complete the midterm, and three hours to complete the final. If you require extra time for medical reasons, please let us know.

Here is the CS5 exam schedule (and the Claremont-wide schedule)

Midterm Final Exam
Wednesday, April 1, 2015 (in-class) Friday, May 15, 2015 @ 2pm
Here is the official final-exam schedule

Reading assignments

Throughout the semester, several assignments have a portion that involve completing a short reading and writing a short response. These readings describe real-world applications — and visions — for various facets of computer science.

Final Project

During the final three weeks of the semester, you will complete a final project. You’ll choose your project from a small set of open-ended problems that we will present toward the end of the semester; more details on these project options will emerge as the semester progresses.


Your grade for this class will be a combination of your homework, exam, and participation work. Participation is largely based on effort (not correctness) of the in-class exercises/worksheets. Lab and project grades will be incorporated into the homework score. Each homework assignment is worth ~100 points. The midterm is worth ~100 points, and the final is worth ~200. In-class worksheets, i.e., participation, are also worth ~100 points.Based on these point values, the approximate weight of each component is:

  • Homework/Projects: 65%
  • Exams: Midterm 10%, Final 20%
  • Participation/in-class worksheets: 5%

If you’re a first-term HMC student, your grade will be recorded officially as High Pass, Pass or Fail, but your internal composite course score will be calculated through the semester for your information. Usually about a quarter of the class earns an HP, though it varies. If you’re not a first-term HMC student, it’s certainly possible to take CS5 pass/fail, but it is graded by default. We use a pretty standard scale for letter grades; here, expressed in Python:

if perc >= 0.95: letterGrade = 'A'
elif perc >= 0.90: letterGrade = 'A-'
elif perc >= 0.87: letterGrade = 'B+'
elif perc >= 0.84: letterGrade = 'B'
elif perc >= 0.80: letterGrade = 'B-'
elif perc >= 0.77: letterGrade = 'C+'
elif perc >= 0.74: letterGrade = 'C'
elif perc >= 0.70: letterGrade = 'C-'
elif perc >= 0.60: letterGrade = 'D'
else: letterGrade = 'F'

Important! Additional requirement for HMC first-years in CS5
If you’re an HMC student taking the course pass/fail, to pass CS 5 you must have a passing grade on each of the three individual components of the course (exams, homeworks, and worksheets). If you fail one of these components, you will not pass CS 5, even if your weighted-average scores are mathematically above the passing threshold.

Honor Code

All solutions and code should be produced by you alone, or by you and a partner, where appropriate. For pair-programmed assignments, each partner (or member of the pair) must be equal co-owners of the work.

You may discuss algorithms at a high level with any student in the class. You may also help any student find small bugs (syntax issues) in their code. However, you may not copy solutions from anyone, nor should you collaborate beyond high-level discussions with anyone who is not your partner. For pair programming problems, you must follow the guidelines given above.

If you have any questions about what behavior is acceptable, it is your responsibility to come see one of the instructors before you engage in this behavior. We are more than happy to answer any questions you may have.