A Field Guide for Computational Thinking

Mental models you can run from statistical mechanics, computer science, information theory, and game theory.
“Think from first principles” is a phrase, not a process. The expert who says it runs an actual procedure they can’t see anymore, and you get the slogan. This manual is the procedure part: a set of models for thinking about yourself, your work, and your systems as computation. The difference between these and most advice is that these compute. “Rest gives energy” describes; a model with costs and states lets you predict, and a model you can’t run isn’t a model, it’s a vibe.
You don’t need to read this in order. Each entry stands alone: the situation it’s for, the model, the move it buys you, and the way it misleads. Bookmark it, and come back to the entry you need when you need it.
1. Your hardware
Every model below prices things in the same two currencies, so meet the currencies first.
Working memory. You can hold about seven things in mind at once, and no amount of effort expands that. So when a task fills you with fog and dread, count what it’s asking you to hold. Usually it wants twenty things compared against each other, in a seven-slot head. The fog isn’t weakness; it’s the correct error message for an impossible request. Next time something feels unstartable, write every piece onto a page (the page is extra slots) and watch the dread shrink to the size of the actual next step.

Willpower. Treat it as a stamina bar with an exchange rate. Every act of resistance (not checking the phone that’s right there, not opening the tab, staying in the chair) costs 2 to 3 units, and it costs that every time the temptation fires. Changing the situation so the temptation never fires costs about 1, once. This one exchange rate explains most of what gets called discipline: the people who look disciplined aren’t paying the resistance tax over and over; they’ve stopped incurring it. Environment design is the whole trade.

Context switching. Switching tasks isn’t free. Every switch dumps the context you’d loaded and starts a cold boot, which is why the same task feels easy at 10am inside a routine and impossible at 4pm between errands. A fixed daily slot for the same kind of work is a warm cache: by the time you sit down, the context is already loaded.
2. Reading the situation
Diagnosis before action. The same buttons produce different results on different days, and these models say why.
State. Behavior doesn’t come from your character; it comes from your state. The urge that owns you in your bedroom at midnight has no pull on a trail at 7am. You didn’t improve overnight; the script that runs in the bedroom doesn’t load on the trail. Behavior turns out to be state-dependent, which changes what you try to fix. Ask what state you’re in before asking what’s wrong with you.

Macrostate and microstate. The load-bearing model of the whole manual, from statistical mechanics. When you boil water, you set a temperature. You don’t care which molecule moves at which speed; billions of arrangements all count as boiling, and any of them cooks the noodles. Temperature is a macrostate: a condition satisfied by countless specific arrangements, the microstates. Every goal exists at both levels, and most planning pain comes from gripping the wrong one. Zoomed in, you’re choosing between arrangements: which task first, which words exactly. Zoomed out, you’re stating what must be true when you’re done: shipped by Friday, under $500, doesn’t read like a robot wrote it. You can feel the wrong zoom physically, as heat in your head while you juggle arrangements that all might work. That heat is the signal to go up a level: state the conditions and let any arrangement that satisfies them win. This is also the master move for working with AI. People get poor results by dictating microstates (edit this word, move that line) when the model is a search engine over arrangements. Hand it the macrostate; let it search. One warning: “make it good” isn’t a macrostate, because it rules nothing out. A real macrostate is specific about what must be true and silent about how.

Algorithmic complexity. Mental work comes in price tiers, and you can read the tier before paying. Recalling something you know: O(1), pennies. Going through a list once (a braindump, a checklist): O(n), cheap, scales with length. Comparing everything against everything (an apartment choice across twelve criteria, untangling which projects feed which goals): O(n²), expensive, because the price grows with the square of the item count. Open-ended pondering with no stopping rule, like “what should I do with my life”: exponential, no listed price, the question will take everything you bring. The move: when work feels crushing, name its tier. Square-tier work isn’t done by grinding but by changing the tier: sort, group, build an index. And exponential questions aren’t answered; they’re replaced with priced ones. “What should I do with my life” has no bottom. “Which of these three options do I kill this month” costs an afternoon.

Hidden state. When the same input produces different outputs, something you can’t see is loaded. An AI agent that nails a task Monday and botches it Wednesday. A collaborator whose output swings on dimensions you never asked them to change. You, sailing after one kind of evening and drowning after another. The probe: change exactly one thing and run it again. If the output shifts only where you changed it, the system is clean. If it shifts where you didn’t touch, it has hidden state (mood, fatigue, an open loop, a stale context), and the hunt is for the hidden variable, not the visible ones.

Incentive gradients. Game theory’s gift to diagnosis: you can’t see anyone’s microstates, their thoughts and plans, but you can see the incentive gradient they stand on, and where a gradient exists, someone will walk down it. That’s why you can predict that a thing will happen without knowing which actor or mechanism will make it happen. It works on yourself too: your own future behavior follows the gradients in your environment more reliably than it follows your intentions. Don’t ask what people (including you) intend. Ask what the terrain rewards, and expect the terrain to win.

Compression. Information theory’s definition of understanding: you understand something when you can compress it, predicting a lot from a little. That’s the test that separates knowing a word from having a model. “Form determines function” compresses a thousand cases into four words, which makes it useful for communication and dangerous for understanding, because the handle makes you feel you understand when you’ve only named. Explaining something simply is compression running in public; if you can’t compress it without losing the mechanism, you don’t have it yet. And it’s why vocabulary matters more than it seems: words are the data structure your thinking runs on, and lossy words (lazy, blocked, broken) throw away exactly the mechanism you needed.

3. Making things cheap
The caching chapter. One theme four ways: pay once, reuse forever.
Caching. Any answer you generate more than once is a computation you should have saved. The explanation of your project you rebuild in every conversation, slightly differently, with sweat. The morning routine re-decided every morning. Generation is expensive and comes out different each time; retrieval is nearly free and comes out the same. Pay full price once, while you’re sharp and the context is loaded, and store the artifact where future-you will trip over it: the one-sentence answer, the checklist, the template, the saved prompt. The tell that a cache is missing: the feeling of having solved this before.

Prefetching. The expensive part of starting isn’t the work; it’s loading the context. So load it when it’s cheap. Five minutes tonight deciding tomorrow’s first task, while today’s context is still warm, means morning-you wakes to instructions instead of decisions. A braindump before deep work pre-loads the slots so the session starts warm. Same work, different price, because the loading moved to when the assets were already in memory.

Activation energy. From chemistry, and the reason environment design beats resolve. Every behavior has a startup cost, and behavior flows toward whatever’s cheapest to start. The phone on the desk is a low barrier you must actively not cross, all day; the phone in a drawer in another room is a high barrier you stop noticing. Same person, same phone, different energy landscape, different behavior, and no willpower spent. Lower the barriers into what you want (shoes by the door, the document already open) and raise them out of what you don’t. Anyone can look disciplined on a landscape they’ve shaped.
Cache invalidation. Every best practice you inherit is a cached answer to a cost question somebody asked long ago, under old priors. Then the priors change and the recipe quietly goes wrong. AI just repriced hundreds of them at once: drafts are no longer expensive, translation is no longer scarce, and “measure twice, cut once” assumed cutting was costly; when cutting is free, you cut five times and keep the best. Audit your inherited practices: find the cost assumption inside each one and check whether it survived.

4. Searching well
Most of life is search — for answers, options, products, routes. Search has actual theory, and it’s learnable.
Testable targets. A search needs a win condition you can check. “Figure out the business” wanders forever because no state of the world counts as done. Write the macrostate: three paying customers, by March, without hiring. Now every day either moved a condition or didn’t, and “am I making progress?” stops being a mood and becomes a measurement.

Binary search. When the space is big (where the bug lives, what’s wrong with the system, which segment wants this) don’t check possibilities one by one. Ask the question that eliminates half of them however it’s answered. “Does the problem still happen when I disable this?” kills half the map either way. Twenty honest yes/no questions can locate one answer among a million possibilities; two to the twentieth is a million. It only works if you ask questions that can genuinely come back no.

Explore vs exploit. Two different activities, fatal when confused. Exploiting is extracting from a spot you’ve already found: efficient, repeatable, blind. Exploring is searching for better spots: wasteful-looking, unrepeatable, and the only source of anything new. The failure isn’t preferring one; it’s doing one while believing you’re doing the other. The veteran farming a shrinking niche who won’t move because every direction looks like a step down? That’s someone whose exploration went to zero without a decision ever being made. Declare which mode you’re in, and what would switch you.

Simulated annealing. At the start of anything new, thrashing is correct. Wild swings, dropped approaches, contradictions: that’s search at high temperature, and to spectators it looks like failure because they can’t see the algorithm. The skill is cooling on schedule: each pass, commit to more and vary less, until the thing sets. People fail in both directions: freezing on the first idea (never hot), or reheating forever and calling it iteration (never cooled). Ask which phase you’re in; the phases have different rules.

Random restarts and ergodicity. Sometimes flawless execution inside your routine still produces nothing, because the routine only ever samples three states of an enormous space. The cravings, the block, the staleness are properties of the states you keep standing in, and you’ve been standing in the same ones for months. Pushing harder in the same state costs 2 to 3 per fight, forever. Jumping states costs about 1: a different city, different hours, one long walk clear across town with no phone. People who try this report something that sounds impossible: compulsions that ruled them at home simply don’t fire elsewhere, because the pull was never in the character. It was in the state. Physicists would say a life that never leaves its region isn’t ergodic: it samples too little of the space to know what’s true of the whole.

Boundary conditions. Some things aren’t goals to optimize or rules to obey. They’re constraints any acceptable solution must satisfy, and they say nothing about the solution itself. “The work shouldn’t feel like suffering” isn’t a goal; it’s a boundary condition, and declaring it as one redirects all your effort from enduring what violates it to redesigning the setup so it holds. Boundary conditions are liberating for exactly that reason: once the walls are set, everything inside them is fair game, and guilt about anything they permit is wasted stamina.

Intelligence. Here’s the fresh take this chapter has been building to: intelligence isn’t a substance, it’s a search structure. Two factors do the work: branching (how many candidate moves get generated) and convergence (whether the process closes in on something and stops). Branching without convergence is a brainstorm that never ships; convergence without branching is a rut executing efficiently. An intelligent process, human or machine, is one that generates real alternatives and then reliably collapses them against a testable target. That’s why the models in this chapter compound: targets give convergence something to converge on, binary search prunes the branches, annealing schedules the ratio between the two. When someone (or something) seems smart, look for the branching and the convergence. When you’re stuck, check which of the two you’re missing.

5. Systems that run without you
Everything above happens in real time. This chapter is what keeps working while you’re not looking, and it’s also what separates an AI setup that compounds from one that resets every session.
State machines. Reliable systems fail at transitions, not states. You don’t fail at “working”; you fail at the transition from dinner to working, and the transition from couch to anything. So design the transitions. An undefined hour is an unguarded transition, and the lowest-cost script wins it by default; the couch routine needs an entry point to run, and entry points can be removed. The same model kills day-ruination logic: a day is a chain of transitions, and the current state determines what’s available next, not the morning’s history. Nothing about a bad 9am locks the 2pm door except your belief that the run is ruined. (The no-history property has a name: Markov.)

Idempotence. An operation is idempotent when doing it twice is harmless, and you should engineer for it, because it deletes an entire category of work: the checking. The pill organizer that shows today’s dose already happened. The checklist that doesn’t mind a re-check. The task that can be re-run over yesterday’s half-finished attempt without breaking anything. Once repetition is safe, “did I already?” stops being a question you carry. This bar matters double for anything you hand to an AI agent, because agents retry, and a retry that double-sends the email is how people learn this word.

Invariants. For anything you maintain, write a check that returns true or false, not a feeling that returns “seems okay I guess.” Every invoice is in exactly one folder. Any note findable in under a minute. The account never dips below one month of costs. Run the checks on a schedule. The difference between a system and a pile is that a system can tell you when it’s broken. Invariants are also how you verify machine work without redoing it: you don’t read every line; you run the checks.
Interfaces. Wherever work crosses a seam (you to an agent, an agent to an agent, this week’s you to next month’s you) the seam is where quality leaks. Two stages that are each 99% reliable can compose into garbage if the handoff is vague, because each one’s small errors become the other’s confusing inputs. The fix is unglamorous and total: specify what crosses. What exactly arrives, what exactly leaves, what counts as done. Tight contracts are the reason strangers’ code can build one system, and vague handoffs are where drift gets in.

Degrees of freedom. When something fails the same way twice, the standard patch is a sign: a reminder, a rule, a note to self. Signs cost willpower to obey and get ignored under load. The stronger patch removes the degree of freedom the failure uses. If the wrong thing can be selected, it eventually will be, so make it unselectable: the account that can’t exceed its cap, the template that can’t render the broken layout, the subscription cancelled instead of resisted. A removed degree of freedom is a failure that no longer needs your vigilance, which is the only kind of fix that survives your bad days. It costs optionality, and that’s the deal: reliability is bought with freedom, deliberately, at the joints you choose.

6. Making progress stick
The difference between activity and progress is whether you can keep what you’ve won.
Convergence. Anything you repeatedly pour effort into (a diet, a codebase, an agent on a long task, an essay under revision) deserves four questions. Is something measurably getting closer? Is there stability between attempts, or does each one re-roll the world? Is there a floor you can’t fall below? Is anything guaranteed never to regress? Four noes means you’re not progressing, you’re oscillating: burning effort to move sideways. From inside, oscillation feels exactly like working hard. The four questions are how you tell the difference, and they run on anything with a loop in it.

Ratchets. When part of the work passes, freeze it. Actually freeze it, not “keep it in mind.” The section that finally reads right gets locked and is never rewritten in later passes. The routine that works gets written down and defended. Progress that can be silently lost will be silently lost, and you’ll re-fight fights you already won, indefinitely, without noticing that’s where the effort goes. A ratchet converts effort from circular to cumulative, which makes it the highest-leverage structure in this manual: not doing more — making done stay done.

Recursion. The same patterns repeat at every scale: folders hold folders, teams coordinate like teams-of-teams, an agent that delegates to agents uses the design one level down. So you don’t design a new system for every size; you find the pattern that contains itself, build it once, and let it nest. The deeper payoff is permission to think small: because the large system is built from the same repeating part as the toy version, understanding the toy is understanding the tower. When something’s too big to reason about, zoom down until it’s toy-sized, solve it there, and ride the pattern back up. Recursion is the license to hop between resolutions freely.

Related articles

How We Generated Millions Of Organic Clicks With Programmatic SEO
most SEO looks like this:

We are in the middle of the digital renaissance, please take advantage of it
We’re in the middle of the second renaissance where proof of work replaces the resume, an audience replaces the employer, and taste replaces credentials.

i created a Grok Bot workflow and earned (full guide)
> I help [who] get [outcome] without [common waste], using [concrete artifacts].