Syllabus

Students are expected to be familiar with all of the information below. They should read it fully and carefully. Once they have done so, they can watch this video commentary, where the instructors highlight the most important and distinctive elements in the syllabus they want to be sure students do not miss.

Goals

The goal of this course is to teach students how to write programs in the manner of a professional software engineer, which means writing programs of higher quality and increased complexity. In more detail, this requires creating software that is (1) correct, (2) easy to change, (3) easy to understand, and (4) modular. We will study principled approaches to achieving these four qualities.

Prerequisites

We will assume knowledge of the Java programming language at the level covered in CSE 143. For example, we hope students already know:

  • The difference between int and Integer.
  • The difference between x == y and x.equals(y).
  • That a class that extends another or implements an interface can be safely cast into that type.
  • Which method is called when a method is overriden in subclasses.
  • What the expression a ? b : c does.
If students are unfamiliar with one of these (or similar) examples, we expect that they can familiarize themselves with the issues mentioned on their own. The course will cover topics beyond those issues.

While not a formal prerequisite, in order to get the most out of this course, students have already taken CSE 311. We will rely on material from CSE 311 often in this course.

Course Structure

Topics

We expect to cover the following, with an emphasis on specification and design:

  • Reasoning about statements, loops, functions, and data types: pre- and post-conditions, invariants, and specifications
  • Testing: coverage, black- and white-box testing, test-first development, regression testing, JUnit
  • Debugging and assertions
  • More advanced Java language issues: generics, exceptions, equality, hashing, subclasses, overloading, and overriding
  • More advanced tools: IDE and version control
  • Code clarity: comments and JavaDoc
  • Program design: modularity, coupling, cohesion, and design patterns
  • User interfaces and event-driven programming

Textbook

The required text for the course is the following:

  • Effective Java by Joshua Bloch, 3rd ed., Addison-Wesley, 2018.

    Contains a great deal of distilled wisdom about Java best practices, technical details, and style issues.

    The book is available for free online to current UW students through O'Reilly (requires UW netid login).

There will be assigned readings from this book during the quarter, and there will be questions on the exams about those readings.

Besides the required text, the following books may be helpful to you:

  • The Pragmatic Programmer by Andrew Hunt and David Thomas, 20th anniversary (2nd) edition, Addison-Wesley, 2020.

    Contains a great deal of distilled wisdom about software construction and the craft of programming, including many things that those who read the book later in their careers wish they had learned early on.

  • Program Development in Java by Barbara Liskov and John Guttag, 1st ed, Addison Wesley, 2000.

    The content of this well-written book closely mirrors much of the content of the course. The only downside is that it was written 17 years ago, so it is out-of-date with regard to some of key parts of the Java language and libraries. Nonetheless, it is a good place to look for another presentation of the material covered in class, if you can ignore those parts.

  • Core Java Vol. I - Fundamentals by Cay Horstmann, 10th ed, Prentice-Hall, 2016; 11th ed, 2018.

    This is a good general reference for the Java language and basic libraries. While technical documentation for these things is available on the web, the discussions in a book like this one are usually easier to follow and typically include advice not found in the formal documentation. Either recent edition will cover what we need for CSE 331.

Lectures

Lectures will be given in person, at the locations and times shown on the time schedule. The afternoon lecture will also be recorded for the benefit of students who are sick or otherwise unable to attend.

Sections

Each week includes a TA-led quiz section. These will not be recorded, but the printed material used will be posted on the section list and calendar. Each quiz section will be focused on preparation for the next homework assignment and, hence, will be a highly valuable use of time.

Exams

There will be a midterm exam held in class and a final exam during finals week. See the exams page for more details on the exam content

Homework

Homework will consist of approximately one assignment per week. Assignments can require either solutions in the form of written answers or typed code or both. Generally, the amount of code required will increase as the course progresses. The first two assignments will be entirely written and the last five will be entirely coding.

Past experience tells us that some of the homework assignments in this course can be very time consuming for some students. Students should plan to have at least 6-8 hours available per week to work on assignments, with the expectation that some assignments could require even more time depending on the student's background.

Getting Help

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 course calendar for times and locations.

Students can also 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 (certainly under an hour).

Mechanics

Communication

In addition to in-person discussion, students and staff will communicate through the following online means:

  • Course Mailing List: for the instructors to email the class with infrequent but important announcements. (All students are auto-subscribed, but students should be sure to check their @uw email for these emails.)
  • Ed Message Board (link): the preferred way to ask questions about course content and homework assignments
  • Staff Mailing List (cse331-staff at cs): for private matters, not suitable to the message board

Homework Regrades

If grading mistakes occur, students are encouraged to bring them to the attention of the course 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.

Staff Test Re-run

For some of the coding assignments, we will allow students to make changes to their assignments after the due date and have the staff re-run their tests on the updated solution. Such requests must be made during the 1 week regrade period after grades are released. Only the correctness portion of the score will be changed, not style, design, etc. Furthermore, the maximum correctness score that can be received on a test re-run is 80%.

The purpose of this policy is to allow students who make minor mistakes that end up causing a large number of our correctness tests to fail to fix those mistakes and limit the point deduction to just 20% of correctness points.

By the end of the course, we expect students to be able to submit correct code the first time, as is expected of programmers in industry. For that reason, we will not re-run the staff tests on HW9.

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 please let the staff know so the issue can be addressed.

Grading

Overall grades will be determined roughly as follows:

60% Homework
15% Midterm exam
25% Final exam

Homework assignments are not weighted equally because they are of different length and sophistication. Later assignments are likely to be weighted more heavily because they are more involved.

Students are expected to complete all homework assignments. Students who receive no (or essentially no) credit for an assignment risk failing. Outside of those circumstances, failing the course is highly unusual.

See the grading page for details on exactly how grades will be calculated.

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 assignment by those dates. For that reason, we 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 four late days total during the quarter.

Late work not meeting these conditions (i.e., more than 24 hours on one assignment or more than four assignments) will only be accepted after a discussion with course instructors.

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 a few minutes late is just as late as something submitted the next day.

  • Finishing an assignment one date late means a student has one fewer day to complete the next assignment.

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

For a description of how to submit a coding assignment late, see this document.

Collaboration

Students are expected to complete assignments individually. They may discuss assignments in general terms with other students, including a discussion of how to approach problems, but the code and written work they submit must be solely their own.

This policy clearly precludes copying code 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.

Students are allowed (and encouraged) to talk to other students when they get stuck. However, they should describe their problem rather than showing their code to anyone else. After that discussion, students should return to independent work as they update their solution.

Each student should keep their own solutions private. Under no circumstances should they give a copy of their code or written work to another student, as that would clearly violate the rules listed above.

Academic Integrity

As noted above, we expect each student to write their own code, 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.

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.

Advice For Students

  • Start assignments early. Aim to complete them the day before they are due. Our assignments can be more difficult than those of other courses, and you need leave time to make and correct mistakes.

  • 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 that you 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.

  • Think about which lecture material applies to the homework you are working on. Each assignment is carefully designed to apply ideas from lecture, so if it does not seem that any lectures apply to what you are working on, there is a good chance that you are missing something. Knowing which ideas the homework is designed to apply should make it easier to complete. (The same point applies to exams.)

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