Course Syllabus
Questions¶
This course examines questions such as:
- Which of two working designs is better, and how would you argue for one over the other?
- Why is the same change cheap in one design and expensive in another?
- When an AI agent writes the code, which design decisions does it make for you?
- When is a design pattern worth its added complexity?
- How do you show that a change preserved a system's behavior?
Overview¶
Modern software engineers spend much of their time steering, reviewing, and changing code that someone or something else wrote. This course teaches the design judgment that this work requires: recognizing the design in an implementation, comparing it with alternatives, predicting what a change will cost, and communicating design intent to colleagues and AI agents.
Design patterns provide the vocabulary for this judgment. We introduce the recurring problems that motivate the patterns, examine the design space around each, and treat every pattern as one candidate solution whose cost must be justified.
The course covers:
- Design judgment with AI in the loop. A single prompt can produce many different designs. You are responsible for evaluating and steering the design, regardless of who writes the code.
- Behavioral, creational, and structural patterns. Each pattern is taught through the problems that motivate it, in real code, with the trade-offs that determine when it is appropriate.
- Brownfield change. Reading unfamiliar real-world codebases, planning changes, and preserving behavior while restructuring.
Lectures are on Mondays and studios on Wednesdays. Studios are hands-on design workshops. You typically work on paper (except for the first studio, where you will be working on an AI coding exercise), compare designs with your peers, and critique alternatives. Assignments apply the same skills to real open-source codebases.
Learning Goals¶
-
Separate working code from well-designed code. Students will be able to evaluate a working implementation's design against alternatives, name the trade-offs, and justify a choice using quality attributes.
-
Reason about the cost of change. Students will be able to predict which parts of a design a requirement change will affect, explain which design decisions set that cost, and compare their predictions with the result.
-
Use pattern vocabulary to communicate design intent. Students will be able to express proposed changes as patterns and quality attributes, precisely enough to direct colleagues and AI agents, and judge when a pattern is worth its complexity.
-
Critique designs and design reviews. Students will be able to review a proposed design against the real code it changes, surface the assumptions it rests on, and evaluate the quality of other reviews of the same design.
-
Change real systems while preserving behavior. Students will gain experience locating targets in large unfamiliar codebases, planning and executing a change, and producing evidence beyond passing tests that behavior is preserved.
Assignments¶
There are three individual assignments, each applying the week's material. All except the first use real-world open-source codebases rather than toy examples:
- A1: AI Coding Exercise extends the first studio. You document the notification design an AI agent built there, propose an alternative design, and examine what three requirement changes cost.
- A2: Behavioral Patterns studies your design process. Does designing first, rather than prompting first, change what you build?
- A3: Structural and Creational Patterns is a design review. You critique a proposed change to a real codebase, along with a provided review of it.
Toward the end of the course, students work in teams of 3 to 4 on a group project: refactor and extend a real open-source project to improve a quality attribute while preserving behavior. The project has two submissions (an RFC, then execution and presentation slides) and ends with two presentation sessions.
There is also an in-person, on-paper final exam on Saturday, October 10, after the last class session. The exam assesses the same design skills as the assignments, without AI assistance. If you rely on AI to do your thinking during the course, you will be unprepared for it.