Syllabus

Goals

The aim of this course is to help students write programs of higher quality and increased complexity. This requires creating software that is (1) correct, (2) easy to change, (3) easy to understand, and (4) easy to scale. We will study principled approaches to achieving these four goals.

After completing this course successfully students should be able to:

  • Successfully build medium-scale software projects in principled ways
  • Understand the role of specifications and abstractions and how to verify that an implementation is correct, including effective testing and verification strategies and the use of formal reasoning
  • Analyze a software development problem and be able to design effective program structures to solve it, including appropriate modularity, separation of abstraction and implementation concerns, use of standard design patterns to solve recurring design problems, and use of standard libraries
  • Use modern programming languages effectively, including understanding type systems, objects and classes, modularity, notions of identity and equality, and proper use of exceptions and assertions
  • Use and learn new contemporary software tools, including integrated development environments, test frameworks, debuggers, version control, and documentation processing tools

In this class, we will use Java and associated tools like IntelliJ, JUnit, JavaDoc, and git, but the goal is to understand the underlying ideas and concepts that are generally applicable to software construction.

Approximate 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 overloading
  • 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

Prerequisites

The only formal prerequisite is CSE 143. We will very much rely on a thorough understanding of the concepts from CSE 143 as well as Java programming skills. We will go much further and you will be challenged to approach software development much differently than you have in CSE 143 or other courses.

Texts

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.

There will be assigned readings from this book during the quarter, and you may be required to complete short online quizzes about the material. (If not, then the material will be tested on the quizzes.)

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.

Structure

Lectures

In order to provide as many students as possible with their preferred learning mode, the two sections of the course (A and B) will be taught differently:

Section A: Lectures will be held live via Zoom. (They will also be recorded, though, in case you need to miss a lecture.)

Section B: Lectures will be pre-recorded videos. For each topic, there will also be a live Q&A session. Links to the videos to watch will be emailed to students in section B a day or two before the associated Q&A session so that they have time to watch them beforehand.

It is fine for students in section A to attend the Q&A session. (It is also fine, in principle, for students in section B to attend the live lecture, though, if they intend to regularly attend live lectures, then they should switch to section A.)

Sections

Each week includes a TA-led quiz section, typically focused on preparation for the next homework assignment. These will not be recorded, but the printed material covered will be posted on the section list and calendar.

Homework

Homework will consist of 11 assignments, typically with one due each week. (The one exception is that, in the third week of the quarter, two assignments are due. However, the second assignment should be quite short.) The first 3 assignments are written, while the last 8 assignments are coding.

Quizzes

The course will include six (or so) timed quizzes, taken online during the quarter. These will consist primarily of multiple choice questions. You can take the quiz at a time of your choosing within a specified 24 hour period. You will have 30 minutes to complete the quiz once you start it. You will also have the opportunity to retake the quiz if you did not like your score.

These quizzes are in lieu of a midterm exam.

Final Exam

There will be a final exam. As with the quizzes, this will be timed, but you will have a ~36 hour period in which to find a good time to take the exam. The time limit for the exam will be around 90 minutes.

Policies

Inclusiveness

You should expect and demand to be treated with respect by your classmates and the course staff. You belong here, and we are here to help you learn and enjoy a challenging course. If any incident occurs that challenges this commitment to a supportive and inclusive environment, please let the instructor know so the issue can be addressed.

Grading

Your overall grade will be determined roughly as follows (subject to change):

70% Homework assignments
20% Quizzes
10% 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. (The exact weighting will be determined later on.)

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.

Grades of “incomplete” are reserved for situations covered by the UW policy.

Late Policy

This policy may not be the same as in your other classes. You are responsible for understanding it fully.

In general, late work needs to be authorized in advance, by the instructor, at least 30 hours before the due date, in order to be accepted. However, we will make exceptions for extenuating circumstances (e.g., serious illness).

Aside from the circumstances just mentioned, late work will not be accepted for written assignments. However, for coding assignments, late work will be accepted without penalty provided that the following conditions are met:

  • You use no more than one late day per assignment. A “day” means 24 hours from the original due date/time.

  • You use no more than four late days during the quarter.

In addition, note that:

  • Late days are atomic. You cannot, e.g., split up a late day into three pieces and submit three different assignments each 8 hours late.

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

Beyond the permitted late days, the policy for coding assignments is the same as for written assignments: late work is not accepted unless it was pre-authorized (30 hours in advance) or extenuating circumstances acknowledge by the instructor.

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

Re-submission

For some of the coding assignments (HW4-HW7), we will allow you to re-submit your work. However, we will only change the correctness portion of your score, not style, design, etc. Furthermore, the maximum correctness score you can receive on a resubmission 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 allow resubmission on HW8-HW9.

Academic Integrity

Any attempt to misrepresent the work you submit will be dealt with via the appropriate University mechanisms, and your instructor will make every attempt to ensure the harshest allowable penalty. The guidelines for this course and more information about academic integrity are in a separate document. You are responsible for knowing the information in that document.

Accommodations

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

Advice

  • Do not skip class or section to work on homework, not even late in the quarter when you are more tired and busy. This will cost you time (not to mention learning) in the long run. Class will start promptly, and you will find the entire course easier and more educational if you arrive punctually, well-rested, and ready to pay attention for 50 minutes.

  • Start homeworks early. Aim to complete it the day before it is due. They are more difficult than assignments in earlier courses and you need time to make mistakes.

  • Consider buying a Java programming book (like Core Java). Past experience indicates that students tend to over-estimate the quality of the information to be found on the web and under-estimate the quality of the information found in such a book. You can ultimately save time by reading a book that is known to be high-quality and up-to-date instead of reading web pages that are either inaccurate or out-of-date only to find that their advice does not work for you.

  • 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 quizzes.)

  • Learn a lot and have fun. All the materils in this course should be valuable for your career success. Mastering these ideas now will make later courses and projects easier. But also be sure to have fun.

    The ability of create things, solely with the power of your imagination, that express yourself and positively affect the lives of (potentially) millions of other people is a rare joy that, while available to anyone, most will never experience. For programmers, like yourself, it can be an everday occurrence. As you dig into the tools and techniques of programming, it is important not to lose sight of the big picture: programming should bring joy, not only to those that use the software you create but also to yourself. Please start by having fun in this class!