A logbook for curious waters

A working vocabulary

Software Engineering Field Guide

Start with a name you heard or a problem you have met in code. Each article explains the idea, makes it visible in an example, and considers when a different approach would be simpler.

Browse 206 terms or search by name and topic. Examples are available in C# and Python; your language choice follows you between articles.

For the personal argument behind the guide, read The Working Vocabulary of Software Engineering.

Code on concept pages

Refactoring

The mental modelCore

What it means

Refactoring changes how existing code is organized without changing what it does for its callers.

Behavior-Preserving Change

The mental modelCore

What it means

A behavior-preserving change leaves the results and effects that callers rely on unchanged. The code may look different; its promises do not.

Code Smell

The mental modelCore

What it means

A code smell is a noticeable feature of code that suggests a design problem worth investigating. It is a clue, not a verdict.

Design Pattern

The mental modelCore

What it means

A design pattern is a reusable approach to a recurring kind of programming problem, not a block of code to paste into every program.

Cohesion and Coupling

The mental modelCore

Also: high cohesion · loose coupling

What it means

Cohesion asks how well the contents of one component belong together. Coupling asks how strongly one component depends on another.

Encapsulation and Information Hiding

The mental modelCore

What it means

Encapsulation puts data and the operations that manage it together. Information hiding keeps callers from depending on implementation details.

Abstraction and Indirection

The mental modelCore

Also: abstraction layer

What it means

An abstraction describes a capability without exposing all its details. Indirection reaches a capability through another object, function, or reference.

DRY: One Source of Truth

The mental modelCore

Also: don't repeat yourself · DRY · one source of truth

What it means

DRY means Don't Repeat Yourself: keep one authoritative representation of a rule instead of maintaining several copies that must agree.

KISS: Keep the Design Simple

The mental modelCore

Also: KISS · keep it simple · keep the design direct

What it means

KISS favors the simplest design that clearly and correctly meets the actual requirements. Simplicity is about understanding, not character count.

YAGNI: You Aren't Gonna Need It

The mental modelCore

Also: you aren't gonna need it · YAGNI · build for evidence

What it means

YAGNI means not building a capability merely because you imagine needing it later. Meet the current need, and keep the code easy to change.

Single Responsibility Principle

The mental modelCore

Also: SRP · SOLID

What it means

Separate the rules that determine a quest reward from the words that announce it.

Open/Closed Principle

The mental modelCore

Also: OCP · SOLID

What it means

Add another discount without rewriting the checkout that uses it.

Liskov Substitution Principle

The mental modelCore

Also: LSP · SOLID

What it means

Two discount classes have the same method. Only one keeps the promise that checkout relies on.

Interface Segregation Principle

The mental modelCore

Also: ISP · SOLID

What it means

A screen that looks up an email address should not require an object that can also edit it.

Dependency Inversion Principle

The mental modelCore

Also: DIP · SOLID

What it means

Let an inventory rule ask for a restock notice without depending on the code that delivers it.

Composition over Inheritance

The mental modelCore

What it means

Composition gives an object other objects to use. Inheritance makes a class a kind of another class. Prefer composition when you want to combine or exchange capabilities rather than declare a true subtype.

Dependency Injection

The mental modelCore

Also: DI · inversion of control · IoC

What it means

Dependency injection means supplying an object with something it needs, rather than making it construct or locate that dependency itself.

Immutability

The mental modelCore

What it means

An immutable value does not change after it is created. An update produces a new value instead of altering the original.

Functional Core, Imperative Shell

The mental modelBroader

Also: functional core · imperative shell

What it means

Keep calculations that decide what a result should be separate from the code that reads, writes, and acts on the outside world.

Command-Query Separation

The mental modelBroader

Also: CQS

What it means

A query asks for information without changing the relevant state. A command changes state. Keeping those jobs distinct makes calls easier to understand.

Long Method

BloatersCore

What it means

A method becomes troublesome when a reader must keep several separate jobs and their details in mind at once. Its length is a clue; mixed responsibilities are often the real problem.

Large Class

BloatersCore

What it means

A Large Class has accumulated enough data and responsibilities that it is difficult to understand or change. Groups of members serving different purposes often reveal where to split it.

Primitive Obsession

BloatersCore

What it means

Primitive Obsession uses plain strings or numbers for concepts that have their own rules, units, or behavior, leaving callers to repeatedly reconstruct that meaning.

Long Parameter List

BloatersCore

What it means

A Long Parameter List makes a caller supply so many separate values that their order, relationships, and meaning become difficult to verify.

Data Clumps

BloatersBroader

What it means

Data Clumps are groups of values that repeatedly appear together. Their repeated pairing can reveal a useful concept that the code has not named.

Switch Statements

Object-oriented abusersCore

What it means

When adding one membership means finding and changing the same decision in several places.

Temporary Field

Object-oriented abusersBroader

What it means

A Temporary Field stores a value on an object even though that value is meaningful only during one operation. Working variables are often better kept local to that operation.

Refused Bequest

Object-oriented abusersSpecialized / reference

What it means

Refused Bequest describes a subclass that inherits operations or state it does not need or cannot sensibly support. The inheritance relationship may be the wrong one.

Alternative Classes with Different Interfaces

Object-oriented abusersSpecialized / reference

What it means

Two classes provide the same useful capability but expose different operations, forcing callers to remember which kind they received. A common interface or adapter can remove that distinction.

Divergent Change

Change preventersCore

What it means

Divergent Change means one class or module must repeatedly change for unrelated kinds of requirement. Different jobs have collected in the same place.

Shotgun Surgery

Change preventersCore

Also: change in many files · coordinated edits across classes

What it means

Shotgun Surgery means one conceptual change requires many small edits across the codebase. A rule or decision has been scattered instead of given a clear home.

Parallel Inheritance Hierarchies

Change preventersSpecialized / reference

What it means

Parallel Inheritance Hierarchies occur when adding a subclass to one family repeatedly requires adding a matching subclass to another family. Composition may remove the duplicated classification.

Comments

DispensablesBroader

What it means

Comments are useful when they explain reasons, constraints, or public promises. They become a design warning when they continually translate confusing code that could explain itself.

Duplicate Code

DispensablesCore

What it means

Duplicate Code repeats the same implementation or rule in several places, making a later correction easy to apply inconsistently. Extract shared meaning, not merely similar characters.

Lazy Class

DispensablesBroader

What it means

A Lazy Class contributes too little to justify the extra object and navigation it introduces. Its remaining work may fit more clearly inside a caller.

Data Class

DispensablesBroader

What it means

A Data Class stores values while other code repeatedly performs the operations and enforces the rules that belong to those values. That can be a missed opportunity for a useful object—or a perfectly good data-transfer design.

Dead Code

DispensablesCore

What it means

Dead Code cannot contribute to the running program: an unreachable branch, an unused local, or an obsolete function with no remaining callers. Remove it after verifying that it truly has no role.

Speculative Generality

DispensablesBroader

What it means

Speculative Generality adds abstractions, options, and extension points for capabilities nobody currently needs. The flexibility has a cost even while it remains unused.

Feature Envy

CouplersBroader

What it means

Feature Envy describes a method that is more concerned with another object's data than with the responsibilities of its own class. Part of the behavior may belong with that data.

Inappropriate Intimacy

CouplersBroader

What it means

Inappropriate Intimacy occurs when classes rely on one another's internal details instead of cooperating through meaningful operations. Changes to those details then spread between the classes.

Message Chains

CouplersBroader

What it means

A Message Chain makes a caller navigate through several objects to reach the information or operation it needs. The caller can become coupled to the internal route rather than the useful answer.

Middle Man

CouplersBroader

What it means

A Middle Man mostly forwards calls to another object without adding a useful responsibility or protecting a meaningful boundary. Removing it can make the real work easier to find.

Incomplete Library Class

Other original smellSpecialized / reference

What it means

An Incomplete Library Class provides most of what an application needs but lacks a useful operation, and its source is outside the application's control. Add the missing behavior without scattering workarounds.

Flag Arguments and Boolean Blindness

Modern smells worth addingCore

What it means

A flag argument makes a function choose between operations. A bare true or false often hides which operation a caller intended.

Hidden Global State

Modern smells worth addingCore

What it means

Hidden global state is shared, changeable data that a function reads without receiving it as an argument or declared dependency.

Mutable Shared State

Modern smells worth addingCore

What it means

Mutable shared state is data that more than one part of a program can change. A change through one reference can surprise code using another.

Temporal Coupling

Modern smells worth addingCore

What it means

Temporal coupling means operations must happen in a particular order, but the interface makes that ordering easy to overlook.

Leaky Abstraction

Modern smells worth addingCore

What it means

An abstraction leaks when callers must understand details it was supposed to hide in order to use it correctly.

Dependency Cycles

Modern smells worth addingCore

What it means

A dependency cycle occurs when following what components depend on eventually leads back to the starting component.

Sync-over-Async

Modern smells worth addingCore

What it means

Sync-over-async turns an asynchronous operation into a blocking call, potentially wasting threads or preventing the operation from completing.

Chatty I/O and N+1 Queries

Modern smells worth addingCore

What it means

N+1 queries retrieve a list once and then make another request for each item. Small requests can add up to a slow page.

Catch-all Exception Handling

Modern smells worth addingCore

What it means

A catch-all becomes dangerous when it converts unrelated failures into the same apparently successful result.

Anemic Domain Model

Modern smells worth addingBroader

What it means

An anemic domain model stores business data in objects while the rules governing that data live elsewhere.

Distributed Monolith

Modern smells worth addingBroader

What it means

A distributed monolith runs in separate services but remains so tightly coupled that changes and releases must move together.

Test Smells

Modern smells worth addingCore

What it means

Test smells are clues that tests are hard to trust, understand, or maintain, even when they currently pass.

Extract Method

Composing methodsCore

What it means

Extract Method moves a piece of code into a named method and replaces the original statements with a call to it.

Inline Method

Composing methodsCore

What it means

Inline Method replaces a call with the called method's body when the extra method no longer adds useful meaning.

Extract Variable

Composing methodsCore

What it means

Extract Variable gives part of an expression a name so the reader can understand what that value represents.

Inline Temp

Composing methodsBroader

What it means

Inline Temp replaces an unnecessary temporary variable with the expression assigned to it.

Replace Temp with Query

Composing methodsBroader

What it means

Replace Temp with Query moves a calculation from a local variable into a method that returns the calculated value.

Split Temporary Variable

Composing methodsBroader

What it means

Split Temporary Variable gives separate names to unrelated values that previously reused one local variable.

Remove Assignments to Parameters

Composing methodsBroader

What it means

Keep an input parameter's meaning stable by storing an adjusted value in a separate local variable.

Replace Method with Method Object

Composing methodsSpecialized / reference

What it means

Turn a complicated operation into a short-lived object so its inputs and intermediate calculations can be organized into smaller methods.

Substitute Algorithm

Composing methodsBroader

What it means

Substitute Algorithm replaces the procedure used to calculate a result while preserving the result and other required behavior.

Move Method

Moving features between objectsCore

What it means

Move Method relocates behavior to the class or module where it belongs, then updates callers to use its new home.

Move Field

Moving features between objectsBroader

What it means

Move Field relocates stored data to the object whose responsibilities it supports.

Extract Class

Moving features between objectsCore

What it means

Extract Class moves a coherent group of fields and methods into a new class with its own clear purpose.

Inline Class

Moving features between objectsBroader

What it means

Inline Class moves a class's remaining data and behavior into another class when the separate type no longer has a useful job.

Hide Delegate

Moving features between objectsBroader

What it means

Hide Delegate lets a caller ask one object for a result without navigating through that object's internal collaborators.

Remove Middle Man

Moving features between objectsBroader

What it means

Remove Middle Man lets callers use a collaborator directly when a forwarding class adds little beyond repetitive wrappers.

Introduce Foreign Method

Moving features between objectsSpecialized / reference

What it means

Introduce Foreign Method puts a missing operation for a type you cannot edit into a clearly named helper that accepts that type.

Introduce Local Extension

Moving features between objectsBroader

What it means

Introduce Local Extension groups extra operations around a library type you do not control, usually using a wrapper.

Self-Encapsulate Field

Organizing dataSpecialized / reference

What it means

Self-Encapsulate Field makes a class use its own accessors rather than reading and writing a field directly throughout its methods.

Replace Data Value with Object

Organizing dataCore

What it means

Replace a primitive value with a small object when the value has a distinct meaning or rules that deserve one home.

Change Value to Reference

Organizing dataBroader

What it means

Change Value to Reference makes objects representing the same real-world identity share one authoritative instance instead of carrying independent copies.

Change Reference to Value

Organizing dataBroader

What it means

Change Reference to Value treats an object as a value described by its contents, replacing it when those contents change rather than mutating shared identity.

Replace Array with Object

Organizing dataBroader

What it means

Replace Array with Object gives named fields to array positions that represent different kinds of information.

Duplicate Observed Data

Organizing dataSpecialized / reference

What it means

Move business data out of a user-interface control into a model, then keep the displayed copy synchronized with that model.

Encapsulate Field

Organizing dataBroader

What it means

Encapsulate Field replaces direct access to stored data with an explicit access API, creating a place to control future reads and writes.

Encapsulate Collection

Organizing dataBroader

What it means

Keep a collection under its owner's control by exposing safe reads and explicit operations for adding and removing items.

Replace Type Code with Class

Organizing dataBroader

What it means

Replace a primitive category code with a named type so its meaning and permitted values are explicit.

Replace Type Code with Subclasses

Organizing dataBroader

What it means

Represent stable categories as subclasses so category-specific behavior can live with the category instead of repeated type-code checks.

Replace Type Code with State/Strategy

Organizing dataBroader

What it means

Replace a behavior-selecting code with an object that supplies the behavior, so the choice can change without changing the containing object's class.

Replace Subclass with Fields

Organizing dataSpecialized / reference

What it means

Replace subclasses that differ only in constant data with one class whose fields hold those values.

Decompose Conditional

Simplifying conditional expressionsCore

What it means

Decompose Conditional gives meaningful names to a condition and its branch calculations so the decision reads in domain language.

Consolidate Conditional Expression

Simplifying conditional expressionsBroader

What it means

Combine several conditions that lead to the same outcome when they are parts of one meaningful decision.

Consolidate Duplicate Conditional Fragments

Simplifying conditional expressionsBroader

What it means

Move work repeated in every branch outside the conditional, while preserving its order relative to branch-specific work.

Remove Control Flag

Simplifying conditional expressionsBroader

What it means

Replace a variable used only to steer a loop with direct control flow such as break or return.

Replace Nested Conditional with Guard Clauses

Simplifying conditional expressionsCore

Also: guard clause · early return

What it means

Handle exceptional or disqualifying cases early so the normal path does not sit inside a growing pyramid of conditions.

Replace Conditional with Polymorphism

Simplifying conditional expressionsCore

What it means

Move behavior selected by an object's kind into separate implementations, then let callers invoke the shared operation.

Introduce Null Object

Simplifying conditional expressionsBroader

What it means

Replace repeated checks for a missing collaborator with an object that implements the intended do-nothing behavior.

Introduce Assertion

Simplifying conditional expressionsBroader

What it means

An assertion states a condition the programmer believes must already be true at a particular point, making an internal assumption visible and checkable.

Rename Method

Simplifying method callsCore

What it means

Rename Method changes a method's name so callers can understand the operation without inspecting its implementation.

Add Parameter

Simplifying method callsBroader

What it means

Add Parameter lets callers supply information that a function previously obtained internally or could not receive.

Remove Parameter

Simplifying method callsBroader

What it means

Remove an argument the function no longer needs, updating callers and preserving any required work previously performed while producing that argument.

Separate Query from Modifier

Simplifying method callsBroader

What it means

Separate a method that returns information and changes state into a query that observes and an operation that performs the change.

Parameterize Method

Simplifying method callsBroader

What it means

Combine methods that perform the same operation with different fixed values by making the varying value a parameter.

Replace Parameter with Explicit Methods

Simplifying method callsBroader

What it means

Replace a parameter that selects different operations with separate method names that state which operation the caller intends.

Preserve Whole Object

Simplifying method callsBroader

What it means

Pass an existing meaningful object instead of pulling several values out of it only to pass those values together.

Introduce Parameter Object

Simplifying method callsCore

What it means

Group parameters that repeatedly travel together into an object representing the concept they form.

Remove Setting Method

Simplifying method callsBroader

What it means

Remove an assignment operation when a value should be established at construction and remain unchanged afterward.

Hide Method

Simplifying method callsBroader

What it means

Reduce a method's visibility when it is an implementation detail rather than an operation outside callers should depend on.

Replace Constructor with Factory Method

Simplifying method callsCore

What it means

Put object creation behind a named function so callers can state how the object is being created rather than relying only on constructor arguments.

Replace Error Code with Exception

Simplifying method callsBroader

What it means

Report an operation's failure with an exception instead of returning a special value that callers can accidentally treat as success.

Replace Exception with Test

Simplifying method callsBroader

What it means

Use an explicit precondition check for a predictable local condition instead of deliberately triggering and catching an exception.

Pull Up Field

Dealing with generalizationBroader

What it means

Move a field duplicated across subclasses into their common base class when it represents the same concept in every subclass.

Pull Up Method

Dealing with generalizationBroader

What it means

Move equivalent methods from subclasses into their common base class so one implementation supplies the shared behavior.

Pull Up Constructor Body

Dealing with generalizationSpecialized / reference

What it means

Move duplicated initialization from subclass constructors into a common base constructor, preserving the order in which state is established.

Push Down Method

Dealing with generalizationBroader

What it means

Move a method from a base class into the subclasses for which the operation actually makes sense.

Push Down Field

Dealing with generalizationSpecialized / reference

What it means

Move a field out of a base class when it belongs only to some subclasses.

Extract Subclass

Dealing with generalizationBroader

What it means

Create a subclass when a meaningful subset of instances needs specialized behavior that does not belong to every instance of the original class.

Extract Superclass

Dealing with generalizationBroader

What it means

Create a common base class for existing classes that share a genuine contract and implementation.

Extract Interface

Dealing with generalizationCore

What it means

Name the operations a caller needs in a separate interface so the caller does not have to depend on one concrete implementation.

Collapse Interface

Dealing with generalizationSpecialized / reference

What it means

Remove an interface that adds no useful contract or boundary, letting local callers use the concrete component directly.

Form Template Method

Dealing with generalizationBroader

What it means

Extract the differing steps of similar algorithms, then put their common sequence in a base method that calls those steps.

Replace Inheritance with Delegation

Dealing with generalizationCore

What it means

Store and use a helper object instead of inheriting its entire public interface when the relationship is use rather than substitutable identity.

Replace Delegation with Inheritance

Dealing with generalizationSpecialized / reference

What it means

Replace repetitive forwarding with inheritance only when the delegating object genuinely supports the delegate's entire public contract.

Encapsulate Variable

Second-edition and modern additionsBroader

What it means

Put reads and writes of a variable behind named operations so its owner can control access and change its representation.

Rename Variable

Second-edition and modern additionsBroader

What it means

Change a variable's name so it communicates the value's meaning, units, or role without changing the value itself.

Change Function Declaration

Second-edition and modern additionsCore

What it means

Change a function's name or parameters to make its public contract clearer, then migrate callers without accidentally changing their meaning.

Slide Statements

Second-edition and modern additionsSpecialized / reference

What it means

Move related statements next to each other when their dependencies and side effects allow the order to change safely.

Split Loop

Second-edition and modern additionsCore

What it means

Separate a loop doing unrelated jobs into one loop per job, making each calculation easier to understand and change.

Replace Loop with Pipeline

Second-edition and modern additionsCore

What it means

Express a collection transformation as named stages such as filtering and mapping instead of manually managing the result inside a loop.

Split Phase

Second-edition and modern additionsCore

What it means

Separate an operation into stages that work with different kinds of information, passing a clear intermediate result from one stage to the next.

Move Statements into Function

Second-edition and modern additionsBroader

What it means

Move work that callers repeatedly perform beside a function call into the function when that work belongs to the same operation.

Move Statements to Callers

Second-edition and modern additionsSpecialized / reference

What it means

Move work out of a shared function when that work belongs to individual callers rather than to the shared operation.

Replace Derived Variable with Query

Second-edition and modern additionsBroader

What it means

Calculate a value from its authoritative inputs instead of storing a second value that must be updated whenever those inputs change.

Factory Method

Creational patternsCore

What it means

Factory Method lets a base class use an object while a subclass decides which concrete object to create.

Abstract Factory

Creational patternsCore

What it means

Abstract Factory creates a family of related objects through one shared interface, so a caller can choose a compatible family without naming every concrete class.

Builder

Creational patternsCore

What it means

Builder separates the steps used to assemble something from the representation being assembled, allowing one construction process to produce different results.

Prototype

Creational patternsSpecialized / reference

What it means

Prototype creates a new object by copying a configured example, with an explicit decision about which nested values are copied and which are shared.

Singleton Pattern

Creational patternsCore

Also: GoF singleton · global instance

What it means

The Singleton pattern makes a class provide one shared instance through a globally reachable access point while restricting ordinary creation of additional instances.

Singleton Lifetime

Creational patternsCore

Also: DI singleton · container singleton · AddSingleton

What it means

A singleton lifetime reuses one service instance within a defined application or container lifetime; the service does not need to enforce global access or prevent normal construction.

Adapter

Structural patternsCore

What it means

An Adapter translates an existing component's interface into the interface a caller needs, including any necessary conversion of meaning or units.

Bridge

Structural patternsBroader

What it means

Bridge separates two dimensions of variation into cooperating object families instead of creating a subclass for every combination.

Composite

Structural patternsBroader

What it means

Composite gives individual objects and groups of those objects a common operation, so callers can work with either without special cases.

Decorator

Structural patternsCore

What it means

Decorator wraps an object in another object with the same interface, adding behavior before or after delegating the operation.

Facade

Structural patternsCore

Also: facade · façade

What it means

A Facade offers a convenient operation over a subsystem, so ordinary callers do not have to know and repeat its internal sequence of calls.

Flyweight

Structural patternsSpecialized / reference

What it means

Flyweight shares the unchanging part of many objects while keeping each object's individual context separate.

Proxy

Structural patternsCore

What it means

A Proxy stands in for another object through the same interface and controls when or how the real object is accessed.

Chain of Responsibility

Behavioral patternsBroader

What it means

Pass a request through potential handlers until one handles it, without making the sender choose that handler directly.

Command

Behavioral patternsCore

What it means

A Command represents a request as an object, retaining the information needed to execute the request later.

Iterator

Behavioral patternsCore

What it means

An Iterator keeps track of a traversal so callers can visit a collection's elements without managing its internal representation.

Mediator

Behavioral patternsBroader

What it means

A Mediator coordinates interactions between components so those components do not have to know and control one another directly.

Memento

Behavioral patternsSpecialized / reference

What it means

A Memento captures an object's state so that object can restore it later, without making the history manager interpret the state itself.

Observer

Behavioral patternsCore

What it means

Observer lets interested components subscribe to notifications from an object, so the object can announce changes without naming every reaction.

State

Behavioral patternsCore

What it means

State moves behavior that depends on an object's current condition into state objects, allowing the object to change behavior by changing its state object.

Strategy

Behavioral patternsCore

What it means

Strategy puts interchangeable ways of performing one operation behind a common interface, then lets a caller choose which implementation to supply.

Template Method

Behavioral patternsBroader

What it means

Template Method puts an algorithm's overall sequence in a base class and lets subclasses provide particular steps.

Visitor

Behavioral patternsSpecialized / reference

What it means

Visitor puts an operation over several object types in a separate visitor, while each object directs the visitor to its type-specific operation.

Interpreter

Behavioral patternsSpecialized / reference

What it means

Interpreter represents a small language's expressions as objects that know how to evaluate themselves in a supplied context.

Domain Modeling

Domain modeling and architectural boundariesCore

What it means

Domain modeling represents the concepts and rules of the problem being solved, rather than organizing the program only around screens and database tables.

Ubiquitous Language and Bounded Context

Domain modeling and architectural boundariesBroader

Also: bounded context · ubiquitous language · DDD

What it means

Use shared, precise domain terms within a defined part of the system, and translate explicitly when another part uses a different model.

Aggregate and Invariant Boundary

Domain modeling and architectural boundariesBroader

What it means

An aggregate groups domain state that must stay consistent together and exposes a root through which its rules are enforced.

Architectural Boundaries and the Dependency Rule

Domain modeling and architectural boundariesCore

Also: Clean Architecture · dependency rule

What it means

Keep application rules independent of external implementation details by directing source dependencies toward the rules and their contracts.

Ports and Adapters

Domain modeling and architectural boundariesCore

Also: hexagonal architecture

What it means

Ports and Adapters keeps an application's operations separate from the technologies that invoke them or provide their external services.

Modular Monolith Before Microservices

Domain modeling and architectural boundariesCore

What it means

A modular monolith deploys as one application while keeping meaningful internal modules behind explicit contracts and data ownership.

Repository, Unit of Work, and Persistence Ignorance

Domain modeling and architectural boundariesBroader

Also: repository pattern · unit of work

What it means

A repository provides domain-oriented storage access, a unit of work coordinates a set of changes, and persistence ignorance keeps storage machinery out of domain behavior.

CQRS and Event Sourcing

Domain modeling and architectural boundariesBroader

Also: CQRS · event sourcing

What it means

CQRS separates models for changing and reading state. Event sourcing records state-changing facts as the source from which state can be rebuilt. Either can be used without the other.

Testing Strategy

Testing strategy and modern change workflowsCore

What it means

A testing strategy chooses which failures to look for, where to look for them, and what evidence is needed before a change is released.

Unit Tests and Arrange–Act–Assert

Testing strategy and modern change workflowsCore

What it means

A unit test checks a small piece of behavior. Arrange–Act–Assert makes the starting conditions, the operation, and the expected result easy to distinguish.

Integration, Contract, and End-to-End Tests

Testing strategy and modern change workflowsCore

What it means

Integration tests check connections, contract tests check agreements, and end-to-end tests check a complete journey through a defined system.

Test Doubles: Fakes, Stubs, Spies, and Mocks

Testing strategy and modern change workflowsCore

Also: test double · fake · stub · spy · mock

What it means

A test double stands in for a real collaborator. Its name should tell you whether it supplies answers, implements a small working substitute, records calls, or verifies expected interactions.

Characterization and Golden-Master Tests

Testing strategy and modern change workflowsBroader

Also: characterization test · golden master · snapshot test

What it means

Characterization tests record what existing code actually does. A golden master stores a reviewed output so later changes can be compared against it.

Property-Based Testing

Testing strategy and modern change workflowsBroader

What it means

Property-based testing checks general rules across generated inputs instead of relying only on individual examples chosen by the author.

Test-Driven Development

Testing strategy and modern change workflowsCore

Also: TDD · red green refactor

What it means

Test-driven development alternates between a failing test, enough implementation to pass it, and a behavior-preserving improvement to the code.

A Practical Refactoring Workflow

Testing strategy and modern change workflowsCore

What it means

Change one structural idea at a time, preserve observable behavior, and use tests and review to check what automated tools cannot infer.

Branch by Abstraction and Strangler Fig

Testing strategy and modern change workflowsBroader

What it means

Replace a working system gradually by letting old and new implementations coexist behind a deliberate selection point.

Expand–Contract Migration and Progressive Delivery

Testing strategy and modern change workflowsBroader

What it means

Support old and new representations together, migrate their users and data, and remove the old form only after compatibility is no longer needed.

Concurrency versus Parallelism

Concurrency and asynchronous programmingCore

Also: concurrency · parallelism

What it means

Concurrency means work overlaps in progress. Parallelism means work executes at the same time. A program can be concurrent on one thread.

Race Conditions and Critical Sections

Concurrency and asynchronous programmingCore

What it means

A race condition makes correctness depend on timing. Protect the complete operation that must be indivisible, not merely each individual read or write.

Deadlock

Concurrency and asynchronous programmingCore

What it means

Two threads each hold something the other needs. Neither can reach the code that would let go.

Async and Await

Concurrency and asynchronous programmingCore

Also: asynchronous programming · async · await

What it means

Async and await let a function suspend while an operation is incomplete, then continue with its result without turning every wait into a blocked thread.

Cancellation and Timeouts

Concurrency and asynchronous programmingCore

What it means

Cancellation asks work to stop. A timeout limits how long a caller will wait. Neither automatically undoes work that has already happened.

Backpressure and Bounded Concurrency

Concurrency and asynchronous programmingBroader

What it means

Limit active work and control how much unfinished work can accumulate. A semaphore alone does not make an unlimited queue safe.

Structured Concurrency and Task Ownership

Concurrency and asynchronous programmingBroader

What it means

Give related tasks an owner that waits for completion, handles failures, and coordinates cancellation before the operation leaves its scope.

API Design as a Contract

API design and distributed-system failure modesCore

Also: API contract

What it means

An API contract describes what callers may request, what they can expect, and what happens when an operation cannot fulfill the request.

HTTP Semantics and Resource Modeling

API design and distributed-system failure modesCore

Also: HTTP verbs · REST

What it means

Model the thing a client addresses separately from the action requested, and preserve the meanings of HTTP methods and response codes.

API Evolution, Pagination, and Error Contracts

API design and distributed-system failure modesCore

What it means

Let clients navigate bounded results and recognize failures without relying on accidental field layouts, row positions, or human-readable messages.

Idempotency

API design and distributed-system failure modesCore

What it means

An idempotent operation has the same intended effect when repeated as when performed once. Retries need an explicit way to distinguish the same request from a new one.

Partial Failure and Timeout Budgets

API design and distributed-system failure modesBroader

What it means

A distributed operation can partly succeed while its caller sees failure. Allocate waiting time across the whole operation and preserve uncertainty about remote effects.

Retries, Circuit Breakers, and Bulkheads

API design and distributed-system failure modesCore

What it means

Retries repeat recoverable work, circuit breakers stop repeated calls to a failing dependency, and bulkheads keep one dependency from consuming everyone else's resources.

Cache-Aside and Consistency

API design and distributed-system failure modesCore

What it means

Read from a cache first, load missing data from its authoritative store, and decide explicitly how stale a cached answer may be.

Messaging Delivery Semantics

API design and distributed-system failure modesBroader

What it means

A message can be lost, retried, or delivered more than once. Delivery guarantees need a stated boundary, and a consumer must protect the business effects it performs.

Sagas and the Transactional Outbox

API design and distributed-system failure modesBroader

What it means

A saga coordinates local business steps and compensations. A transactional outbox records a state change and an event together before a separate relay publishes the event.

Structured Logging

Observability and reliability feedbackCore

What it means

Record events with stable names and separate typed fields so people and tools can investigate them without parsing improvised sentences.

Metrics, Traces, and Correlation Context

Observability and reliability feedbackCore

Also: distributed tracing · telemetry

What it means

Metrics summarize activity, traces show the work behind individual operations, and correlation context connects records belonging to the same request.

SLIs, SLOs, and Error Budgets

Observability and reliability feedbackBroader

Also: SLI · SLO · service-level objective · error budget

What it means

Measure a user-relevant outcome, choose a reliability target over a defined window, and calculate how much failure that target permits.

Health Checks and Actionable Alerting

Observability and reliability feedbackCore

What it means

Use health checks to make specific routing or recovery decisions, and alert on conditions that require an identifiable response.

Threat Modeling and Secure Design

Security engineeringCore

What it means

Threat modeling examines what a system protects, who can influence it, how it could be abused, and which controls and tests address those risks.

Least Privilege, Authentication, and Authorization

Security engineeringCore

Also: authn · authz · least privilege

What it means

Authentication establishes identity, authorization decides which actions that identity may perform, and least privilege limits access to what is actually needed.

Input Validation and Output Encoding

Security engineeringCore

What it means

Validation decides whether input is acceptable for the operation. Output encoding represents accepted data safely in the specific syntax where it will be displayed.

Secrets, Encryption, and Password Hashing

Security engineeringCore

What it means

Secrets management controls access to credentials, encryption protects recoverable data, and password hashing supports verification without storing a recoverable password.

Secure Defaults and Error Handling

Security engineeringCore

What it means

Secure defaults avoid granting access without an explicit decision, and safe error handling reports failure without exposing sensitive internals or turning uncertainty into permission.

Dependency and Supply-Chain Security

Security engineeringCore

What it means

Protect the code, dependencies, build systems, and release artifacts your application relies on—not just the source files your team writes.

Security Audit Logging

Security engineeringBroader

What it means

Security audit logging records important security-relevant actions with enough trustworthy context to investigate what happened, without leaking the secrets it is meant to protect.

Measure, Profile, and Benchmark

Performance engineeringCore

What it means

Measure the experience that matters, profile where its resources go, then benchmark proposed changes under controlled conditions.

Algorithmic Complexity and Data Structures

Performance engineeringCore

What it means

Algorithmic complexity describes how required work grows with input size; a suitable data structure can change that growth rather than merely make one line faster.

Allocations, Memory, and Data Locality

Performance engineeringBroader

What it means

Allocation creates storage, retention keeps it alive, and data locality concerns how closely the values an operation needs are arranged in memory.

I/O Batching, N+1, and Caching

Performance engineeringCore

What it means

Batch related requests to reduce round trips, and reuse results only for a lifetime in which their freshness is acceptable.

Database Indexes and Query Plans

Performance engineeringBroader

What it means

An index provides another way to locate rows. A query plan shows how the database intends to execute a particular query, including whether that index is used.

Latency, Throughput, and Tail Behavior

Performance engineeringCore

What it means

Latency measures how long an operation takes, throughput measures completed work per time interval, and tail latency describes the slower end of the distribution.

Load, Stress, Soak, and Capacity Testing

Performance engineeringBroader

What it means

Use workload experiments to examine expected traffic, overload behavior, long-running degradation, and the volume a system can sustain while meeting its requirements.