CSE 331: Syllabus

Students are expected to be familiar with all of the information below. Read it fully and carefully.

Course Structure

Prerequisites

The course assumes knowledge of the Java programming language at the level covered in CSE 123. Among other things, we assume that all students are familiar with writing recursive functions.

Goals

The goals of this course are to teach students to:

  • Organize software so that it is easy to test, understand, and change.
  • Write precise specifications for individual components so that the only implementations satisfying the specification are the ones intended.
  • Understand which bugs are caught by the type system and which are not.
  • Choose test cases that meet industry standards for coverage.
  • Ensure that implementations are fully correct for all inputs by writing a proof of correctness.
  • Practice defensive programming so that any bugs not caught by the type system, testing, or correctness proof are quickly visible and easy to debug.

Topics

The course topics will alternate between those covering design and those covering implementation.

Design topics will focus on writing precise specifications, first for individual methods and then for classes (via abstract data types). Later, we will later discuss ways to make certain kinds of bugs impossible, either with the type system or with design patterns, and ways to make our designs more extensible with subtyping and generics.

Implementation topics will focus ensuring that code is fully correct for all inputs, which can only be achieved via mathematical proof. We will start with correctness proofs for functional programs and then move on to imperative programs and eventually abstract data types. Later, we will see additional tools needed to prove correctness of code that works with arrays. Finally, we will see how understanding correctness proofs allows us to write the code so that we know immediately that it is correct.

Textbook

There is no required textbook for the course. However, the lecture slides will at times make reference to the following book, which may be a useful reference for students working in Java:

  • Effective Java by Joshua Bloch, 3rd Edition, Addison-Wesley, 2017.

Lectures

Lecture will be in person in CSE2 G01 at 2:30 and 3:30. You are welcome to attend either lecture as long as their are available seats. Lecture will be recorded and posted on Panopto, linked from Canvas.

We have found that success in the course is correlated with in-person lecture attendance. Students who want to do well in the course are strongly encouraged to attend in person.

Concept Checks

To help ensure understanding of the concepts introduced in lecture (and to provide an incentive to attend lecture and keep up with the material), we will have regular, short quizzes on the lecture material, consisting of short, multiple choice questions and administered on Gradescope.

There will be one concept check per lecture. They are intended to be completed before the next class (lecture or section), but the absolute deadline is 6:00pm on the day after the lecture is given. Concept checks are autograded and can be attempted as many times as you wish before the absolute deadline. You only need to get 90% of the available concept check points over the whole quarter to receive full credit (that is, we will rescale the points so that 90% becomes 100%, 45% becomes 50%, etc.).

Sections

Each week includes a TA-led quiz section. These will not be recorded, but the printed material used will be posted on this website.

Each quiz section will begin the next homework assignment, usually completing about two of the homework problems in class and then going over the answers. It is very important that students take the time to work through the these problems before starting the rest of the homework on at home.

Past experience indicates that section attendance is extremely important for being successful in the course. For that reason, we will award students points for participation in section. Those who are sick will be able complete the problems on their own and submit their solutions in Gradescope by 6pm on Friday.

Homework

After quiz section, students will be asked to complete at least three of the reamining practice problems at home and submit their solutions in Gradescope by 11:59pm on Wednesday.

Occasionally, we will discover errors in the problems after they are posted (typically, just small typos). We will maintain a log on the website with all changes made to the assignment. If (and only if) we believe there is potential for students to submit correct solutions to the earlier version, we will also email all students about the change. In particular, we will not send email if the earlier version is obviously nonsensical. (Most typos fall into this category.)

Unlike quiz sections, homework will be graded on correctness.

Exams

The course will have a midterm exam and a final exam. See the Exams section below for further details.

Getting Help

Students can ask questions at any time on the message board. During normal working hours, they should receive a response within a fairly short period of time (almost always under an hour).

Each member of the course staff will have at least one office hour every week, where students can get one-on-one help. See the home page for times and locations.

Note, however, that office hours are the most limited resource available to students — those held near the due date of assignments are almost always oversubscribed — so asking questions on the message board should always be preferred.

Homework Mechanics

Submission

Homework will be turned in via Gradescope. After each assignment is reviewed by TAs, students will be able to see their feedback in Gradescope.

Regrades

If grading mistakes occur, students should to bring them to the attention of the staff and see that they are corrected. They can do so by requesting a regrade in Gradescope, with the following caveats:

  • We will only entertain regrade requests for one week after the grades are initially are posted. In particular, students searching for extra points late in the quarter by requesting regrades of problems from early assignments will be ignored.

  • While regrades can (and should) be used to fix mistakes where a correct solution is mistakenly marked incorrect, they cannot (and should not) be used to request changes to amounts of points deducted for errors. Deductions are applied consistently to all students. We will not give one student a smaller deduction than others who made the same (or very similar) mistakes, so do not ask us to do so.

Policies

Inclusiveness

Students should expect and demand to be treated with respect by their classmates and the course staff. All students belong here, and the staff is here to help them learn and enjoy a challenging course. If any incident occurs that challenges this commitment to a supportive and inclusive environment, students should let the staff know so the issue can be addressed. You can use the anonymous feedback tool if you would like to tell us something anonymously.

Late Policy

Homework assignments are designed to be completed by the due dates listed. Situations may arise, however, where students are unable to complete the at-home work by those dates. For that reason, the staff will allow students to submit assignments one day late with no penalty, provided that the following conditions are met:

  • Students use no more than one late day per assignment. A “day” means 24 hours from the original due date/time.
  • Students use no more than three late days total during the quarter.

Late work not meeting these conditions (i.e., more than 24 hours on one assignment or more than three assignments) will only be accepted after a discussion with course instructor. There is no need to talk to the instructor until all three late days have been used or more than one late day is needed on an individual assignment.

Students do not need to take any special action when submitting an assignment late. The course staff will note the late submission and keep track of how many late submissions have occurred.

In addition, please note that:

  • Anything more than 10 minutes late is just as late as something submitted the next day.

  • Late days are intended to cover any emergencies that arise. We do not grant extra late days beyond the first three, just for emergencies — those three are intended to cover most emergencies.

Collaboration

Students are allowed to discuss homework problems with others, but they must write or type their solution individually, without assistance.

Student solutions are not group work. Students can work together to solve problems, but then, they must leave the group, taking no written or electronic records of group work with them; wait at least 20 minutes; and then write up their solution on their own, unassisted.

This policy clearly precludes copying code or other solutions off of the Internet. Hence, students should not consult the Internet for problems or key-phrases. This includes Google, Stack Overflow, reddit, and any other website. However, students may consult the internet for ideas, definitions, and understanding general concepts.

Each student should keep anything they plan to submit as a solution completely private. Under no circumstances should they give a copy of their code or written work to another student or post it on the internet.

AI Assistance

We consider AI to be similar to referencing other material on the internet, and our policy is the same: you may use it for ideas, definitions, and understanding general concepts. But you may not as an AI to solve a homework problem for you. You should never submit assignments or your solutions to an AI tool.

Occasionally we will assign (usually optional) problems that ask you to use an AI model to design some software and investigate its responses. Obviously, AI use is allowed on problems that explicitly indicate it.

Academic Integrity

As noted above, the staff expects each student to write their own solutions, independently. Attempting to misrepresent another student's solution as their own would be unfair to the other students in the course and constitute academic misconduct in violation of the Allen School policy. Any such violation will be reported to University, and the instructors will make every attempt to ensure the harshest allowable penalty.

Note that, in cases where one student copies the solution of another, both students have violated the policy and both will be reported. Again, all students should keep their solutions private.

If a student is ever unclear about whether their discussions with other students went over the line, they should (a) ask and (b) describe their collaboration clearly on their assignment. If they do, the worst that will happen is losing some points. That is much better than the alternative.

Accommodations

Please refer to university policies regarding disability accommodations and religious accommodations.

Grading

Homework Grading

Graders will identify incorrect answers in submitted solutions and deduct points commensurate with the severity of the errors made. They will aim to deduct points consistently across all assignments making the same or similar errors.

In addition, the course has the following policies:

  • Graders will ignore requests to change the amount of points deducted. These amounts, as long as they are applied consistently, are entirely at the discretion of the course staff.

  • Graders will ignore legalistic arguments about why incorrect solutions should be accepted under an alternative reading of the problem statement. Incorrect answers will be marked as such as long as the staff believes the intention of the problem statement was clear.

  • Talking to a staff member does not take away the student's responsibility to submit a correct answer. The staff will not accept incorrect answers due to a claim that some staff member said it was acceptable. Students sometimes misunderstand what TAs are trying to say, and in any case, it remains the students responsibility to make sure their understanding of the problem statements matches up with the plain meaning of the instructions given in the assignment or class.

Course Grades

Overall scores for the course will be determined roughly as follows:

5% Concept Checks
10% Section Participation
35% Homework
20% Midterm exam
30% Final exam

Exam Mechanics

The will be a midterm exam and a final exam.

The midterm exam will be held in class on Friday, February 13th.

The final exam will be held on March 17th from 12:30pm to 2:20pm in BAG 131/154.

If you have a conflict with either exam, please contact course staff as soon as possible and at least a week in advance of the exam.

Students must bring their UW ID and have it ready to be checked during the exam. The exam will be closed notes, with no electronics.

The exams will be similar to the homework assignments. Students who understood how to solve all the homework problems should already be well prepared for the exam, which will consist of problems similar to those in the homework.

Since students often request additional practice materials, here are some that you can look at:

Since these exams are from previous versions of the course, they may differ slightly in terms of notation and content covered.

It is probably not necessary to work through these practice materials in order to do well on the exams. It is more important to be sure you understand how to solve all homework problems.

Advice For Students

  • Prefer the message board to office hours. Office hours get very busy, especially in the last 48 hours before assignments are due. (Yet another reason to start early is so that students can attend office hours that are less busy.) Even just before assignments are due, however, questions on the message board are usually answered within a short period of time.

  • Do not skip class to work on homework, not even late in the quarter when students are more tired and busy. Doing so often seems like it will save time in the short run, but it will cost time in the long run.

  • Think about which lecture material applies to that homework problem. As described above, each assignment is intended to apply ideas from lecture, so if it does not seem that any lectures apply to a given problem, it is nearly certain that the student did not understand some part of some lecture.

  • Do not blindly trust outside resources. Most people do not program like we do in this course. A student's goal should be to solve homework problems "like a 331 student" and not "like an average programmer". Outside resources may mislead you about what we are trying to teach you.

  • Focus on understanding, not on getting points. A student's understanding of the material, not the points they received, is what will get them a job and ensure a successful career as a programmer.