Glossary
The vocabulary of software construction can look like a language of its own for its own sake. It is not. Engineers build systems no one person can fully comprehend, and much of their work is therefore reaching agreement with others about code. Terms like invariant or coupling compress a paragraph of explanation into something two people can say in a code review and mean the same thing. Precise names also make distinctions visible: fault, error, and failure pick out three different things, and refactoring means restructuring code without changing its behaviour. So this glossary is less a list of words than an index of distinctions, the ones that let you describe what would otherwise stay vague.
Terms introduced in bold throughout the textbook, linked to the section where each is first introduced.
A B C D E F G H I J K L M N O P Q R S T U V W
A
- Abstract — Extending Behaviour Through Polymorphism § Abstract Base Classes
- Abstract Value — Preserving Implementation Freedom with Abstract Values § What Makes a Change Safe
- Abstraction — Building Abstractions with Classes § Classes and Constructors
- Access Modifier — Encapsulating What Varies § Hiding the Representation
- Accumulator — Arrays and Iteration §
reduce: Combining - Adapter — Consuming Data and Services by Using APIs § Isolating Dependencies
- Aggregation — Decomposing Systems into Cohesive Classes § Delegation Through Composition and Aggregation
- Aliases — Mutation and Side Effects § Copies and References
- API — Consuming Data and Services by Using APIs
- Arguments — Learning a New Programming Language § Types in TypeScript
- Array — Arrays and Iteration
- Array Literal — Arrays and Iteration § Creating and Using Arrays
- Arrow Function — Learning a New Programming Language § Testing the Dynamic View
- Assert — Checking Invariants § Precondition Violations
- Assertion — Checking Invariants § Testing Invariants
- Assignment — Mutation and Side Effects § Reassignment
B
- Base Class — Extending Behaviour Through Polymorphism § Abstract Base Classes
- Behaviour-Driven Development — Validating Behaviour § From
checkExpecttoexpect
- Block — Learning a New Programming Language §
ifstatements - Block Scope — Mutation and Side Effects § Scope: Where Names Live
- Blocking — Asynchronous Effects and Time § How Long Computers Wait
- Body — Consuming Data and Services by Using APIs § Calling a Web Service
- Boundary Value Analysis — Checking Invariants § Deriving Tests
- Branch — Learning a New Programming Language §
ifstatements - Branch, Else — Learning a New Programming Language §
ifstatements - Branch, Then — Learning a New Programming Language §
ifstatements - Branch Coverage — Validating Behaviour § Code Coverage
- Breaking Change — Designing APIs to Provide Data and Services § Choosing the Surface
- Breakpoint — Mutation and Side Effects § State Gives Loops a Memory
C
- Call Stack — Designing for Failure § Throwing an Exception
- Callback — Asynchronous Effects and Time § Callbacks
- Characterisation Test — Code Quality and Refactoring § Risk Now, Benefit Later
- Class — Building Abstractions with Classes
- Client — Maintaining Invariants § Constructor Functions
- Closed for Modification — Growing Systems with the Open/Closed Principle § Open and Closed
- Closure — Maintaining Invariants § Hiding State with a Closure
- Code Coverage — Validating Behaviour § Code Coverage
- Code Fluency — UBC CPSC 210: Software Construction
- Code Smell — Code Quality and Refactoring § Reading the Symptoms
- Code Under Test — Checking Invariants § The Testing Process
- Cohesion — Decomposing Systems into Cohesive Classes
- Collaborator — Decomposing Systems into Cohesive Classes § Delegation Through Composition and Aggregation
- Command-Query Separation — Adding New Features § Forcing the Change In
- Comparator — Arrays and Iteration §
toSorted: Ordering - Compiler — Learning a New Programming Language § Programming Languages
- Composition — Decomposing Systems into Cohesive Classes § Delegation Through Composition and Aggregation
- Composition Root — Consuming Data and Services by Using APIs § Supplying the Dependency
- Compound Types — Using Types to Model Problems
- Concern — Coupling and Dependencies § Cohesion and Coupling
- Constructor Function — Maintaining Invariants § Constructor Functions
- Contract — Checking Invariants § Documenting Invariants
- Control Flow — Learning a New Programming Language §
ifstatements - Controllability — Encapsulating What Varies § Designing for Testability
- Copy, Deep — Encapsulating What Varies § When References Escape
- Copy, Shallow — Encapsulating What Varies § When References Escape
- Coupling — Coupling and Dependencies
D
- Data Definition — Using Types to Model Problems
- Debugger — Mutation and Side Effects § State Gives Loops a Memory
- Decomposition — Decomposing Systems into Cohesive Classes
- Default Parameter Value — Preserving Implementation Freedom with Abstract Values § Immutable Values
- Defensive Copying — Encapsulating What Varies § When References Escape
- Deferred Computation — Asynchronous Effects and Time § One Thread at a Time
- Delegation — Decomposing Systems into Cohesive Classes § Delegation Through Composition and Aggregation
- Dependency — Coupling and Dependencies § What Coupling Is
- Dependency Injection — Consuming Data and Services by Using APIs § Supplying the Dependency
- Dependency Inversion — Growing Systems with the Open/Closed Principle § The Principles Together
- Dependency Inversion Principle — Growing Systems with the Open/Closed Principle § The Principles Together
- Deserialisation — Consuming Data and Services by Using APIs § What Serialisation Loses
- Design by Contract — Encapsulating What Varies § Maintaining the Invariant
- Discriminator — Using Types to Model Problems § Playlists
- Doc Comment — Checking Invariants § Documenting Invariants
- Don't Repeat Yourself — Extending Behaviour Through Polymorphism § Abstract Base Classes
- Dot Notation — Using Types to Model Problems § Reading an Object's Properties
- Dynamic — Learning a New Programming Language § Static and Dynamic Views
- Dynamic Dispatch — Extending Behaviour Through Polymorphism § Dynamic Dispatch
- Dynamically-Typed — UBC CPSC 210: Software Construction § Language Choice
E
- Edge — Consuming Data and Services by Using APIs § Data Without Invariants
- Encapsulation — Encapsulating What Varies
- Equivalence — Preserving Implementation Freedom with Abstract Values § Two Notions of Sameness
- Equivalence Class Partitioning — Checking Invariants § Deriving Tests
- Equivalence Classes — Checking Invariants § Equivalence Classes
- Erroneous Outcome — Checking Invariants § Erroneous Outcomes
- Error — Debugging and Fault Localisation § Fault, Error, Failure
- Event — Asynchronous Effects and Time § Callbacks
- Event Loop — Asynchronous Effects and Time § Callbacks
- Event-Driven Programming — Asynchronous Effects and Time § Callbacks
- Exception — Designing for Failure § Throwing an Exception
- Exceptions, Checked — Designing for Failure § Results or Exceptions?
- Exceptions, Unchecked — Designing for Failure § Results or Exceptions?
- Expressions — Learning a New Programming Language § Control Flow Statements
- Extension — Extending Behaviour Through Polymorphism
- Extension Point — Growing Systems with the Open/Closed Principle § The Axis of Change
F
- Failure — Debugging and Fault Localisation § Fault, Error, Failure
- Failure, Returned — Designing for Failure § Results or Exceptions?
- Failure, Thrown — Designing for Failure § Results or Exceptions?
- Falsy — Uncovered Language Features § Truthiness
- Fan-In — Coupling and Dependencies § What Coupling Is
- Fan-Out — Coupling and Dependencies § What Coupling Is
- Fault — Debugging and Fault Localisation § Fault, Error, Failure
- Fault Localisation — Debugging and Fault Localisation
- Field — Building Abstractions with Classes § Class State
- Fragile Base Class Problem — Extending Behaviour Through Polymorphism § Composition Over Inheritance
- Fulfilled — Asynchronous Effects and Time § Promises: A Future Value
- Functional Programming — Building Abstractions with Classes § Programming Paradigms
G
- Garbage Collection — Mutation and Side Effects § Scope: Where Names Live
- Generic Type — Using Types to Model Problems § Playlists
- Global Variable — Building Abstractions with Classes § Keeping State Consistent
- God Class — Decomposing Systems into Cohesive Classes § How Classes Lose Cohesion
- Greenfield Development — Part 3: Enabling Evolution
H
- Higher-Order Function — Learning a New Programming Language § Testing the Dynamic View
- Hyrum's Law — Designing APIs to Provide Data and Services § Publishing the Tracker
I
- IDE — Learning a New Programming Language § Compiling and Checking
- Idempotent — Consuming Data and Services by Using APIs § Three Ways a Call Fails
- Identity — Preserving Implementation Freedom with Abstract Values § Two Notions of Sameness
- Immutable — Mutation and Side Effects § Scope: Where Names Live
- Immutable Object — Preserving Implementation Freedom with Abstract Values § Immutable Values
- Imperative Programming — Building Abstractions with Classes § Programming Paradigms
- Implementation Freedom — Preserving Implementation Freedom with Abstract Values
- Index — Arrays and Iteration § Creating and Using Arrays
- Information Hiding — Encapsulating What Varies
- Inheritance — Extending Behaviour Through Polymorphism
- Instance — Building Abstractions with Classes § Classes and Constructors
- Instantiating — Building Abstractions with Classes § Classes and Constructors
- Interface — Defining Boundaries with Interfaces
- Interface Segregation Principle — Defining Boundaries with Interfaces § Keeping Interfaces Small
- Invariants — Checking Invariants § What Is an Invariant?
J
- JSON — Asynchronous Effects and Time § Reading and Writing JSON
- JSON Array — Asynchronous Effects and Time § Reading and Writing JSON
- JSON Object — Asynchronous Effects and Time § Reading and Writing JSON
K
L
- Lambda Expressions — Learning a New Programming Language § Testing the Dynamic View
- Law of Demeter — Coupling and Dependencies § Reaching Past a Neighbour
- Library API — Consuming Data and Services by Using APIs § Two Kinds of API
- Lifecycle Hooks — Validating Behaviour § Shared Setup
- Line Coverage — Validating Behaviour § Code Coverage
- Liskov Substitution Principle — Extending Behaviour Through Polymorphism § Honouring the Contract
- Logical Operators — Learning a New Programming Language § Combining Conditions
- Loop — Arrays and Iteration § Writing Your Own Loops
M
- Memory Address — Mutation and Side Effects § Copies and References
- Method — Building Abstractions with Classes § Class Functionality
- Method Signature — Defining Boundaries with Interfaces § Declaring an Interface
- Mock Object — Defining Boundaries with Interfaces § Test Doubles
- Mutable Object — Preserving Implementation Freedom with Abstract Values § Immutable Values
- Mutation — Mutation and Side Effects
N
- Non-Local Return — Designing for Failure § Exception Propagation
O
- Object — Using Types to Model Problems § Songs
- Object Literal — Using Types to Model Problems § Songs
- Object Type — Using Types to Model Problems § Songs
- Object-Oriented Programming — Building Abstractions with Classes § Programming Paradigms
- Observability — Encapsulating What Varies § Designing for Testability
- Open for Extension — Growing Systems with the Open/Closed Principle § Open and Closed
- Open/Closed Principle — Growing Systems with the Open/Closed Principle
- Operating System — Asynchronous Effects and Time §
asyncandawait - Optional — Designing APIs to Provide Data and Services § Easy to Use, Hard to Misuse
- Options Object — Designing APIs to Provide Data and Services § Easy to Use, Hard to Misuse
- Override — Extending Behaviour Through Polymorphism § Overriding Methods
P
- Parameters — Learning a New Programming Language § Types in TypeScript
- Pass-by-Reference — Mutation and Side Effects § What a Function Can Change
- Pass-by-Value — Mutation and Side Effects § What a Function Can Change
- Path — Checking Invariants § Equivalence Classes
- Path Coverage — Validating Behaviour § Code Coverage
- Pending — Asynchronous Effects and Time § Promises: A Future Value
- Plugin Architecture — Growing Systems with the Open/Closed Principle § Why Add Instead of Edit
- Pointers — Mutation and Side Effects § Copies and References
- Polymorphism — Extending Behaviour Through Polymorphism
- Postcondition — Checking Invariants § Identifying Invariants
- Precondition — Checking Invariants § Identifying Invariants
- Primitive — Using Types to Model Problems
- Promise — Asynchronous Effects and Time § Promises: A Future Value
- Pure Function — Mutation and Side Effects § Side Effects
Q
- Quality, External — Code Quality and Refactoring § Two Kinds of Quality
- Quality, Internal — Code Quality and Refactoring § Two Kinds of Quality
- Query String — Consuming Data and Services by Using APIs § Calling a Web Service
R
- Reassignment — Mutation and Side Effects § Reassignment
- Recovery — Designing for Failure § Recovering or Reporting
- Refactoring — Code Quality and Refactoring § What Refactoring Is
- Reference — Mutation and Side Effects § Copies and References
- Regression — Validating Behaviour § Regression Testing
- Rejected — Asynchronous Effects and Time § Promises: A Future Value
- Representation — Encapsulating What Varies § Hiding the Representation
- Representative — Checking Invariants § Equivalence Classes
- Resource — Consuming Data and Services by Using APIs § Calling a Web Service
- REST — Consuming Data and Services by Using APIs § Calling a Web Service
- Result Type — Checking Invariants § Erroneous Outcomes
- Return — Learning a New Programming Language §
returnstatements - Ripple Effect — Coupling and Dependencies § The Ripple Effect
- Robustness Principle — Designing APIs to Provide Data and Services § Breaking Changes
- Runtime — Learning a New Programming Language § Static and Dynamic Views
- Runtime Environment — Checking Invariants § Precondition Violations
S
- Scattering — Coupling and Dependencies § Cohesion and Coupling
- Schema — Consuming Data and Services by Using APIs § Using a Schema Library
- Scope — Mutation and Side Effects § Scope: Where Names Live
- Semantic Versioning — Designing APIs to Provide Data and Services § Breaking Changes
- Sentinel Values — Designing for Failure § Returning a Failure Value
- Separation of Concerns — Coupling and Dependencies § Cohesion and Coupling
- Serialisation — Consuming Data and Services by Using APIs § What Serialisation Loses
- Short-Circuit Evaluation — Learning a New Programming Language § Combining Conditions
- Side Effect — Mutation and Side Effects § Side Effects
- Signature — Learning a New Programming Language § Types in TypeScript
- Single Responsibility Principle — Decomposing Systems into Cohesive Classes § Single Responsibility
- Specification-Based Testing — Validating Behaviour § Specification-Based Testing
- State — Mutation and Side Effects § Reassignment
- Statement — Learning a New Programming Language § Control Flow Statements
- Static — Learning a New Programming Language § Static and Dynamic Views
- Statically-Typed — UBC CPSC 210: Software Construction § Language Choice
- Status Code — Consuming Data and Services by Using APIs § Calling a Web Service
- Strictly Equal — Using Types to Model Problems § Branching on the Case
- Structure-Based Testing — Validating Behaviour § Structure-Based Testing
- Stub — Checking Invariants § The Testing Process
- Subclass — Extending Behaviour Through Polymorphism § Abstract Base Classes
- Subtype — Extending Behaviour Through Polymorphism § Honouring the Contract
- Successful Outcome — Checking Invariants § Erroneous Outcomes
- Supertype — Extending Behaviour Through Polymorphism § Honouring the Contract
- Syntax — Learning a New Programming Language § Programming Languages
T
- Tagged Union — Using Types to Model Problems § Playlists
- Tangling — Coupling and Dependencies § Cohesion and Coupling
- Technical Debt — Code Quality and Refactoring § Technical Debt
- Tell, Don't Ask — Coupling and Dependencies § Reaching Past a Neighbour
- Terminal — Checking Invariants § Testing Invariants
- Ternary Operator — Validating Behaviour § Validating with Confidence
- Test Double — Defining Boundaries with Interfaces § Test Doubles
- Tests — Part 1: Foundations of Software Construction § Layered Correctness
- Text Encoding — Asynchronous Effects and Time § Reading and Writing Files
- Thread — Asynchronous Effects and Time § One Thread at a Time
- Threading Model — Asynchronous Effects and Time § One Thread at a Time
- Throw — Designing for Failure § Throwing an Exception
- Thunk — Learning a New Programming Language § Testing the Dynamic View
- Truthy — Uncovered Language Features § Truthiness
- Type, Actual — Defining Boundaries with Interfaces § Apparent and Actual Types
- Type, Apparent — Defining Boundaries with Interfaces § Apparent and Actual Types
- Type Checker — Learning a New Programming Language § Types in TypeScript
- Type Errors — Learning a New Programming Language § Compiling and Checking
- Type Narrowing — Using Types to Model Problems § Branching on the Case
- Type Variables — Using Types to Model Problems § Playlists
- Types — UBC CPSC 210: Software Construction § Language Choice
U
- Unit Tests — Checking Invariants § Testing Invariants
V
W
- Web Service — Asynchronous Effects and Time § Calling Web Services
- Web Service API — Consuming Data and Services by Using APIs § Two Kinds of API