Basic Framework
StructureState Modelingtheoryresearch-cardWhy BASIC Works

Theory Card 058 — State Modeling / Structure

State Modeling — BASIC step map

Research lens

State modeling is the discipline of naming the information that must be carried forward for a solution to work. In the Structure stage of BASIC, the goal is to externalize a plan, invariant, or architecture. That makes this concept especially relevant here, because it shapes how much mental work the candidate is trying to carry at once and what gets made explicit.

This is where most people skip ahead — don't.

Why it matters in SWE interviews

This appears in recursion parameters, DP tables, graph visit states, caches, and system components that hold truth. Assess and Structure together are where the candidate decides what state exists, who owns it, and how it changes. In practice, Structure is where the candidate should ask: What is the sequence, helper structure, invariant, or component map that will carry the solution? That question acts like a cognitive boundary. It protects the answer from turning into an unstructured search.

BASIC move

A strong move here is to make the plan visible before full execution. For State Modeling, that means deliberately naming the important units instead of juggling them implicitly. The interviewer sees cleaner reasoning, and the candidate benefits from reduces hidden-state thinking and makes reasoning inspectable.

Common miss

The miss is burying important state in ad hoc variables without first explaining the model. When that happens, the candidate usually feels busy, but the answer is actually becoming less inspectable.

Practice prompt

“While practicing, pause at the Structure step and explain how State Modeling changes the way you would handle the prompt.”

Common trap
Many candidates treat Structure and Implement as the same step. They start writing code while still figuring out the approach. The result is code that wanders — corrections mid-loop, variable names that stop making sense, backtracking that wastes time. Separate the plan from the execution.

References

S10 S13 S14

Related in Why BASIC Works

January 7, 2023

Why BASIC works for software engineers

BASIC — Breakdown, Assess, Structure, Implement, Check — works for software engineers because it is not just a catchy mnemonic. It is a compact operating system for thinking under…

January 19, 2023

Theory Card 006 — Cognitive Load / Breakdown

Cognitive load theory argues that solving unfamiliar problems can consume the same limited mental resources needed to learn and reason clearly. In the Breakdown stage of BASIC,…

January 21, 2023

Theory Card 007 — Cognitive Load / Assess

Cognitive load theory argues that solving unfamiliar problems can consume the same limited mental resources needed to learn and reason clearly. In the Assess stage of BASIC, the…