The Context is the Source is the Context

When I used to work in teams of software developers, I noticed that for most people, the best documentation got written at two particular times: when they just joined, and when they were about to leave.

People who just joined are trying to work out what is going on. They surface assumptions, inconsistencies and unwritten rules.

People on the way out have years of experience with internal systems. They can capture the why of particular design decisions, protect their soon-to-be-former teammates from hidden landmines, and think about the legacy of their time in the team.

Peter Naur’s idea of programmers building a theory of the code seems pretty explanatory here. On the way in, people are actively building a theory of how the systems work, so it’s easier to write down parts of it explicitly. On the way out, people let go of operational work, and can give themselves biographic permission to generalise a little and pass on key concepts, perhaps at the request of one of those new joiners.

The LLM coding agents being so widely used at the moment have an extreme form of this dynamic. Context window sizes mean they only learn over quite short spans of interaction, and then the context is lost.

As the common developer joke goes, it’s like pair programming with the guy from Memento.

Dominic Fox has been writing an amused, considered series of posts about his experiences working with coding agents at codepoetics. There were posts on building a music synthesizer, on literary pastiche, and the many connections between LLMs and French continental philosophy. And then one post made me write a new programming language.

I took [Naur] to mean that the program itself is the material trace of a process of theory-making, such that the program “bears out” the theory in its own structural idiom. What he actually means is that the activity of programming is one by which programmers form theories in their own minds. The theory does not “live” “in” the program. The program is if anything a sort of dead residue, logic without sense.

The language I built, and am still building, is called notlob. This post is about inspirations for the design. For those more interested in the technical details, here are the git repository and the technical paper.

The question behind notlob is: how can we engineer a program so that everyone and everything working with it grasps the theory of the program?

Fox again:

For me, as I said at the beginning, “programming as theory-building” suggests that the program itself is a relay of thought, a way of throwing the nerves in patterns on a screen. “Theory” is not properly located in individual programmers’ brains, but disseminated among people, organisational structures, exocortical artifacts such as source files, documentation, and running systems.

And sure, the big platform harnesses write memory files to their little private scratch area now, and that does help a bit. And you can write your AGENTS.md and your DESIGN.md and your WATERFALL.md, and they help a bit too. But why pretend that memory – that context – is not part of the system? Those memories are part of the computational and linguistic material from which we engineer. Those markdown files are simply those parts of the program which are literature.

So we might well ask the question: what is source code? My LLM-informed answer is: source code is the bounded, legible input to tools that results in an executable system. The source is the context is the source.

Programming has been here before. Knuth’s literate programming is a technique and set of supporting tools for writing programs that read like literature. Knuth and Naur both recognise the need for a theory of the system, but they disagree violently on where it might be held. For Naur, it’s only in the brain of the programmers working on the system. Even a second team of programmers may have great difficulty rediscovering the theory of the system, even given specs, designs and source code. For Naur, the code is a relic, traces of a departed Derridean spectre. You had to be there, man. What happens in Dev Vegas stays in Dev Vegas.

Knuth is rather less pessimistic. He returns to writing, the antique tech for transmitting information through time and space. Specifically, he turns to the essay, the Enlightenment genre for working through an idea and planting an understanding of it in all the peer intelligences that might read it.

Specification Driven Development is a kind of enthusiastic overreaction to the invention of machine literacy. It is the end of a spectrum where source code can somehow be all theory, and precise determinism is just a compilation pipeline artifact. I don’t buy it. What’s more, it feels like cover for the oldest failure in the book, the wish to dismiss inconvenient technical detail. Code is too useful and too fundamental to give up for long, and if suppressed it will just be reinvented in another place.

Computing is cyclical; the shapes of old solutions reemerge as the balance of forces shift. Our new era of literate machines is the right time to revive literate programming.

The notlob gambit is to work on rethinking what a programming language is. Concise and expressive executable artifacts provide structure that helps LLM agents be productive. Formal predicates and other declarative schemas can be particularly useful. But neither prose nor code will work alone. The machinery of an entirely formal system can only provide evidence of consistency, not the connections to messy physical and social domains where software changes the world.

What this often looks like in notlob, as in a well-written technical report, is a prose statement, some code, perhaps an invariant (as a property test), and a runnable example. They are colocated because it makes the code easier to read as an essay, and because it is cheap to slurp them up together in the same context read.


## Plausible Range
The paper places Mytilene on the range's lower eastern slopes, "at an
altitude between 200m and 900m," without settling on one figure — and
`_horizon_profile` above only tells us the horizon as seen from the one
coordinate we queried, not from anywhere else on that slope. A real
resurvey would need actual candidate coordinates further up the hillside,
which we don't have. As a cheaper, if narrower, proxy we instead ask how
much the horizon changes over the azimuth range immediately around
Alcyone's own setting bearing: a steep local profile there would suggest
nearby sites plausibly see quite different horizons, while a flat one
suggests they don't. PVGIS itself only samples every 7.5 degrees, so the
comparison has to span at least that far — anything narrower would just
be re-reading `_horizon_elevation`'s own straight-line interpolation
between two fixed endpoints, not a second measurement of the terrain.
    PVGIS_SAMPLE_SPACING_DEGREES = 7.5
    def _setting_azimuth_degrees(location, astro_ref, date):
        _, azimuth = _altaz_degrees(
            _star(astro_ref), location, _local_midnight(date, location))
        return azimuth
    def _horizon_sensitivity_degrees(location, astro_ref, date,
                                      delta=2 * PVGIS_SAMPLE_SPACING_DEGREES):
        azimuth = _setting_azimuth_degrees(location, astro_ref, date)
        base = _horizon_elevation(location, azimuth)
        return max(abs(base - _horizon_elevation(location, azimuth + delta)),
                   abs(base - _horizon_elevation(location, azimuth - delta)))
~example
    _horizon_sensitivity_degrees(
        MYTILENE, PLEIADES_ALCYONE, HistoricalDate(570, 1, 26, "BC")) < 1.0

From project Pleiades.

The joints between a domain and the executable formalisms of code that operates on it are the names. Programming lore already recognises the importance of naming things – one of the two hardest things in computer science according to Phil Karlton. If it is a difficult leverage point for embodied human intelligences, consider how much more crucial it is for literate machines whose entire training and inference input is words. (And what is a context window but a form of cache invalidation?) Before LLMs, I already argued for the Confucian primacy of the rectification of names in software, which I termed Name Oriented Software Development. Bringing prose into the scope of the compiler allows machine checkable consistency, at the symbol level, the synonym level, and at more abstract levels. For example, notlob can check whether “always” in prose is accompanied by a neighbouring predicate. LLMs and humans can then do checks and rechecks on whether the predicate makes any sense, or is just a glorified unit test without generalisation. If Confucius and Xunzi give us the rectification of names, and Wittgenstein gives us meaning-as-use, notlob reinforces that constructed meaning by enabling and validating that use.

This leads to the main internal data structure in notlob, the name-graph. The name-graph is an extended parse tree that includes headings, prose, code, predicates, and unit tests, as well as meta-information on how the program is bound together. Notlob allows related concepts to be close to each other in two dimensions: the serial read distance of the file, and the edge traversal of the name-graph. The name-graph is explicitly made available to LLMs through tooling, allowing search to follow the structure of the program, not just the filesystem.

This observation of both formalism and reality from multiple perspectives is inherent to software. Rice’s theorem states that all non-trivial semantic properties of a program are undecidable. That puts a harsh theoretical limit on formalism. William Wimsatt argues that our very concepts of reality and meaning include robustness, of stability under observation from multiple perspectives. “Our concept of an object is of some thing knowable robustly.” We do the same thing in good software. We have the code, and the tests, and feedback from users; perhaps specs and designs, whiteboard sketches, bug reports, lunch conversations. Some of these we can relate with full formal consistency. Some of it is precise technical natural language. Some of it is vibes. We can never fully solve these different elements to catch every verification or validation bug; let alone those moments in development that are not bugs so much as pulling a system out of inchoate desires and interactions. What we can do is have these different incomplete elements perform harmoniously in a theatre of execution and meaning. Indeed, if we use Simondon’s jargon, source code is always a technical object that connects multiple milieus. With an LLM involved, one of those is code and one of them is prose. (And poetry is always hiding somewhere in prose.)

That machines can now read the prose is marvellous, and it also means that the prose is now part of the source code in a way it never was before. The prose that explains why a particular shortcut in executable code is wrong is the necessary context to a machine changing that system. But the existing executable code is also necessary context for that change. The context is the source is the context.


References

Naur (1985) – Programming as Theory Building.

Fox (2026) – Holding A Theory.

Knuth (1984) – Literate Programming.

Burke (2026) – A Literate Programming Environment for Human and Machine Agents.

Burke (2026) – Confucian Software.

Rice (1953) – Classes of Recursively Enumerable Sets and Their Decision Problems.

Wimsatt (2007) – Re-Engineering Philosophy for Limited Beings.

Simondon (1958) – On the Mode of Existence of Technical Objects.

The Bureaucracy of Automatons

An introduction to the notes on Confucian Software.

Software and the Sage

Among the many dissimilarities between software and gentlemen of the classical Chinese Spring and Autumn Period, two in particular stand out. One existed in a pre-scientific feudal society on an agricultural technological and economic base, and the other presupposes the scientific method and a modern (or post-modern) industrial base. Secondly, the concept of virtue or potency (德) is central to The Analects, but software artifacts are, in our day and age, non-sentient. Morality requires some degree of self-awareness – of consciousness – and so software does not itself practice virtue any more than a spoon or a lawnmower.

The immediate relevance, for a developer, of the Analects, are the two other grand concerns of Confucius, which are existential fundaments of software. These are names (名), and the rites (礼).

Continue reading →

The Nobility of Software Development

Confucians represent one of the earliest groups of knowledge workers in human history. They were trained in specialized knowledge for specialized tasks in a complex society, and they had a sense that their specialized knowledge made them an elite group in society. — Marc Hamann

Software development is both meritocratic and social. In the short and thoughtful note above, Marc Hamann argues this makes the thoughts of Confucius particularly relevant to the endeavour.

Marc well describes the sense of recognition I first felt when reading The Analects, the curiosity and respect for people that underlie this jumble of quotes from Confucius and his disciples. He also describes the disconnect between the brittle hierarchies of Confucianism in its most ossified form and the conservative anti-manifesto at its heart.

He also draws a contrast between the trope of the scruffy, arrogant hacker and the gentlemen 君子 in The Analects. Could we instead imagine a kind of nobility to software development? It would imply a sophisticated engagement and sense of duty to society that is the very opposite of the cliched antisocial developer who cares for nothing but code.

Nobility implies privilege and institutionally supported power as well, of course. But software development already has that. Software is pervasive within most social institutions – civil government, banks, the military, manufacturing, energy production, publishing, movies. It’s embedded in the way we communicate with one another and record our personal histories. And the job of software development is embedded along with it. Citizen programmers have jobs in all these places, vote, own houses, and are thoroughly woven into the social fabric.

The scruffy hacker avant-garde exists, and maybe its a breeder for technical innovation, sometimes. But it’s also a mask for hiding behind, and avoiding responsibility, as argued by historians of technology like Leo Marx.

It’s hard to escape that trope without alternatives. Steve Jobs and Bill Gates provide two: the first not scruffy, rigorous in his focus on usable design, the second for his philanthropic ambition. Their fabulous wealth limits our ability to emulate them. Perhaps someone like Confucius, with his respectfulness and humanism, his thoughts on working as part of a flawed system, can offer another model.

VII.1 Reuse

子日,述而不作,信而好古,窃比于我老彭. – 论语 七:一

The Master said, ‘I transmit but do not innovate; I am truthful in what I say and devoted to antiquity. I venture to compare myself to your Old P’eng.’ – Analects VII.1 (Lau)

Before contemplating the process implications of this radically static statement, let’s note that from the perspective of designed code itself, it is always true. Code transforms and transmits information. This is the garbage-in garbage-out principle. Designed code (not genetic or evolved code) does not innovate.

Backups of the user directory for the Analects’ source control repository are, alas, lost to antiquity, and though many sophisticated data recovery techniques have been tried, with some success, none have yielded the identity of Old P’eng. Our ignorance of him highlights our relationship with Confucius and with any classical tradition. To us, Confucius founded a philosophical school, but in his own words he merely continued a tradition that we can see indirectly, if at all.

Scholarly consensus is that Confucius is deliberately overstating his lack of innovation for reasons of rhetoric or modesty (see eg DC Lau, AC Graham, or just wikipedia on this verse). Nevertheless the verse is considered pivotal in understanding Confucius’ traditionalism and conservatism in a time of extraordinary violence and social change.

Existing solutions are useful in at least two ways. 

Firstly they may capture unintuitive theoretical results in accessible ways. Many algorithm design and data structure results are now in this category, such as sorting algorithms and efficient concurrent maps (eg the Java 6 lock free implementation of java.util.ConcurrentHashMap). The formal scientific characterization of such solutions in terms of, say, algorithmic complexity and performance benchmarks  make computer theoretic literacy crucial. Programmers will be unlikely to understand the derivation by reading the code, so they must be able to read the documentation. 

Secondly they may capture highly specific details of the environment and robust solutions to managing it. This will include successful workarounds for under-specified elements of protocols, or flat-out incorrect but popular implementations. Any user of say Ruby on Rails or Tomcat takes advantage of this kind of reuse. Consider too the domain specific details and tolerances of a fly-by-wire control system for a particular make and model of plane.

These two kinds of reuse may be contrived to lie on a spectrum, but I’ve chosen to distinguish them here for their correspondence to two different categories of knowledge – logos and metis. In classical Greek epistemology logos is theoretic universal knowledge and metis is hard won cunning, “feel”, or craft knowledge (as an aspect of techne, craft knowledge and theory). James C. Scott describes the Greek hero Odysseus, surgeons and maritime pilots as all relying on metis (Seeing Like A State). Scott also makes the connection between traditional knowledge – which is particular and tied to a society and geography – and common law conservatism in the tradition of Edmund Burke and Michael Oakeshott.

Confucius is claimed as a kind of Burkean conservative, for instance, by James Kalb. Both Confucius and Burke grew up in societies with small literate elites and large impoverished peasantries. They both share senses of the worth of settled convention, the importance of teaching and the literary canon, a paternalistic affection for heredity power, and a sympathy for the welfare of everyday people.  Neither are they reactionaries, but welcome improvement at a humane pace (IX.3).

Seeing Burke and Confucius as similar is not mainstream and deserves a dedicated analysis of its own. (My searches revealed more extant work linking both of them individually to Wittgenstein than to each other, but pointers are always welcome.) In a comprehensive entry for Burke in the Stanford Encyclopedia of Philosophy, Ian Harris argues that despite being more often claimed by the right wing, he does not have a clear modern partisan successor. Nevertheless, distinguished scholars like DC Lau or AC Graham stay well clear of Western political comparisons, while happily comparing classical Chinese figures with Western philosophers. 

Unusually, a software library, and all the hard won craft knowledge that comes with it, can be imported into another with extraordinary ease when compared to other forms of craft knowledge. A pilot is of little advantage outside his home port, and Ruby on Rails is of little use for 3D rendering, but in software we can copy the pilot and use him on innumerable ships entering that port. We can also ultimately read the source code to Ruby on Rails and determine how it tolerates the idiosyncrasies of particular browsers and servers. This is because all code is built on a formal information substrate – the computational medium. (This is Harrison Ainsworth’s term and his note on reuse provided a number of the connections in this post.)

Not all craft knowledge of a codebase is encapsulated in the codebase. There are particularities of the install, workaround scripts, configuration, scheduled jobs and so on, but these are ultimately digital artifacts easily included within a slightly broader view of what a codebase is (this latter is a premise of DevOps and for anyone serious about a controlled environment). More problematically, there are conventions of use, design choices, oral traditions of “check here when you change there”, and so on. At the limit, all codebases are incomplete. They depend on co-texts, results and knowledge of the domain that need not be encoded. An air traffic control system does not need a textbook description of Bernoulli’s Principle.

Burke and Scott argue that in an established society important, non-obvious, traditional knowledge is captured in social conventions and established practice, and the practice cannot be simplified without a loss of valuable situational knowledge. Scott additionally points out that such an environment is very difficult for an outsider to navigate and there are strong motivations for central political power to apply simplifications to it.

Yet highly particular, ‘local’ code that requires hands on experience and knowledge of accompanying conventions most frequently has another name in software development: bad. Or: spaghetti. Or: legacy. The sentiment is well captured in Qi’s koan on fear, even if it does riff off an opposing classical Chinese tradition. (In Confucian terms we might note the building is not harmonious.)

In No Silver Bullet, Brooks distinguishes accidental and inherent complexity, with the latter being an attribute of the underlying problem rather than any specific software or hardware implementation. Complexity due to poor or improvable design is always accidental; that due to the problem domain is by definition inherent.

An aesthetic sense of good or poor design becomes crucial when pursuing aggressive reuse (VII.14). Without it you will simply perpetuate junk.

Having argued the link between conservatism and software reuse, it is worth being a little more precise about flavours of conservatism. William F. Buckley famously described it as that which “stands athwart history, yelling Stop, at a time when no one is inclined to do so, or to have much patience with those who so urge it.” Despite its partisan origins, this is a good start, as it illustrates certain threads of environmentalism and the idea of heritage listing fall easily under the same banner. ((It is also useful to think of contemporary US Democrats defending Franklin D. Roosevelt’s New Deal, or opposition to changes to Britain’s NHS in this frame.))

In its purest form, this can be “return to a golden age” conservatism. There’s certainly an argument that Confucius would have been happy with a reversion to the society of the Eastern Zhou. We should again temper our interpretation by wondering how much is rhetoric covering adaptation of tradition to new times. In software, certainly, simply reactionary approaches are of little use. Brooks and the founders of eXtreme Programming have both noted that a more effective strategy is to embrace change. Oakeshott argues in On Being Conservative that settings of widespread and enthusiastic change are in particular need of an awareness of the value of what exists now. A traditionalist most often defends the present versus the future, not the past versus the present. This conservative disposition’s usefulness to software is more apparent if taken as an analytic tool rather than an inherent aspect of personality. After all, the greenfield doesn’t exist (see X.18), and any project that pretends to be a greenfield is an interesting lie.

Conservative thought in this vein usually emphasizes working within a tradition and a community – in software we would say platform. This also suggests interesting contours for the breadth of possible reuse; and there are other verses, such as XVI.11, where that might be explored. What is immediately apparent is the narrowness and fragility of an entirely in-house platform due to the smallness of its developer community; and the need for a shared jargon (XIII.3) and perhaps a canon (XVI.13).

Given the corpus of extant code in the form of libraries, to adore antiquity is to know your platform, including its innards, not just thoughtless rote quoting via copy and paste. At this moment in software, to reuse and extend is a greater service than extraneous self-involvement masquerading as innovation.

If you can easily find some code and copy it, you get the result at zero cost. That is an efficiency that cannot be beaten: no amount of programming tool and technique improvements can ever do that. So we want to maximise reuse. – Fred Brooks, No Silver Bullet