Understanding and maintaining code
Document content and editorial review: approved on 2026-11-16 by Codex under the repository user’s delegated review. Approval covers this explanation and its stated evidence limits; semantic, mapping, lifecycle and target states remain independent.
This guide evaluates understanding a specified change and completing maintenance correctly. Definitions live in the linked Evolution and verification family; the exercise below is synthetic.
Conceptual overview
%%{init: {'theme':'base','fontFamily':'Arial, sans-serif','themeVariables':{'lineColor':'#8792a2','textColor':'#f8fafc','nodeTextColor':'#f8fafc','primaryTextColor':'#f8fafc','arrowheadColor':'#8792a2','dropShadow':'none','useGradient':false,'edgeLabelBackground':'#252b36','fontSize':'16px'}}}%%
flowchart LR
accTitle: G07 impact-understanding boundary
accDescr: A proposed change and an independent impact key frame investigation; compare complete justified impacts and effort before deciding. The diagram is an illustrative evaluation map.
A["Change request and impact key"]:::context -->|evaluate| B["Investigation, review and corrections"]:::measure
B -->|check| C["Complete impacts within effort limit"]:::quality
classDef context fill:#343c4b,color:#f8fafc,stroke:#8792a2,stroke-width:2px
classDef measure fill:#503824,color:#f8fafc,stroke:#8792a2,stroke-width:2px
classDef quality fill:#24452a,color:#f8fafc,stroke:#8792a2,stroke-width:2pxText equivalent: a change request and independent answer key frame investigation; compare the required impacts, effort and behavior checks before deciding. Arrows organize evaluation, not domain membership. Provenance: the local synthetic G07 design, not observed TDP architecture.
G07 scenario
All conditions, criteria and results in G07 are illustrative and unapproved. The artifact is a hypothetical validation-rule package at exercise revision A, with its dependency map, configuration and contract fixtures frozen for comparison. It is not a TDP implementation.
| QAS field | Exercise condition |
|---|---|
| Stimulus source | A maintainer unfamiliar with this specific rule, but familiar with the language and test tools. |
| Stimulus | Determine and implement the impacts of changing a threshold’s boundary from exclusive to inclusive. |
| Artifact | Synthetic rule package, its two consumers and persistence adapter at revision A. |
| Environment | Planned maintenance; same machine/tool versions, fixtures, access and task briefing for each comparison. No production access. |
| Response | Explain the boundary change, identify impacts, perform the change, review and verify its behavior. |
| Response measure | Identify all four required impact obligations with no unexplained extra impacts, use at most two engineer-hours, and pass all four behavior obligations. |
The independently prepared answer key requires: (1) correct result exactly at the threshold, (2) unchanged below/above-threshold results, (3) matching validation messages in both consumers, and (4) compatible persisted interpretation of existing values. Count obligations, not edited files. A single file may implement several obligations; a change outside that file can still affect them.
Record each true identified obligation over the fixed four, missed obligations, false-positive impacts and the evidence supporting each. Extra impacts must be justified or withdrawn, rather than silently removed from the denominator. The two-hour total sums every participant’s investigation, implementation, review and corrections through verification. Waiting time is reported separately. Log failed checks and retesting; incomplete work cannot stop its clock at a favorable point. The illustration concerns a small package, not a universal maintenance estimate.
G07 results and decisions
| Synthetic run | Impact evidence | Total effort and behavior | Decision under the illustrative rule |
|---|---|---|---|
| A | 4/4 required impacts, zero unexplained extras | 1.2 investigation + 0.4 implementation + 0.2 review + 0.2 corrections/verification = 2.0 engineer-hours; 4/4 obligations pass | Meets every stated condition at the boundary. |
| B | 3/4 impacts; persistence obligation missed | 1.0 engineer-hour; only 3/4 obligations pass | Fails completeness and correctness despite lower effort. |
Example: one missing impact is material. Run B finds three obligations out of the fixed four, 75%. A 25% omission does not become acceptable because the investigation is faster. In a real study, the answer key itself must be independently checked; this example assumes it for teaching.
One exercise does not establish repeatable improvement. Use matched tasks or counterbalanced independent groups to reduce learning/order effects, record experience and uncertainty, and repeat before causal claims. Do not let the same person memorize the answer key and then count a faster second attempt as treatment benefit.
Complexity and comprehension
State the tool/version and counting rules for every complexity indicator. Cyclomatic complexity counts independent control-flow paths under a selected graph convention; nesting depth and dependency counts answer different questions. No single threshold is approved here. Generated code, excluded files and exceptional paths must be declared. A drop from eight measured paths to four can simply move decisions into another component; inspect the complete task boundary and behavior.
Readability requires a reader’s correct explanation. Conciseness requires economy without lost meaning. A smaller expression can hide exceptions; a longer explicit form can improve comprehension. Record these trade-offs alongside effort and error evidence, not as competing universal style rules.
Techniques and trade-offs
| Question / candidate | Benefit and prerequisites | Cost, limit and interaction | Verification and rejection |
|---|---|---|---|
| Maintainability: explicit maintenance brief and behavior obligations | Defines what correct completion means; requires a credible baseline and independent checks. | Maintaining fixtures and briefing takes effort; easy tasks do not represent all maintenance. | Cost the complete G07 journey; reject omitted obligations even when time passes. |
| Analysability: dependency/impact map | Helps locate causes and consumers; requires current contract/configuration evidence. | Stale maps mislead; producing and reviewing them costs time. | Reconcile each impact to the answer key and supporting evidence; report misses and false positives. |
| Modularity: explicit interfaces and dependency rules | May contain propagation when boundaries match change patterns. | Adds contracts and integration checks; coupling can move to shared data. | Trace downstream consumers and regressions; reject a contained file diff that breaks a contract. |
| Structuredness: organize normal/exception paths | Can clarify control and data flow for a stated reading task. | Reorganization costs review and can introduce behavior changes; more folders alone help little. | Ask readers to trace both paths against the key; reject omitted exceptions. |
| Readability: names and explicit rule explanation | Can improve correct understanding for intended readers. | Naming and explanation need maintenance; familiarity biases results. | Use matched tasks and reader explanations, not line counts. |
| Conciseness: remove unnecessary repetition | Can reduce material a reader must inspect when repetition has no purpose. | Compression can hide meaning; abstraction adds indirection and affects testability. | Preserve behavior and correct explanations; reject shorter expressions that increase misunderstanding. |
| Complexity indicator | Locates investigation candidates if the graph/counting boundary is explicit. | Tool conventions and moved logic affect values; no causal guarantee. | Inspect complete scope and reconcile with comprehension/correctness evidence. |
Technical prerequisites include read access to synthetic source and fixtures, no production credentials. Use sanitized examples and least-privilege review access. Maintainability is not a mandate to expose internal source publicly. For source modification and testing, follow the G09 and G08 questions without duplicating their definitions.
Aliases and source limits
The ISO/IEC 25010:2023 catalogue, consulted 2026-11-16, confirms Published edition 2 (2023-11) and a nine-characteristic product model. It does not verify exact definitions, subcharacteristic parentage or equivalence to these local readings. The withdrawn 2011 edition and the 2023 edition remain distinct source contexts. Preserve possible Maintainability, Testability, Modifiability, Reusability, Adaptability and Replaceability classifications as proposals pending primary full-text verification, rather than infer a taxonomy from this navigation.
arc42 Q42, consulted 2026-11-16, supplies overlapping reading tags. Its maintainable tag mentions analyzable, modifiable, testable and debuggable; flexible also addresses runtime configuration. Its attribution of structuredness, conciseness and legibility to older models is secondary. No original Boehm definition is asserted here. Q42’s tags do not define ISO membership or confirm a local synonym.
The historical six-field method is attributed to Bachmann, Bass and Klein, SEI CMU/SEI-2003-TR-004, section 2.1, as recorded in the existing source register. The attempted current SEI HTML address returned no substantive report body; neither report content nor a PDF was newly inspected. The SEI report is a primary lead, not a newly verified definition. This guide uses the existing local six-field template and labels all exercise design as an author proposal. No Tdp.Backend repository or runtime was examined.
Code Legibility maps provisionally to Readability, separately from UI legibility. analyzability and Analyzable map provisionally to Analysability. These are scoped candidate mappings, not confirmed synonyms. Structuredness and Conciseness retain their separate proposed local questions.
Applying the decision
Use the prioritization method to select a valuable change journey and its technical risk before agreeing targets. Record expected benefit, uncertainty, evidence cost and the owner’s decision separately. No priority, budget, deadline, applicability or target is approved by this example. A new candidate needs a source, disposition and owner before inclusion; unresolved equivalence can remain visibly pending without inventing a definition.
Audience paths
The executive discussion explains risk and delivery cost; the technical discussion links the measurement and rejection rules.