← All submissionsReturn Home ↗
@unix_jim's runlevel-1 Dojo

Modern Code Architectures: When Software Starts Acting for Us

The architectural lineage from representation and state to AI-assisted development, autonomous agents, authority boundaries and secure software.

01 / PROLOGUE

Programming is the act of making structure executable

Programming begins before syntax. Someone has to decide what in a situation matters, which distinctions should survive translation into data, and what the system ought to do when its account of the situation is incomplete. Source code is the durable expression of those decisions. A compiler or interpreter can execute it, but execution does not relieve its author of having chosen a model of the world.

I think of a program as an arrangement of claims about reality and time. A field claims that a fact can be recorded in a particular form. A branch claims that some condition warrants a different action. An interface claims that two parties agree on a meaning. Even a small utility assumes something about its inputs, its users, its environment and the significance of failure. The longer the program lives, the more opportunities those assumptions have to meet an exception.

That is why programming cannot be reduced to knowing the vocabulary of a language. It joins formal reasoning to practical judgement: we make a structure precise enough to run, then remain accountable for what precision omitted. This essay follows that work from the first representation of a value to the point where software acts in the world on our behalf.

A program does not merely describe a possibility. It gives selected assumptions permission to act.
02 / REPRESENTATION

The programmer's first material: representation

A machine handles patterns of bits. We give those patterns interpretations: an integer, a character, a pointer, an instruction. Names let people refer to values without repeatedly describing their location or encoding. Types restrict or document the interpretations that make sense. None of these devices is the thing being represented. They are agreements that make certain operations possible and others suspect.

Precision brings the difference into focus. A finite floating-point value cannot represent every real number exactly. An integer occupies a bounded range. Text needs an encoding, and apparently identical words may have different underlying sequences of characters. A timestamp may record an instant yet fail to explain the local calendar rule a user expected. Such details are not pedantry when a program compares amounts, sorts names or interprets deadlines.

Memory adds a second constraint: values must live somewhere for some period of time. A variable's name does not specify its lifetime, ownership or whether another task can observe a change. When I choose a representation, I ask what information it preserves, what it discards and what operations it invites. The first bug may be written before the first conditional, in the decision that a complex fact fits neatly into a convenient value.

03 / CAUSALITY

Control flow: teaching time to a machine

Sequence gives a program a before and an after. Selection makes the next action depend on a condition. Iteration repeats work until a boundary is reached; recursion expresses work in terms of smaller instances of itself. These familiar forms are more than notation. They specify a theory of causality: which event can affect which result, and under what circumstances execution stops.

Event-driven programs complicate that theory because the environment decides when a handler runs. Asynchronous work allows a task to wait without stopping everything else, but the code after an awaited operation encounters a world that may have changed. An example is a form that checks availability before committing a reservation. The check and the commitment are separate moments; a correct design must say what happens between them, rather than treating the earlier observation as permanent truth.

Good control flow makes consequential decisions visible. A clever expression that compresses several branches may be shorter while obscuring the conditions under which an action occurs. I value an execution path I can explain: where it begins, where it can wait, how it ends and which alternative paths are deliberate. Readability here is not decoration. It is part of our ability to reason about time.

04 / SHAPE

Data structures: choosing what the world looks like

An array makes indexed access straightforward. A linked list privileges insertion and traversal under different conditions. Trees organise hierarchy; graphs represent connections that refuse to fit a single hierarchy. Maps support lookup by key. Queues give waiting work an order. Records and schemas name the fields a domain considers important. Each structure makes some questions cheap and others expensive.

Consider an illustrative directory of organisations. A map keyed by identifier makes one organisation easy to find. A tree might express reporting relationships. A graph might better represent shared projects and overlapping authority. None of these views is false merely because another is useful; each foregrounds a different relationship. Problems begin when a convenient storage layout is mistaken for a complete account of the domain.

Cost is not only computational. Schemas shape migration, validation and the questions future analysts can ask. A missing category may be silently forced into an ill-fitting one. A supposedly optional field may become essential to a downstream process. I try to choose structures with the likely questions in view, while leaving room for reality to resist the categories I first proposed.

05 / RESPONSIBILITY

Functions, modules, and boundaries

Decomposition gives a program parts that can be understood without holding the whole system in mind. A function names an operation and limits the context needed to use it. A module groups related responsibilities. An interface defines what one part offers another; a contract includes the meanings and constraints behind that offer. These boundaries work when their names tell the truth about their responsibilities.

Cohesion asks whether the things kept together belong together. Coupling asks how much one part must know about another. Low coupling is not an end in itself: an excess of tiny interfaces can make an ordinary operation difficult to trace. Nor does a neat directory structure prove that responsibilities are well divided. The useful test is change. Can a rule be revised in one place without a surprising number of unrelated edits?

A function called validate, for example, should not quietly persist a record or contact another service. If it does, callers cannot reason from the name to the effect. Good boundaries do not eliminate coordination; they make it explicit. They let programmers change one decision without first reconstructing every decision nearby.

06 / LEVELS

Abstraction and leakage

Abstraction is a disciplined refusal to consider every detail at once. A collection offers operations instead of exposing its storage layout. A network client presents requests instead of individual transfers. The gain is attention: we can solve the problem at hand without continually rebuilding the machinery underneath it. The danger is assuming that hidden details have ceased to matter.

They return through latency, memory use, ordering and failure. A convenient database call still crosses a boundary and may wait for a contested resource. A collection operation that looks constant-sized in source code may traverse thousands of elements. We call an abstraction leaky when its underlying conditions show through. Some leaks reflect poor design; others reflect constraints no interface could honestly abolish.

Debugging therefore often requires movement between levels of representation. I start with the user's observation, inspect application decisions, then descend towards runtime behaviour or an external contract as evidence warrants. The best abstractions reduce ordinary cognitive load while leaving enough of their costs and guarantees visible to support that descent.

07 / MEMORY

State and mutation

State is what the present inherits from the past. Local state belongs to a narrow scope; shared state can be observed or changed by several participants. Immutable values make a particular value stable, even when a system creates a new value to represent change. Persistence carries state across restarts. A cache holds a copy for speed, a session holds context for continuity, and an event log records changes from which later views may be constructed.

Mutation is useful, but it creates a question: who may change what, and who knows the change has happened? A cache may be stale. A session may expire. An event log may retain an accurate sequence while a derived view applies an outdated interpretation. The same field can be locally correct and globally misleading if readers disagree about its authority or timing.

I prefer to identify an authoritative source, the permitted writers and the lifetime of each copy. This does not mean placing all state in one location. It means stating what different locations mean. Systems become difficult to reason about when their past changes their present through paths nobody has named.

08 / FAILURE

Errors, exceptions, and the shape of failure

A return value can make failure an ordinary outcome that a caller must inspect. An exception can separate unusual failure from a routine result, though it may make control flow less obvious. A type-level error can require callers to account for several outcomes before their code will run. Validation rejects an unacceptable input near its boundary. These are different ways of representing failure, not competing promises that failure will disappear.

Retries can help when a temporary condition changes; they can also repeat an action whose first outcome is unknown. A fallback may keep a service useful, or it may return information so stale that the user needs to know. Graceful degradation means preserving an honest subset of function, not presenting a diminished result as though nothing happened.

I distinguish handling an error from hiding one. Handling it preserves enough context to choose a safe response, tell an affected person what is known and support investigation. Hiding it converts uncertainty into apparent success. That can be more damaging than an explicit interruption, because people act on the false assurance.

09 / TIME

Concurrency and the problem of time

Parallelism uses multiple computing resources at once. Asynchronous programming permits progress while some work waits. Both loosen the simple assumption that source-code order is the whole story. A queue separates the production of work from its completion. A lock protects a shared change. Coordination determines whose observation or update takes precedence.

Ordering becomes especially difficult when participants communicate through messages. One task can finish after another despite starting first. A response may fail to arrive even though the work succeeded. Idempotency gives a repeated request a well-defined effect, which is valuable when a caller cannot tell whether to retry. Partial failure means one part of an operation can complete while another cannot; a design has to say which result remains authoritative.

Concurrency changes my mental model from a single path to a set of possible interleavings. The right question is not merely “Does this work once?” It is “Which outcomes remain valid if observations arrive late, work overlaps, or the same intent is expressed twice?” Those questions belong in the design, not only in a late-stage test.

10 / TRANSLATION

Compilers, interpreters, runtimes, and the layers between intention and execution

Source code is not usually the final action a machine performs. Parsing establishes structure from text. An intermediate representation gives tools a form they can analyse or transform. Compilation may produce executable instructions; interpretation may carry out operations from a representation at runtime. Many systems combine approaches. A virtual machine offers a defined execution environment between a language and the underlying platform.

Linking connects separately prepared components. Optimisation changes how an operation is performed while aiming to preserve its intended meaning. Garbage collection can manage some memory lifetimes, trading manual responsibility for runtime work and its own performance characteristics. Other runtime services may schedule tasks, check bounds or mediate access to operating-system facilities.

These layers matter because intention and execution are not identical artefacts. A source-level operation may become several runtime steps; an error reported at one layer may originate at another. Understanding the path need not mean memorising every implementation detail. It means knowing where to look when a guarantee, cost or failure cannot be explained solely by the line of code in front of us.

11 / EXPRESSION

Programming languages as philosophies of thought

A language suggests what deserves a name and what should be left implicit. Procedural programming foregrounds ordered operations. Object-oriented programming associates behaviour with entities and their boundaries. Functional approaches foreground composition and transformations of values. Logic programming asks for relationships whose consequences can be derived. Declarative approaches specify a desired result while leaving aspects of the procedure to an engine.

Systems languages expose more decisions about memory, resources and execution costs. Scripting languages often make short feedback loops and composition convenient. Domain-specific languages narrow expression deliberately so that a particular kind of rule can be stated clearly. These descriptions overlap in practice: real languages borrow features and real programs use several styles.

I resist treating the choice as a popularity contest. The useful comparison is what each style makes easy to express, what it makes difficult to overlook, and which mistakes its tools can detect. A language can strengthen thought without doing the thinking. Its philosophy is most valuable when a programmer understands both the discipline it offers and the assumptions it encourages.

12 / PEOPLE

Readability, maintenance, and the social life of code

Code is read after the circumstances of its writing have faded. Its readers include maintainers, reviewers, auditors, automated tools and the original author returning months later. Names should carry meaning; documentation should explain purpose and constraints rather than restating each line. Tests record selected expectations and expose regressions, although a passing suite never proves that every important expectation was selected.

Code review brings another person's reasoning to a change. Version control preserves a navigable account of decisions, especially when changes are small enough to explain. Shared conventions reduce the effort of understanding ordinary structure, leaving attention for unusual behaviour. None of these practices substitutes for design, but each helps a team keep design visible.

Technical debt is sometimes a conscious exchange of future work for present speed. It becomes dangerous when nobody records what was borrowed, why, and what would trigger repayment. Maintainability is not a demand for endless polish. It is respect for the people and systems that must understand the code when its first author is not there to explain it.

13 / SYSTEMS

Programming at scale

Libraries and packages let programmers reuse work, while dependency graphs reveal how much outside work a program now relies upon. Build systems turn source and dependencies into artefacts under repeatable rules. APIs let independently developed parts cooperate. Services can be deployed and operated separately, but separation also introduces communication contracts and distributed state.

At this scale the unit of work is often a living system, not a single executable. Observability supplies evidence about its behaviour through carefully designed logs, metrics and traces. Deployment pipelines determine how changes are tested, reviewed and released. A build that succeeds locally is not sufficient if the deployed system cannot be explained, monitored or safely changed.

Scale amplifies small ambiguities. An undocumented field becomes a contract when enough callers depend on it. A library update changes more than one project. A service's idea of “complete” may differ from its caller's. I look for explicit ownership, compatible interfaces and feedback from actual operation. The architectural task is to keep an expanding system governable without pretending it can be held in one person's head.

14 / JUDGEMENT

AI-assisted programming and the return of judgement

Autocomplete and generated code can accelerate drafting, exploration and routine translation between forms. Their suggestions are probabilistic: plausibility is not a contract of correctness. A generated function may look idiomatic while misunderstanding a boundary, missing a failure case or assuming an interface that does not exist. Speed changes the amount of code a person can accept; it does not change the obligation to understand the accepted result.

Provenance matters. Which context was supplied to a model? Which part of an artefact was generated, adapted or independently checked? Verification should address semantics, tests, dependencies, permissions and the behaviour of the complete program, not only whether a fragment compiles. Evaluation must include the tasks and failure modes that matter in its setting. Model boundaries matter too: untrusted retrieved content is not an instruction with the same authority as a developer's deliberate requirement.

I welcome assistance that leaves room for inspection and revision. I distrust a workflow that treats fluent output as evidence. The return of judgement is not a rejection of acceleration; it is the recognition that faster production makes careful acceptance more important, not less.

15 / TRUST

Security as a property of programming decisions

Security begins in ordinary design choices. An input boundary decides what may enter and how it is validated. Identity says who or what makes a request; authorisation determines what that identity may change. Least privilege limits the consequences of an error. Secrets require controlled handling throughout their lifecycle, not merely a place to be written. Data minimisation asks whether information needs to be collected or retained at all.

Dependency provenance concerns the origin and integrity of the components a program incorporates. Safe defaults make the less risky action the ordinary one. Auditability provides enough evidence to understand consequential changes without indiscriminately retaining private data. These concerns meet in code paths, configuration, interfaces and review practices long before anyone runs a security tool.

Defensive programming is not the belief that every input is hostile or every colleague mistaken. It is an acknowledgement that boundaries are crossed, authority is exercised and errors have unequal consequences. A secure design makes those facts explicit enough to check. If security appears only as a final inspection, many of the choices that determine it have already been made.

16 / AGENCY

Programming and autonomous agency

My interest in anticipatory intelligence asks how we can recognise consequential dependencies before they become incidents. Programming gives that question a practical edge when a system is allowed not only to recommend, but to act. Delegation should specify a task, a scope of permission and a point at which the system must ask again. Authority should be bounded by the work intended, not inferred from every capability the software can technically reach.

Feedback tells us whether an action had the expected effect. Observability makes decisions and their consequences legible to reviewers. A human override must be meaningful: a person needs time, information and an actual mechanism to interrupt or reverse an action where reversal is possible. For high-consequence work, bounded action and review points are stronger than an assurance that an agent will generally behave well.

Containing autonomous agency is therefore a programming responsibility as much as a policy statement. We choose interfaces, permissions, limits and records in executable form. The responsible question is not simply whether automation can act, but whether people can understand what it was authorised to do, what it did, and how to regain control when its model of the situation was wrong.

17 / EPILOGUE

The program is an argument

Every program argues for a particular model of the world. Its types distinguish what counts as a valid value. Its branches distinguish what matters enough to change a course of action. Its boundaries distribute knowledge and authority. Its error paths disclose what it expects to survive. Those arguments operate whether or not their authors wrote them down.

Good programming makes the argument explicit, testable and revisable. It uses abstraction without forgetting what lies beneath, and automation without surrendering judgement. It leaves evidence of why a decision was made and enough structure for someone else to challenge it. Correct execution matters deeply; so does the question of whether the executed model deserved to be trusted.

I would call a program successful when the people who depend on it can understand its commitments, recognise when they no longer hold and change them without losing sight of the consequences. We do not merely instruct a machine. We make a set of human choices executable, and remain responsible for the world those choices help to shape.

The strongest program is not the one that hides every decision. It is the one whose decisions can still be examined.

A compact timeline of programming concepts

These approximate periods describe overlapping ideas, not a single sequence of replacement. Older approaches remain useful alongside newer ones.

  1. 1950s–1960sHigh-level languages make algorithms and domain ideas less dependent on machine instructions.
  2. 1960s–1970sStructured programming sharpens reasoning about control flow and program correctness.
  3. 1960s onwardObject-oriented approaches develop ways to group state, behaviour and interfaces.
  4. 1970s onwardFunctional programming ideas expand the use of composition, immutable values and explicit effects.
  5. 1980s–1990sOpen-source collaboration broadens shared maintenance and review practices.
  6. 1990s–2000sScripting and web programming accelerate interactive and networked applications.
  7. 2000s onwardDistributed systems make coordination and partial failure everyday programming concerns.
  8. 2010s onwardModern language tooling strengthens automated checks, builds and developer feedback.
  9. 2020s onwardAI-assisted programming increases drafting speed and the importance of verification.

Sources & further reading

Independent research pointers for the concepts in this essay. The links below lead to publishers or official documentation; select and verify a particular edition or document before using it as a formal citation.

programming software architecture programming languages systems thinking secure software AI-assisted development

Additional evidence & attribution

External research and institutional documentation supporting the specific new arguments above. Interpretive claims and proposed operational frameworks are the author’s synthesis.