Seeing Like A Facebook

The insistence on a single, unique, legal identity by Facebook and Google continues a historical pattern of expansion of power through control of the information environment. Consider the historical introduction of surnames:

Customary naming practices are enormously rich. Among some peoples, it is not uncommon to have different names during different stages of life (infancy, childhood, adulthood) and in some cases after death; added to those are names used for joking, rituals, and mourning and names used for interactions with same-sex friends or with in-laws. […]  To the question “What is your name?” which has a more unambiguous answer in the contemporary West, the only plausible answer is “It depends”.
For the insider who grows up using these naming practices, they are both legible and clarifying.
 — James C. Scott, Seeing Like A State

It’s all rather reminiscent of the namespace of open internets since they emerged in the 80s, including BBS, blogs, IRC, message boards, slashcode, newsgroups and even extending the lineage to the pseudonym-friendly Twitter. You can tell Twitter has this heredity by the joke and impersonating accounts, sometimes created in ill-spirit, but mostly in a slyly mocking one. CheeseburgerBrown’s autobiography of his pseudonyms captures the spirit of it.

Practically any structured scheme you might use to capture this richness of possible real world names will fail, as  Patrick McKenzie amusingly demonstrates in his list of falsehoods programmers believe about names.

Scott goes on to show how the consistent surnames made information on people much easier to access and organize for the state – more legible. This in turn made efficient taxation, conscription and corvee labour possible for the feudal state, as well as fine grained legal title to land. It establishes an information environment on which later institutions such as the stock market, income tax and the welfare state (medical, unemployment cover, universal education) rely. Indeed the idea of a uniquely identifiable citizen, who votes once, is relied on by mass democracy. Exceptions,  where they exist, are limited in their design impact due to their rarity. Even then, the introduction of national ID cards and car registration plates is part of that same legibility project, by enforcing unique identifiers. For more commercial reasons but with much the same effect, public transport smartcards, mobile phones  and number plates, when combined with modern computing, make mass surveillance within technical reach. 

The transition to simplified names was not self-emerging or gentle but was aggressively pursued by premodern and colonial states. In the course of a wide survey Scott gives a striking example from the Philippines:

Filipinos were instructed by the decree of November 21, 1849, to take on permanent Hispanic surnames. The author of the decree was Governor (and Lieutenant General) Narciso Claveria y Zaldua, a meticulous administrator as determined to rationalise names as he had been determined to rationalise existing law, provincial boundaries, and the calendar. He had observed, as his decree states, that Filipinos generally lacked individual surnames, which might “distinguish them by families,” and that their practice of adopting baptismal names from a small group of saints’ names resulted in great “confusion”. The remedy was the catalogo, a compendium not only of personal names but also of nouns and adjectives drawn from flora, fauna, minerals, geography and the arts and intended to be used by the authorities in assigning permanent, inherited surnames. […] In practice, each town was given a number of pages from an alphabetized catalogo, producing whole towns with surnames of the same letter. In situations where there has been little in-migration in the past 150 years, the traces of this administrative exercise are still perfectly visible across the landscape.
[…]
For a utilitarian state builder of Claveria’s temper, however, the ultimate goal was a complete and legible list of subjects and taxpayers. […] Schoolteachers were ordered to forbid thier students to address or even know one another by any other name except the officially inscribed family name. More efficacious, perhaps, given the minuscule school enrolment, was the proviso that forbade priests and military and civil officials from accepting any document, application, petition or deed that did not use the official surnames.

The ultimate consequences of these simplification projects can be good or bad, but they are all expansions of centralized power, often unnecessary, and dangerous without counterbalancing elements. Mass democracy could eventually use the mechanism of citizen registration to empower individuals and restrain the government, but this was in some sense historically reactive: it came after the expansion of the state at the expense of more local interests.

The existence of Farmville aside, Google and Facebook probably don’t intend to press people into involuntary labour. People are still choosing to click that cow no matter how much gamification gets them there. The interest in unique identities is for selling a maximally valued demographic bundle to advertisers. Even with multitudes of names and identities, we usually funnel back to one shared income and set of assets backed by a legal name.

Any power grab of this nature will encounter resistance. This might be placing oneself outside the system of control (deleting accounts), or it might be finding ways to use the system without ceding everything it asks for, like Jamais Cascio lying to Facebook.

The great target of Scott’s book is not historical states so much as the high modernist mega-projects so characteristic of the twentieth century, and their ongoing intellectual temptations today. He is particularly devastating when describing the comprehensive miseries possible when high modernist central planning combines with the unconstrained political power in a totalitarian state.

Again, it would be incorrect and unfair to describe any of the big software players today as being high modernist, let alone totalitarian. IBM in its mainframe and KLOC heyday was part of that high modernist moment, but today even the restrictive and aesthetically austere Apple has succeeded mainly by fostering creative uses of its platform by its users. The pressures of consumer capitalism being what they are, though, the motivation to forcibly simplify identity to a single point is hard for a state or a corporation to resist. Centralization has a self-perpetuating momentum to it, which good technocratic intentions tend to reinforce, even when these firms have a philosophical background in open systems. With the combined marvels of smartphones, clouds, electronic billing and social networks, I am reminded of Le Corbusier’s words. These software platforms are becoming machines for living.

Advertisements

XII.11 Let the prince be a prince 

Duke Ching of Ch’i asked Confucius about government. Confucius answered, ‘Let the ruler be a ruler, the subject a subject, the father a father, the son a son.’ The Duke said, ‘Splendid! Truly, if the ruler be not a ruler, the subject not a subject, the father not a father, the son not a son, then even if there be grain, would I get to eat it?’ — Analects XII.11 (Lau)

齐景公问政于孔子。孔子对日,君,君,臣,臣,父,父,孑,子。公日,善哉,信如君不君,臣不臣,父不父,子不子,虽有粟,吾得而食诸。- 论语,十二:十一

This is one of The Analects clearest statements of the feudal and patriarchal social order that would later get the name Confucianism. Detach it, for a moment, from that overwhelming cultural context, and it’s also an expression on separating design concerns. The two can be contrasted. Every political pundit is a social engineer. They either advocate improvement to the design of the state, or argue a change will break the existing system.

Mencius (孟子) expanded on this sentiment for one of the earliest recorded defenses of the division of labour (Book 3 part 1 chapter 4, 3-4). Labour specialization works because humans have limits on the complexity of a task they can undertake, and are not cloneable or particularly fungible. 

Software, by contrast, is highly specialized, but also cloneable at near zero cost. Software complexity has different boundaries. There are physical limits inherent to what Harrison Ainsworth calls engineering in a computational material. These are physical characteristics of algorithmic complexity or computability – limits on how fast a particular problem can be solved, if it can be solved at all. 

There are, by contrast, few physical limits to the conceptual complexity of a software component. Those measures like cyclomatic complexity – number of subtasks, variables and choices in a method – have high values, orders of magnitude short of the physical limits imposed by compilers and interpreters. (I once worked on a system where other team members had, in their wisdom, exceeded the limit for the size of a single Java method in a long list of simple business transformation rules. Pushed by the very essence of the language to refactor, they proceeded to – what else? – push the remaining rules into longMethod2().)

The limits which measures like cyclomatic complexity indicate are human limits. They mark the soft edges of a space where humans can effectively create, manage, or even understand software. There are different ways of describing coding conventions, but they all seek to indicate a limit beyond which code becomes illegible.

Legibility is the term James C. Scott uses to describe the social engineering needs of a nascent or established state (Seeing Like A State). The mechanics of a working state require internal legibility. Those working for it must be able to measure and understand their environment in mutually compatible terms which also promote the success of the government. This is why feudal states have such a profusion of titles which become the name of the person (not Bob – The Duke of Marlborough). It is also why courtly dress has such systematic rules. This is seen particularly in bureaucratic feudal states as seen historically in East Asia, eg in feudal Korea, but also in the Vatican, or the badges at the postmodern World Economic Forum. These codes serve the dual purpose of defining the interfaces of the state and of making the role of the person instantly legible to one familiar with the system, all while tempting people with the markings of social status.

Marking lexemes by colour and shape according to their role is exactly what IDE pretty printing achieves. This is also the intent behind decoupling, encapsulation, and well-named entities (name oriented software). It makes the role of a component, from lexical to method, class and class pattern levels, readily legible to humans who much maintain and extend the system. 

This strictness of role works well for machines made of non-sentient digital components. For systems where components are sentient meat, there are inevitable side effects. This is, perhaps, the core ethical dilemma Confucius concerns himself with: the demands of The State and The Way (道).

FUNCTIONS SHOULD DO ONE THING. THEY SHOULD DO IT WELL. THEY SHOULD DO IT ONLY. — Robert Martin, Clean Code

XIII.3 Name Oriented Software Development

子路日:卫君待子而为政,子将奚先.子日:必也正名乎. 子路日:有是哉!子之迂也.奚其正.子日:野哉由也.君子于其所不知.蓋阙如也.名不正,则言不顺.言不顺,则事不成.事不成,则礼乐不兴.礼乐不兴,则刑罚不中.刑罚不中,则民无所措手足.故君子名知必可言也.言之必可行也.君子于其言,无所苟而已矣. — 论语 十三:三

Tzu-lu said, ‘If the Lord of Wei left the administration (cheng) of his state to you, what would you put first?’ The Master said, ‘If something has to be put first, it is, perhaps, the rectification (cheng) of names.’ Tzu-lu said, ‘Is that so? What a roundabout way you take! Why bring rectification in at all?’ The Master said, ‘Yu, how boorish you are. Where a gentleman is ignorant, one would expect him not to offer any opinion. When names are not correct, what is said will not sound reasonable; when what is said does not sound reasonable, affairs will not culminate in success; when affairs do not culminate in success, rites and music will not flourish; when rites and music do not flourish, punishments will not fit the crimes; when punishments do not fit the crimes, the common people will not know where to put hand and foot. Thus when the gentleman names something, the name is sure to be usable in speech, and when he says something this is sure to be practicable. The thing about the gentleman is that he is anything but casual where speech is concerned.’ — Analects XIII.3 (Lau)

If something has to be put first in programming, it is, perhaps, the rectification of names. Names are what place the system and the not-system in the same reality. They are the bridge between the externalized machine without use and the internalized emotion without expression.

What in Confucian philsophy we call the rectification of names we can in Confucian software call Name Oriented Software Development. This does not yet exist, but it can be defined simply. Name Oriented Software Development uses a toolset that promotes the continuous rectification of names across all the interstices between natural languages and machine languages in the system.

The nominalist toolset should span package, class, variable and method names. It should span library and project names. It should cover layers of code around the core system, including message protocol definitions and protocol dictionaries, configuration entities, unit and performance tests, and run scripts. The aim in managing machine facing names is to enforce consistency and coherence of names while making precision in naming, including type restriction, easy. The same name appearing in different machine-facing contexts, eg a message protocol field in a script and a Java class, should be linked in an automated and machine verified way. This might at first seem to make the internal technical dialect (namespace, one could say, if it were not taken) too rigid. This is not the intent, and if we look at the rename variable refactoring, not its effect in smaller scopes. It is because we can execute refactorings in a reliable, automatic way that it becomes viable as a low-risk change. This is the same across the entire internal technical dialect – enforced formal consistency allows mutability to be low risk.

By contrast, the aim in managing people facing names is to allow a consensus jargon to emerge backed by a literature of interaction and aspiration which is still moored to the technical reality of the system as it exists. This covers specifications, use cases, test documents (even and especially automated acceptance tests), application messages or labels for users or external parties, internationalization, log messages (ie, a UI for support) support and developer faqs, and user manuals and documentation. Changes to this shared understanding should be reflected as immediately as possible and not tied to a long software release cycle. A label, for example, is essentially a piece of simple key-mapped static data; changes to it can therefore be routine and implicit. When treating this sort of text as static data, it is essential to keep it automatically linked to the running widgets themselves – otherwise it is merely the domain of style guides and moral exhortation. A true dialect is owned by a community – a folksonomy – so the entire community must be able to use and contribute to it. The editors for these documents should be as broad as possible within organisational constraints. Where editing constraints exist (organisational not technical), annotation on these documents should be easy. Cross referencing within the docset and outside it to external sources of expertise (for instance on domain jargon) should also be easy to add and maintain.

Or, via Wittgenstein, Tractatus 7: Whereof one cannot speak clearly, one must damn well link to a wikipedia entry.

This approach owes more than a little to Knuth’s Literate Programming. A distinction is that instead of putting documentation with source code in a single artifact to be owned by a single philosopher-developer auteur, it puts editable, often executable content in the hands of a community of expertise.

Historically, the Confucians became increasingly sophisticated in their theory of names. I know of no record of Confucius addressing names changing over time, apart from a general openness to political reform (Analects IX.3). Indeed, as old Kongzi was often conservative, the quote above might reasonably be taken to advocate reverting to old names now in disuse. Xun Zi (荀子), who lived in the century after Confucius and was one of his major intellectual heirs, saw fit to reuse the Mohist (墨家) theory of names.

单足以喻则单,单不足以喻则兼; […] 名无固宜,约之以命,约定俗成谓之宜,异于约则谓之不宜。名无固实,约之以命实,约定俗成,谓之实名。名有固善,径易而不拂,谓之善名 — 荀子 – 正名 6-8

If a single name is enough to communicate, make it single; if not, combine. […] Names have no inherent appropriateness, we name by convention; when the convention is fixed and the custom established, we call them appropriate, and what differs from the convention we call inappropriate. No object belongs inherently to a name, we name by convention, and when the convention is fixed and the custom established, we call it the object’s name. Names do have inherent goodness; when straightforward, easy and not inconsistent, we call them good names. — Xun Zi – Rectification of Names 6-8 , AC Graham translation

AC Graham’s use of the word “combine” (兼) above is in the sense of “compound”. This is the term the Stanford Encyclopedia of Philosophy uses in preference. That entry points out Xunzi’s concern with names is also in rebuttal to the paradoxes of the Chinese sophists. Furthermore, Xunzi is rather more open to mutability and the pragmatic construction of language from a vernacular folksonomy. (The term 俗成, translated as convention, includes 俗 which now spans meanings including custom and vulgar.)

Computer science launched itself out of the western analytical tradition, though. A sometime description and criticism of Object Oriented design is that it is reheated Platonism. See, e.g., blogs by Vlad Tarko and Richard Farrar. ((Should the frequent light analogical treatment of Platonism and software sound a note of alarm for this very project? Perhaps. But there is heavier academic firepower behind us as well. Are we not grappling with code, which Berry and Pawlik call the defining discourse of our postmodernity? In an article that has more code metaphors than a house full of crack-addled Java-monkeys at teatime.))

The platonic analogy has legs. We do construct a parallel world of sorts in code. It is also revealing to think of classes as ideal representations of some external physical element. Isn’t that why we often fail as programmers? We critique the world for being less perfect than our ideal programs, for failing to match up to their strict conditions, for making them ugly, for crashing them. Code, and OO, can have a kind of brittleness that happens when we stop thinking of software as a model of the world and start thinking of it as the true world. We fit our shape to the name.

My suggestion is not to stop doing taxonomy – we could not navigate the world and construct alternative worlds out of software without it. We couldn’t even speak without it. Instead, we should use Xunzi’s advice and fit our names to the shape. We name by convention. We continually rectify names. If a single name is enough to communicate, make it single. If not, combine.

‘RenameClass’ is the most powerful refactoring. — Michael Feathers