Hating code of others
We struggle to appreciate the meaning and intent of other people's work because we fail to understand the deeply personal and subjective quality of software development.
Why do we hate the code that others write?
There is a kernel of truth (even if it is almost negligible) in all myths. There is one in "software developers are mostly introverts", for sure.
Interest in software usually starts at a young age, at a time when reality can be overwhelming for a shy or sensitive person. A lot is going on, a tsunami of noise covering tides of signals. In time, and after a couple of nasty waves, you learn some lessons, not because you stop being sensitive, but because the sour feeling of sea salt in your lungs is hard to forget. But those first teenage years can be demanding. Some people are nostalgic for them. For me they were alright but please, never again.
(As a note, I will use the word “nerd” to describe a specific type of teenager. Do not take it as an insult: I am/was one of them, and I hold them in high esteem. I think they are curious, eccentric, more against the grain than any punk can ever be, albeit troubled individuals. Like my friend Berni (Sánchez, not Sanders) once said: “These are my friends. They are absolutely broken. I love them.”)
We all engage in world-building exercises (everyone that holds a political view does, so pretty much everyone), but nerds are explicit about it. It is not a metaphor to them: they enjoy board games, engage in role-playing, read science-fiction. Most of their waking hours are devoted to crafting small, well-defined, structured, rule-based, comprehensive realities they can fully grasp and be logical about. Cosmological spheres in which cause and effect are not fuzzy concepts. These worlds tend to be static and layered (hence sometimes bordering fascism, few nerds love jazz, they choose heavy metal instead). Nerds are nostalgic, but their worlds are not: nostalgia makes no sense where change has been exiled.
World-building is a creative and highly personal activity. That is why role-playing games are so popular among nerds: they allow for creation amidst constraints and rules. They can be infused with side stories and background mysteries. There is a grandeur to them, and sufficient gaps in the narrative to allow for day-dreaming.
Coding is similar: it has a limited vocabulary, a small set of rules, and cause and effect are explicit, but it still allows for creativity, development of new patterns, and use of exotic paradigms. As with any creative activity, the boundaries between work and self are uncertain (this is why designers can be so particular about their ideas). If creativity consists mainly of re-mixing ideas from different areas to solve one particular problem, it is likely that some of these ideas come from personal, subjective experience. Egoless programming is great and all, but it is telling that Jeff Atwood has chosen Moses as a heading in his article: as with the Ten Commandments, it aims to neutralise the natural impulses of developers.
Coders sometimes acknowledge this dichotomy: on one hand, ours is a highly technical endeavour, a form of empiricism; on the other, we are craftspeople and poets. However, most times we fool ourselves by disregarding the highly subjective aspect of our coding activity. The “right way” is “our way”: that is why reading others’ code is so frustrating. Structures arise from a particular way of seeing the world and we find the conflict between their viewpoints and ours unbearable. We cringe at the dissonance.
(For those already frowning at what seems like a relativistic way of seeing code quality, this is not my intention. First, there is a difference between syntax and semantics. The distinction between good and bad syntax is usually more straightforward. Second, I do agree that there are better and worst ways to code: there are good programs and terrible ones. What I argue is that at times, our own personal preconceptions of what is good code get in the way of appreciating others’ craft.)
“Hermeneutics” sounds like a cryptic concept, but Jens Zimmermann defines it merely as “interpretation”, often in the context of texts (sacred or not). Hermeneutics is usually represented as a virtuous circle: the meaning of a text (understood by the ideas that an author tried to convey through words) and its significance (what the reader extracts and understands from the text) engage in a feedback loop.
H. G. Gadamer thought that a reader could never fully grasp the true meaning of a text, and spoke about the “fusion of horizons”, the virtual spot where meaning and significance come to terms. Both reader and writer belong to a different time and place, and they embody different horizons which are hard to reconcile. As the reader interprets the text, a common horizon appears, borne out of constant refinement of the reader’s prejudices. At the end of this process of interpretation, the reader does not understand the “original meaning” objectively but has met the text halfway through, allowing for new meanings to be created out of the fusion of both understandings.
No matter how open-minded we are about others’ expressive intent, according to Gadamer this openness “always includes our placing the other meaning in a relation with the whole of our own meanings or ourselves in a relation to it.” A person trying to understand a text “is always performing an act of projecting”, and “projects before himself a meaning for the text as a whole as soon as some initial meaning emerges in the text.” Understanding any text is dealing with new meanings emerging from the interaction of our preconceptions and new ideas, and shaping the former to meet the challenge. A person “who is trying to understand is exposed to distraction from fore-meanings that are not borne out by the things themselves.”
I do accept that reading code is wildly different from reading a philosophical treatise. However, they are both an exercise in hermeneutics. Reading Plato is useful not to develop an objective understanding of Plato’s ideas (there is too big of a gap), but to let his thoughts “pull us up short” (in Gadamer’s words) and help our own understanding evolve into something different. Not everyone will acknowledge this prior understanding, and least analyse how reading a text might lead to the emergence of new forms of knowing. To most, and article or book “feels” right or wrong, and that is it.
Likewise, I do not know many developers that appreciate the influence of the self in their code. Many technical decisions are taken on the basis of “superstition” (for lack of a better word) rather than informed judgement. Technical solutions, even those coming from a strict exercise in empiricism, are subject to the whims of experience. For those coders who begrudgingly accept this “terrible” influence, few acknowledge its vivid presence in mundane tasks like code reviews. But given how we need to write guides on how not to be an asshole when reviewing others’ code, or that some are proudly ashamed of being one of them indicate that our relationship with others’ code is complicated.
Reading code (good, great, sublime, or horrendous) with a willingness to embrace our own tics and prejudices, understanding “wrong code” from “code that is not our own”, and finishing every code review with a feeling that our own craft has been slightly altered can help us be more humane.