Module 12 · Lesson 1

Requirements and Design

Turn fuzzy ideas into a backlog. Gather requirements, write user stories, and sketch the architecture before you code.

Audio: Requirements and Design
0:000:00

Requirements and Design

Code is the cheap part. The expensive mistakes happen earlier, when teams build the wrong thing or build the right thing the wrong way. Spending time on requirements and design saves weeks later.

Gathering Requirements

A requirement is a statement of what the system must do or what quality it must have. Functional requirements describe behaviors ("the user can reset their password"). Non-functional requirements describe qualities ("the page loads in under a second").

Talk to the people who will actually use the system. Ask why, not just what. The first answer is usually a guess at a solution; the real requirement hides behind it.

User Stories

A user story is a short, plain-language description of value:

As a role, I want capability, so that benefit.

For example: "As a customer, I want to see my order history so that I can reorder favorites." Stories keep the focus on outcomes for real users instead of internal machinery.

Each story should be small enough to ship in a single sprint and have clear acceptance criteria so you know when it is done.

Prioritization

Not everything is equally important. A simple priority number, or a tier like P0/P1/P2, lets the team focus on the highest-value work first. The example sorts a backlog by priority and prints what to tackle in order.

A common technique is MoSCoW: Must, Should, Could, Won't. Anything in "Won't" for this release is explicitly out of scope.

Sketching the Architecture

Before writing code, draw the major pieces and the arrows between them: clients, servers, databases, queues, external APIs. Decide where state lives, what speaks to what, and where failure can happen. A whiteboard sketch you can defend in five minutes is worth more than a 30-page document nobody reads.

Try It Yourself

  • Take a small idea (a recipe app, a chore tracker) and write five user stories.
  • Add MoSCoW tiers to the backlog example and group output by tier.
  • Draw a one-page architecture for a system with users, an API, a database, and a background worker.

Code Playground

Edit the code below and click Run to see the output. Switch between languages using the tabs.

Loading editor...

Enjoying the lesson? Unlock the full Capstone Project from $4.99/mo.

See plans →