Welcome: what this site teaches
What you will learn on this page
Section titled “What you will learn on this page”- What this site is trying to teach, and what it deliberately does not.
- The 12 steps of the design workflow that every later section builds on, and the five-step short form you use when time is short.
- How a lesson is laid out, so you know where to find the parts you need.
- Which part of the site to start with, based on what you already know.
The goal: design reasoning, not pattern memorization
Section titled “The goal: design reasoning, not pattern memorization”Imagine you are asked to “build a library loan system”. You could open an editor
and start writing a Library class. Many people do. A week later the code works
for the first example but resists every change: a new loan rule touches five
files, nothing can be tested without a database, and nobody can explain why the
classes are shaped the way they are.
This site teaches a different habit. Before writing classes, you find out what the problem really is. Then you choose a design for reasons you can state, you implement it in C++ with clear ownership of every object (a clear answer to “which part of the program is responsible for destroying this?”), and you check that the design still holds up when the requirements change.
That skill is called low-level design: designing the inside of one program or component, meaning its classes, interfaces, responsibilities, data structures, and interactions. The next page, What low-level design is (and is not), draws the boundary carefully.
A design is rarely “right” or “wrong” in general. It fits a particular set of requirements, at a cost. Every lesson therefore explains why a design fits, when it does not, and what you give up by choosing it. If you remember only one thing from this page, remember that a design pattern (a named, reusable solution shape) or a design principle is a tool with costs, not a rule to obey.
The design workflow
Section titled “The design workflow”The whole site follows one repeatable workflow. Each step produces something you can write down and check, called an artifact (for example, a list of questions, a set of requirements, or a test).
Text description of the diagram
The workflow has 12 steps, each arrow leading to the next: (1) problem statement, (2) clarification questions, (3) requirements and constraints, (4) use cases and acceptance criteria, (5) domain modeling, (6) architecture and boundaries, (7) responsibility assignment, (8) detailed design, (9) implementation, (10) testing, (11) trade-off review, and (12) evolution. This overview shows the steps in order only; the next pages show how real work loops back to earlier steps.
Diagram source (Mermaid)
flowchart TB
S1["1. Problem statement"] --> S2["2. Clarification questions"]
S2 --> S3["3. Requirements and constraints"]
S3 --> S4["4. Use cases and acceptance criteria"]
S4 --> S5["5. Domain modeling"]
S5 --> S6["6. Architecture and boundaries"]
S6 --> S7["7. Responsibility assignment"]
S7 --> S8["8. Detailed design"]
S8 --> S9["9. Implementation"]
S9 --> S10["10. Testing"]
S10 --> S11["11. Trade-off review"]
S11 --> S12["12. Evolution"]In one sentence each:
- Problem statement: the request as you first receive it, usually vague.
- Clarification questions: what you must ask before you can design anything.
- Requirements and constraints: what the software must do, and how well (speed, reliability, security, and so on).
- Use cases and acceptance criteria: concrete scenarios, and checkable conditions that say when each one works.
- Domain modeling: the concepts, rules, and relationships of the problem area, before choosing classes.
- Architecture and boundaries: the major parts of the program and what each part may depend on.
- Responsibility assignment: which object knows or does each thing.
- Detailed design: interfaces, types, ownership, and error handling.
- Implementation: small steps of working C++.
- Testing: evidence that the acceptance criteria and the rules hold.
- Trade-off review: what the design costs and which alternatives you rejected, and why.
- Evolution: how the design absorbs a changed requirement.
When time is short, as in a design interview or a first sketch, the 12 steps compress into five: requirements, entities and relationships, class design, implementation, and extensibility. The delivery framework works through all five on tic-tac-toe in C++, and shows which of the 12 steps each one covers. Later sections teach the steps in depth: Requirements covers steps 2 to 4, Modeling covers steps 5 and 7 (finding classes, their data members, and their member functions), and the rest of the site covers the design, testing, and evolution steps.
How the site is organized
Section titled “How the site is organized”The sections are in reading order. Each one assumes the earlier ones.
| Section | What it gives you |
|---|---|
| Orientation | This introduction, the workflow, and how to read the examples |
| C++ foundations | The language features design depends on: object lifetime, ownership, and interfaces (types that describe what an object can do, without saying how) |
| Modeling | Thinking in objects and responsibilities; class outlines, traces, state diagrams |
| Requirements | Turning a vague request into requirements, use cases, and invariants (rules that must always hold) |
| Design principles | Guidelines such as cohesion, coupling, dependency direction, and SOLID, and their limits |
| Design patterns | Recurring solution shapes, each with when not to use it |
| Architecture | Component boundaries, APIs, layering inside one application |
| Advanced design | Ownership in depth, behaviour when errors occur (exception safety), code running on several threads at once (concurrency), and generic design |
| Testing and evolution | Testable design, refactoring, and changing a design safely |
| Practice | Guided walkthroughs, exercises, and quizzes |
| Case studies | Complete designs from problem statement to tested C++ |
The C++ section is not a language reference. It covers the parts of C++ that change how you design: who owns an object, how long it lives, and how one part of a program can depend on another without knowing its details.
How a lesson is laid out
Section titled “How a lesson is laid out”Lessons share one structure, so you can skim to the part you need. Not every lesson has every part; a part is left out when it would add nothing.
- Header. Difficulty (beginner, intermediate, or advanced), prerequisites, and key concepts. Prerequisites are links; read them first if a term on the page is new to you.
- Explanation. The idea in plain language, then a concrete problem it solves.
- Naive approach. The first design most people try, and where it breaks.
- Improved design. Built step by step, with diagrams where they help. Every diagram has a written description you can read instead of the picture.
- C++ code. Most code comes from example files that are compiled and tested; a few short fragments are illustrations or deliberate mistakes. A label above each block says how it was checked (see About this site).
- When to use it, and when not to. Every design choice has a section on its limits.
- Trade-offs, common mistakes, and a requirement change. What it costs, how it goes wrong, and how it adapts.
- Exercise. A question with an explained answer hidden behind a “Show the explained answer” button. Try it before you open the answer.
Specialized terms link to the glossary the first time they appear on a page. Material that goes beyond a first reading is placed in a “Going deeper” box, which you can skip.
Where to start
Section titled “Where to start”There is no single correct path. Choose the one that matches what you already know:
- New to C++ (you program in another language): read Orientation, then the C++ foundations section in order. Ownership and lifetime are the parts most readers from garbage-collected languages find new.
- Comfortable with C++, new to design: skim the C++ section headings, read any page whose title is unfamiliar, then start properly at Modeling.
- Preparing for design interviews: read Orientation, the Requirements section, and the case studies; return to principles and patterns when a case study uses one you do not know. This path works whatever your answers to the exercise below; use the exercise to decide how much C++ review you need first.
The learning roadmap describes these paths in more detail.
Exercise: Pick your starting path
Answer these four questions honestly. There is no score.
- Can you explain what happens to a local object when the function it was created in returns?
- Can you say when you would use
std::unique_ptrrather than a plain member variable? - Have you designed a program with more than five classes that you later had to change?
- Could you explain to a colleague why a design you wrote was chosen over an alternative?
Show the explained answer
There are no wrong answers; the point is to pick a path that wastes the least of your time.
- “No” to 1 or 2: start with the C++ foundations section in order. Questions 1 and 2 are about object lifetime and ownership, which almost every later design decision depends on.
- “Yes” to 1 and 2, “no” to 3 or 4: you know enough C++. Start at Modeling, and use the C++ pages as a reference when a lesson links to them.
- “Yes” to all four: start with Requirements and the case studies, and treat earlier sections as review. Question 4 is the skill interviews test most directly, and the case studies practise it end to end.
If you are unsure about an answer, treat it as “no”. Reading a page you did not strictly need costs less than misunderstanding ownership later.
Summary
Section titled “Summary”- This site teaches design reasoning: discovering requirements, choosing a design for stated reasons, implementing it in C++, and adapting it to change.
- One 12-step workflow, from problem statement to evolution, organizes the whole curriculum. Its five-step short form, the delivery framework, is what you use when time is short.
- Every lesson explains when a design fits, when it does not, and what it costs.
- Choose a starting path based on your C++ and design experience.