Phase 1 of 5  ·  Foundations
Week 04 / 20   ·   Ch 4

Requirements
Engineering

"Build the wrong thing fast = waste. Here's how engineers avoid it."

📚 Ch 4 — Requirements Engineering🔴 Functional vs Non-functional📋 Elicitation + Specification + Validation⏱ ~20 min read

🔍Concept Deep Dives

Click each concept to expand — real examples, diagrams, pros & cons.

⚙️

Functional Requirements

What the system should DO — specific behaviors, inputs, outputs, and operations.

When to Use

Always required — defines the system's core capabilities.

Real-World Example

'A user should be able to reset their password via email' — specific, testable, behavioral.

✓ Advantages

  • Directly testable
  • Clear acceptance criteria
  • Maps to user stories

⚠ Watch Out

  • Easy to over-specify (becomes design, not requirements)
  • Can miss non-functional needs
User logs in ↓ [System authenticates] ↓ Show dashboard OR error 'System shall encrypt passwords using bcrypt'
📐

Non-Functional Requirements

Constraints on HOW the system works — performance, security, reliability, usability.

When to Use

Always — these define quality and are often harder to retrofit than functional features.

Real-World Example

'The login page must load in <500ms' / 'System must be available 99.9% uptime' / 'GDPR compliant'.

✓ Advantages

  • Define quality standards
  • Drive architectural decisions
  • Prevent scope creep on quality

⚠ Watch Out

  • Hard to test objectively
  • Often vague ('must be fast') — need quantification
NFR Categories: Product (usability, efficiency, reliability) Organizational (delivery, standards, implementation) External (regulatory, ethical, legislative)
🔍

Requirements Elicitation

Techniques to discover what stakeholders actually need — interviews, observation, prototyping, scenarios.

When to Use

Project start — before writing a single line of spec.

Real-World Example

Airbnb's founders actually stayed in people's homes to understand pain points before building features.

✓ Advantages

  • Reveals hidden needs
  • Uncovers conflicting stakeholder goals
  • Builds shared understanding

⚠ Watch Out

  • Stakeholders don't always know what they want
  • Time-consuming
  • Political stakeholder dynamics
Interviews → Observations → Workshops ↓ Scenarios / User Stories ↓ Prototypes (validate) ↓ Agreed Requirements

Requirements Validation

Checking that requirements actually define the system the customer wants before you build it.

When to Use

After requirements are written — before development begins.

Real-World Example

A requirements review catching a contradiction before dev saves 10-100x the cost of fixing it in production.

✓ Advantages

  • Prevents costly rework
  • Ensures completeness and consistency
  • Aligns stakeholders

⚠ Watch Out

  • Requires time and stakeholder availability
  • Can be a bottleneck
Reviews (human inspection) Prototyping (show it) Test-case generation (derive tests) Consistency analysis (tools) → Approved Requirements

📋Quick Reference

θ Ch 4 Cheat Sheet — Requirements Engineering
Functional Req.
What the system SHALL do. Specific, testable behaviors. Example: 'System shall send email on registration.'
Non-Functional Req.
How the system SHALL perform. Quality constraints. Example: 'Response time < 500ms at 1000 concurrent users.'
User Requirements
High-level, written for customers/stakeholders. Natural language + diagrams.
System Requirements
Detailed, written for developers. Precise technical spec of what system must do.
Elicitation Techniques
Interviews, ethnography (observation), scenarios, use cases, prototypes.
Requirements Validation
Reviews, prototyping, test-case generation. Goal: catch errors before dev starts.
Requirements Change
Inevitable. Use change management: impact analysis → approval → update docs → notify stakeholders.
θ
Sommerville's Key Points — Ch 4
Author's own summary from the end of the chapter.
  • 1Requirements engineering: process of establishing the services a customer requires and the constraints.
  • 2Functional requirements: what the system should do — specific behaviors and outputs.
  • 3Non-functional requirements: constraints on system qualities — performance, security, reliability.
  • 4User requirements: high-level, natural language statements for stakeholders.
  • 5System requirements: detailed technical description for developers.
  • 6Requirements elicitation: interviews, scenarios, ethnography, prototyping.
  • 7Requirements validation: reviews, prototyping, test case generation — done BEFORE development.
  • 8Requirements always change — manage them with traceability and change control.

🧠Quiz — Test Yourself

Think through your answer first, then reveal.

Q1
Recall
What is the difference between functional and non-functional requirements? Give 2 examples of each.
Functional: what the system does — 'User can reset password via email', 'System generates a PDF invoice.' Non-functional: quality constraints — 'Password reset email sent in <5 seconds', 'System available 99.9% uptime.'
Q2
Apply
Why is it dangerous to start coding before requirements are validated?
The cost of fixing a requirements error grows exponentially the later it's found. A mistake found in requirements review costs almost nothing to fix. The same mistake found in production can cost 100x more in rework, lost data, and customer trust.
Q3
Analyze
What is ethnography in requirements elicitation and why is it sometimes better than interviews?
Ethnography = observing users in their real work environment. People often can't articulate what they do or what they need (tacit knowledge). Watching them reveals real workflows, pain points, and workarounds that they'd never mention in an interview.
Up Next → Week 05
System Modeling (UML)
5 UML diagrams every junior developer should know
Continue → Week 05