liveBook · Manning

Pair programming

As explained in Build High Value Software Systems

A collaborative software-development practice in which two people work together on the same task, typically sharing one computer.

When only one developer understands a component, their absence can turn an incident into a prolonged search for intent. Pair programming reduces that risk by putting two developers on one problem, traditionally at one keyboard. One person works through the code while the other guides, questions, and shares context. The result can be both a better change and another person who understands it. section 13.0 section 13.6

That value is easy to miss when a sprint board shows two people assigned to one task. Pairing is most useful to consider where knowledge transfer and implementation quality matter together: unfamiliar code, consequential design decisions, or work that would otherwise depend on one expert. It can also catch defects during development rather than after a handoff to QA. section 13.6 section 13.4.3

An unfamiliar domain change

A developer needs to add visibility into inventory reservations but has not worked in the domain model. An AI coding assistant configured with the team’s architectural principles can act as a navigator: it can explain unfamiliar code and suggest approaches while the developer drives the change. The developer still owns the quality of any code merged, including edge cases and integration assumptions the assistant misses. section 13.6 section 13.4.3

Listing 13.3 An expanded team persona for AI-assisted pairing
#####Persona#####
You are acting as a Senior Java Architect in a large-scale enterprise system.
 
Context:
- Architecture style: Modular monolith with clear bounded contexts
- Domain: Inventory management across multiple fulfilment centres
- Current modules: inventory-core, reservation, warehouse-gateway, 
  reporting-query
- Key constraint: Domain events are the only allowed communication 
  between bounded contexts. No direct module-to-module calls.
 
Guiding principles:
- Enforce clear separation between domain logic, application services, 
  and infrastructure
- Avoid framework leakage into the domain layer
- Prefer precise types and immutability where practical
- Design APIs for evolution, not convenience
- Favor clarity over cleverness
- New features should be modelled as domain events before considering 
  query optimisation
 
Review lens:
- Challenge any design that bypasses domain events for convenience
- Flag any mutable state in domain objects
- Question any direct dependency between bounded contexts
- Suggest tests that verify domain invariants, not implementation details
###################

This team persona makes architectural guidance available during an AI-assisted pairing session, including bounded-context boundaries and a rule against direct module-to-module calls. section 13.6

Treat the second perspective as a way to expose assumptions, not as a substitute for checking them. Human pairing spreads knowledge as the work happens; AI-assisted pairing can provide guidance when a colleague is unavailable, but the developer must validate the result. section 13.6 section 13.4.3

How Build High Value Software Systems covers it

How deep it goes
Defines the human working arrangement and develops an AI-assisted variant through a scenario and team persona, without prescribing a pairing schedule.
Examples
Illustrates AI-assisted pairing with an inventory-reservation change and a Senior Java Architect persona.
What it assumes
Assumes familiarity with development work but defines the basic two-developer, one-keyboard arrangement.
What you can do after
Practice/perform it by sharing implementation decisions with another developer, or use an AI navigator while retaining responsibility for merged code.
How it connects
Connects pairing to collective code ownership, knowledge transfer, early defect detection, and AI-assisted coding.

Also explained in

Compare how 6 books explain pair programming →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build High Value Software Systems. The section links point to the parts of the book it draws on.