General Course Information
Author: P. N. Hilfinger, Josh Hug, and a host of TAs.

A. Introduction

Welcome to CS 61B. The CS 61 series is an introduction to computer science, with particular emphasis on software and machines from a programmer's point of view. CS 61A covered high-level approaches to problem-solving, providing you with a variety of ways to organize solutions to programming problems as compositions of functions, collections of objects, or sets of rules. In CS 61B, we move to a somewhat more detailed (and to some extent, more basic) level of programming.

As in 61A, the correctness of a program is important. In CS 61B, we're concerned also with engineering. An engineer, it is said, is someone who can do for a dime what any fool can do for a dollar. Much of 61B will be concerned with the tradeoffs in time and memory for a variety of methods for structuring data. We'll also be concerned with the engineering knowledge and skills needed to build and maintain moderately large programs.

B. Background Knowledge

This class assumes you have taken CS61A or E7, or have equivalent background to a student who has taken one of these courses. Students coming from E7 may find the beginning of the course to be a bit scarier, particularly when it comes to object-oriented programming.

We assume you are coming in with zero Java experience. Nonetheless, we will move through basic Java syntax quickly. Some of you may have thought that the stuff you learned in CS 61A was mere esoteric fluff inexplicably thrown at you to weed out the faint of heart. Not true. In fact, although the syntaxes of Java, Python, and Scheme are enormously different, the underlying computational models are surprisingly similar. You will find that almost all the "big ideas" you see in Java had their analogues in what you learned in CS 61A (indeed, one self-test of your understanding of the course material in CS 61B is to check that you see all the similarities).

If you already have Java experience, great! We hope that you'll help out your fellow students in discussion, lab, and on Piazza, particularly in the opening weeks when everyone is catching up on Java.

It would be nice, though not absolutely necessary, to have some UNIX experience before the semester starts. All the instructional machines for this course will be running various flavors of the UNIX operating system (generally, Ubuntu) and it's a really good idea for you to become familiar with it. There will be online resources for learning Unix linked from the first lab. We will also announce on-campus help sessions on the announcements section of this website. If you'd like a physical reference, you might try Linux Command Line and Shell Scripting Bible by Richard Blum and Christine Breshnahan, which is fairly recent and positively reviewed. You'll find several other books on the topic on Amazon.

C. Is This the Right Course for Me?

This is a course about data structures and programming methods. It happens to also teach Java, since it is hard to teach programming without a language. However, it is not intended as an exhaustive course on Java, the World-Wide Web, creating applets, user interfaces, graphics, or any of that fun stuff.

Some of you may have already had a data structures course, and simply want to learn Java or C++. For you, self-study may be a better option. A little web searching will turn up various resources for learning new programming languages.

Finally, the 1-unit self-paced course CS 47B is for students "with sufficient partial credit in 61B," allowing them (with instructor's permission) to complete the 61B course requirement without taking the full course. Mail to for the necessary permission, sending a description of your previous courses with detailed descriptions of course projects (or links to this information).

D. Course Materials

The optional textbook for the first seven weeks of this course is Head First Java, 2nd Edition by Sierra and Bates (O'Reilly, 2005). This book is recommended to those of you with no Java experience. It's an easy read and super cheap for a textbook. There are also some on-line notes about Java from which we'll assign some readings.

For the second part of the course, we'll use another set of on-line notes about data structures. There are numerous other sources you may find useful, notably Algorithms, 4th Edition.

Both textbooks for this course are optional. Homework will not be assigned from them, and alternative readings will be provided when possible.

Head First Java is not a reference book (it says so on page xxii). The official description of the Java core language is available online in [The Java Language Specification] by James Gosling, Bill Joy, Guy Steele, Gilad Bracha, and Alex Buckley. It's extremely thorough and easy to read (once you understand how to read it).

E. Course Communication

The course home page will provide one-stop shopping for course information. The course schedule as well as all handouts, homework, labs, FAQs, etc., will be posted there.

Our discussion forum this semester will be Piazza. Course staff will post weekly announcements and other essential course communications here, so make sure that you have access and check Piazza often. For most questions about the course, Piazza is the right place to ask them. The course staff read it regularly, so you will get a quick answer. Furthermore, by posting online as opposed to emailing us directly, other students benefit by seeing the question and the answer. Don't forget to check Piazza before asking your question, just in case someone else has already posted it. You won’t be able to post privately on Piazza, so do not use Piazza for problems specific to you (wrong scores, personal issues etc.); use email. Please read the Piazza Guidelines and Tips for more information on what you should and should not post.

The email address will send a message to the course staff (PNH and the TAs). You can use it for correspondence that you don't want to send to Piazza. We all read it, so you will usually get a quick reply. If you send a question that is of general interest, we may post the response on Piazza (we will keep personal information out of it, of course).

To talk with us, the best way is to come during regular office hours (posted on the home page). The second best option is to stop by an idle lab. Please don't be shy. Web pages, email, and Piazza are useful, but it's still much easier to understand something when you can talk about it face-to-face.

F. Office Hours

In Office Hours, you can get help from our staff and academic interns with the different assignments, exam preparation, logistical matters, and any advice you may need. Office hours will be offered both in-person and online, but will be offered only online for at least the first two full weeks of the semester. To learn how Office Hours works please read our Office Hours Guide (to be released after the first weekend of school). We will use the online Office Hours queue to keep track of students in Office Hours. Staff will always skip tickets on the queue that do not adhere to our Office Hours policies.

G. Discussion and Lab Sections

Each week there is a 1-hour discussion section and a 2-hour lab section headed by a GSI and supported by volunteer academic interns. You can find information about the staff running each section on the staff page. Due to COVID-19, we will be adhering to capacity limits. Attendance is optional but highly recommended for discussions and labs.

Labs are a time during which you have access to TAs and academic interns to answer questions and help you over various conceptual hurdles. In general, lab submissions are due at midnight on Friday, although it would be best to complete them during (or before) the lab. Lab assignments will be posted online, so you will be able to do much of the work ahead of time. Nonetheless, we encourage you to attend labs. One major purpose of the labs is to give your TA a chance to check up on you and to find out what people are and are not understanding. We've found that with the increasing ability to work anywhere has come an increasing tendency for students to go off by themselves and fall behind. Don't make this mistake. Keep up with homework and lab work and above all let us know when you don't understand something!

H. Homeworks and Labs

There will be weekly labs and homeworks. Labs will take approximately two hours to complete, though some may run slightly longer. HWs will vary from 3 to 10 hours of work. You will turn in everything electronically using Git, but more specific submission details will accompany the first few assignments. All homeworks are individual efforts (without partners) while partners are highly encouraged for labs.

Homework will be given full credit for passing a substantial proportion of a suite of correctness tests while labs will receive full credit for showing "reasonable effort." Passing all of our autograder tests for homework will ensure full credit.

No late homeworks or labs will be accepted except in cases of emergencies with instructor approval (see Lateness section). To allow for situations that may arise in the course of life, the lowest two homework assignments will be dropped and the two lowest labs will be dropped.

I. Programming Projects

There will be three larger programming projects (and a head first introduction to Java “Project 0”). The projects will be individual efforts, with the same collaboration rules as HW. You'll have later classes that will provide more opportunities to build your teamwork skills. For 61B, our goal is to help you build independence and the fundamental skills that you'll need to thrive when building large programs.

Some projects will have tests that we will not report to you. Thus, passing all given tests will not necessarily guarantee receiving full points on the autograded portion of the project. This is intended to encourage you to write your own tests to provide a more complete test suite. Along this thread, we expect you to ensure your projects run and tests pass on the instructional accounts and by extension the autograder’s server. This mirrors the real world: customers run software on the systems they have, not the systems that developers use to create the software. More specific grading details will be available on each project’s spec when released.

J. Software

This course does not have an official text editor. You may use Vim, Emacs, Sublime, or IDEs like Eclipse, Netbeans, IntelliJ, Sublime, etc. Whatever you use, however, your submitted solutions must conform to our expected layouts, as indicated in the assignments. We will not officially support any IDE other than IntelliJ.

This semester, the instructional machines will be using Java 14. It is already installed on the lab computers, and it may be provided with your computer as well. However, our projects, labs, and homework will all run on Java 11 (it's a "Long Term Support" or LTS version, with free updates through September 2022).

You will be able to do any work you'd like on any Windows, Mac OS X, or Linux setup. You may also remotely log into the instructional machines (for which you should get an account during the first week), though you should be able to do most everything in the course by working natively on your own computer. Information for setting up your own computer is linked in Lab 1 (released on the first day of class).

You will be learning and using Git for this course to track your work. This will allow the staff to track your progress in the course. The first lab will teach you the basics of what you will need to know. Feel free to also read Git documentation.

Version-control systems allow you to maintain a series of "snapshots" of your files at various points in their development. Used properly, this provides you some back-up protection, so that you can recover previous states of your work when something goes wrong. Version-control systems are a fixture in the real world for this reason and for helping to manage collaborative work.

L. Exams

There will be two evening tests on 9/30/2021 and 11/3/2021, and a final exam on 12/15/2021. We plan to offer exams both remotely and in-person. Specific policies will be released closer to exam dates. Officially, exams may cover any material whatsoever. On the other hand, we are known to be reasonable.

Inevitably, some of you will have conflicts with the scheduled exam times for the first two tests. We will arrange for alternative test times for those people who have sufficient cause. Sufficient cause includes conflicting exams other than finals for other courses, medical or family emergencies, and important religious holidays. We make no guarantees about resolving conflicts with the final. Popular reasons that are not sufficient cause include having job interviews, having a plane ticket that you (or your parents) bought without consulting the schedule, having exams or assignments in other courses at nearby times, being behind in your reading, being tired, or being hung over.

We will provide a form before each exam for students to request alternative exams, which will almost certainly occur after the regular exam has occurred. With the obvious exception of emergencies, you must fill out this form by the provided deadline to be considered for an alternate exam. Please refrain from emailing us about alternate exam dates and use the form once it has been released.

M. Surveys

While lecture and section attendance is not required, nor even expected, we do expect you to stay up to date with material. To help us keep track of your progress and sentiment about the course, there will be 14 weekly surveys due Mondays.

We will only count 10 of the 14 surveys, so you can miss 4 without penalty. No late surveys will be accepted.

N. Grades

Your letter grade will be determined by the total points out of the possible 200. In other words, there is no curve. Your grade will depend solely on how well you do, and not on how well everyone else does. You can use the Beacon tab of the course website to periodically check how you are doing in the course.

Category Percentage Points
Homework/Labs/Surveys ~10% 20
Projects ~50% 100
Tests ~17% 34
Final Exam ~23% 46
Total ~100% 200

Letter grade cutoffs:

A+ A A- B+ B B- C+ C C- D+ D D- F
191 162 152 142 132 122 112 100 92 83 73 66 0

We will grant grades of Incomplete only for dire medical or personal emergencies that cause you to miss the final or a project, and only if your work up to that point has been satisfactory. Do not try to get an incomplete simply as a way to have more time to study or do a project. That is contrary to University policy.

O. Lateness

We will give no credit for homeworks or labs after the deadline. Your two lowest homework scores and two lowest lab scores will be dropped. This is intended to handle any contingencies. We do not normally give extensions on assignments, other than for DSP students.

DSP students should be aware that their allowances for extensions on assignments are not intended to be used routinely. We assume that most DSP students will not need such extensions; they are intended for those individuals whose disability tends to flare up from time to time.

On programming projects, we are a tad more lenient. For the first 24 hours, we will deduct 5/24 percent of the maximum score (not including extra credit) for each hour it is late, rounded off in some unspecified fashion. After that, the penalty rises to 5/12 percent for each additional hour late. This means that you will lose roughly 5% of the points for a project for the first day late and 10% for each subsequent day (though tracking is by hours late, not days). We will not accept projects submitted more than 72 hours late. We will deprioritize assignments after the due date has passed, meaning you may find it difficult to get help. For this reason we heavily encourage you to start projects early rather than relying on late days.

This semester, there will be no unpenalized ("slip") hours for lateness, in contrast to past semesters. We have changed these policies from previous years for several reasons:

If you have a good reason for needing an extension, use the Extensions tab on the course web page to request one. Do this before the day of the deadline. This goes for all students, including DSP students. We can forgive certain cases, such as lying comatose in a hospital bed as a result of a traffic accident, but generally you will be able to anticipate a problem and tell us. Again, getting in front of problems promptly is a good habit for later life. In general, the maximum extension is 3 days, even for DSP students. No extensions will be granted for weekly surveys, as they are worth a small percentage of your grade, and you can miss 4 without penalty.

It is entirely your responsibility to make sure your assignments are submitted correctly and on time. We do not accept explanations such as "I'm sure I submitted it, but it just didn't show up." Generally, that means that you did not commit your work, or did not push your work, or otherwise did not follow the directions for how to submit your work. Another all-too-common occurrence is that students believe they have submitted their solutions, but have actually submitted a copy of the skeleton code instead. Again, this is the result of not following instructions at some point. If you look around, you'll see that we've provided the means to check exactly what you've submitted; if you choose not to use them, you must bear the consequences.

P. Policy on Collaboration and Cheating

Deadlines can be stressful, and we know that under extreme pressure, it becomes tempting to start rationalizing actions that you would otherwise yourself consider inappropriate. Perhaps you'll find yourself facing a 61B project deadline, and under all this stress you'll convince yourself that you're just going to cheat for the moment so you can get the points, and that you'll come back later and really learn the thing you were supposed to have learned in order to restore your karmic balance (we've heard something along these lines a few times).

This is a terrible idea. Obviously it's important to learn how to deal with deadlines, but far more important than that, giving into this sort of pressure under not-so-dire circumstances is going to do some damage to your moral compass. Someday, when the consequences are higher than potentially losing a 1/3rd of a letter grade, you may find yourself committing dishonest acts at the cost of someone else's livelihood or life.

Q. Homework and Lab Collaboration Policy

In CS61B, we have three types of assignments: homeworks, labs, and projects. The entire point of homeworks and labs is to learn. For homeworks or labs, you should feel free to collaborate with others however you choose, though keep in mind that greater independence is likely to give you a better learning experience (as long as you aren't totally stuck). Even though we will allow close collaborations on HWs, your code should still be your own work! Identical or near identical submissions will be treated as plagiarism. For labs, you are permitted to have one partner whose code is allowed to look identical to yours. This student must be identified in the partners.txt file contained in each lab.

R. Project Collaboration Policy

By contrast, the projects were designed not just for learning (particularly how to be self-reliant in the context of large unfamiliar systems), but also for the dual purpose of evaluating your mastery of the course material. As such, they are intended to be completed primarily on your own, particularly when it comes to writing the actual code.

For projects and exams, we will be absolutely unforgiving. Any incident will result in a failing grade for the course, though Berkeley will let you retake 61B next semester. All incidents of cheating will be referred to the Office of Student Conduct. What constitutes cheating? The golden rule of academic dishonesty is that you should not claim to be responsible for work that is not yours.

This is obviously open to some interpretation, and you'll be getting some help from instructors, the internet, other students, and more throughout the course. This is OK, and we hope that the class is an open, welcoming, collaborative environment where we can help each other build the highest possible understanding of the course material.

To help (but not entirely define) the bounds of acceptable behavior, we have three important rules for projects:

For clarity, examples of specific activities are listed below:


Permitted with Extreme Caution:

Absolutely Forbidden:

We have cheating-detection software, and we will routinely run this code to detect cheating. Every semester, we catch and penalize a significant number of people (see the Plagiarism policy for details). Do not be one of them. If you find yourself at such a point of total desperation that cheating begins to look attractive, contact one of the instructors and we can maybe help somehow. Likewise, if 61B is causing massive disruption to your personal life, please contact us directly.

If you admit guilt to an act of plagiarism before we catch you, you will be given zero points, and we will not refer your case to the university administration.

Obviously, the expressive power of Java is a subset of the English language. And yes, you can obviously obey the letter of this entire policy while completely violating its spirit. However, this policy is not a game to be defeated, and such circumventions will be seen as plagiarism.

S. Goals and Class Norms

Diversity, inclusion, and belonging are all core values of this course. All participants in this course must be treated with respect by other members of the community in accordance with the honor code. If you feel unwelcome or unsafe in any way, no matter how minor, we encourage you to talk to the professor or the head TAs. We view these sorts of honor code violations as completely unacceptable, and we take them very seriously.

It is our intent that students from all diverse backgrounds and perspectives be well-served by this course, that students’ learning needs be addressed both in and out of class, and that the diversity that students bring to this class be viewed as a resource, strength, and benefit. It is our intent to present materials and activities that are respectful of diversity: gender, sexual orientation, disability, age, socioeconomic status, ethnicity, race, culture, perspective, and other background characteristics. Your suggestions about how to improve the value of diversity in this course are encouraged and appreciated. Please let us know ways to improve the effectiveness of the course for you personally or for other students or student groups.

T. Mental Health and Wellness

As a student you may experience a range of issues that can cause barriers to learning, such as strained relationships, increased anxiety, alcohol/drug problems, depression, difficulty concentrating and/or lack of motivation. These mental health concerns or stressful events may lead to diminished academic performance or reduce a student’s ability to participate in daily activities. UC offers services to assist you with addressing these and other concerns you may be experiencing. If you or someone you know are suffering from any of the aforementioned conditions, consider utilizing the confidential mental health services available on campus. We encourage you to reach out to the Counseling Center for support. An on campus counselor or after-hours clinician is available 24/7.

The National Suicide Prevention Lifeline is a 24-hour number any student or faculty/staff person can call to speak with someone about suicide: (800) 273-TALK (8255).

U. Accommodation

UC Berkeley is committed to creating a learning environment that meets the needs of its diverse student body including students with disabilities. If you anticipate or experience any barriers to learning in this course, please feel welcome to discuss your concerns with the instructors.

If you have a disability, or think you may have a disability, you can work with the Disabled Students’ Program (DSP) to request an official accommodation. The Disabled Students’ Program (DSP) is the campus office responsible for authorizing disability-related academic accommodations, in cooperation with the students themselves and their instructors. If you have already been approved for accommodations through DSP, please schedule a meeting with TA Zoe Plaxco so we can develop an implementation plan together.

V. COVID-19 and Remote Options

We plan on holding as many course offerings as possible in person for the Fall 2021 semester (in accordance with university policy). Live lectures will be held in Stanley 105 from 1-2PM, Monday, Wednesday and Friday. Attendance for the in-person lecture will be first-come, first-seated for in-person instruction, although there will be seating accommodations for DSP students with certain needs. Lecture recordings will be posted on the course website. Once the room capacity is met, all other students will be directed to watch the recorded lecture.

Lab, Discussion, Office Hours and Exams will be held by default in person. The capacity of these sections will be determined by department policy. Again, we will only allow students into these rooms up to the number of seats in rooms, directing students to other sections or remote resources once the capacity is met. If a student in a section fails to follow University COVID guidelines, we will end the section for that week in order to ensure the safety of both staff and students.

Many course resources will be posted on the course website that can be used as asynchronous replacements for lab and discussion sections. Additionally, there are designated “Remote” synchronous discussion and lab sections, as well as Office Hours that will be held via Zoom. There will be a remote version of the exam, with details and a remote proctoring policy to be released closer to the date of the exams.

Finally, due to the ever changing nature of the COVID-19 pandemic, and possibility of other instruction disrupting events like wildfire smoke or power outages, CS61B course offerings may go fully remote. In such an event, specific details surrounding changes to course offerings will be provided.

W. Acknowledgments

Some course handout material derived from Josh Hug's CS61B handout.