Code Quality
Here's to history: programming through archaeology

Summarized using AI

Here's to history: programming through archaeology

Eleanor Kiefel Haggerty • March 08, 2018 • Earth

In Eleanor Kiefel Haggerty's presentation at RubyConf AU 2018, she explores the connections between archaeology and programming, illustrating how human intention in the archaeological record can inform our understanding of code. Haggerty, who transitioned from a background in ancient Greek translation and archaeology to programming, emphasizes the parallels between the two fields.

Key points discussed in the presentation include:

  • Introduction to Programming: Haggerty shares her initial experience with Ruby and draws connections between the learning of programming languages and the study of ancient cultures.
  • Law of Demeter: The importance of understanding concepts like the Law of Demeter, which relates to both programming and Greek mythology, serves as an anchor for her argument about historical context in code.
  • Historical Context in Coding: As programmers, every commit we make is a piece of history that reflects our decisions and thought processes, similar to how archaeologists piece together human behaviors from the past.
  • Understanding Individuality: Just as each individual's actions are recorded in archaeology, Haggerty emphasizes that coding reflects personal style and decision-making in method and structure.
  • Praxis: This concept, which relates to action and knowledge derived from practice, is fundamental in understanding the intentionality behind both archaeological discoveries and code creation.
  • Stratigraphy and Context: Haggerty employs the metaphor of stratigraphy—layering in archaeology—to explain how code commits reveal chronological relationships, providing insights into the evolution of a codebase.
  • Case Study of Temple of Apollo: The analogy of the Temple of Apollo's history showcases how context helps in dating and understanding structures, paralleling how we understand code through its relational context.

In conclusion, Haggerty encourages programmers to embrace the historical and individual traces embedded in their code, reflecting on how these decisions contribute to a larger narrative. Understanding the context and intention behind both code and archaeological artifacts lays a foundation for better practices in programming and deeper appreciation for the artistry of coding. This relationship between archaeology and programming prompts us to reflect on our contributions and the histories we create.

Here's to history: programming through archaeology
Eleanor Kiefel Haggerty • March 08, 2018 • Earth

RubyConf AU 2018 | Sydney | Australia
March 8th & 9th, 2018

Organisers: Melissa Kaulfuss (@melissakaulfuss), Nicholas Bruning (@thetron), Sharon Vaughan (@Sharon_AV) & Nadia Vu (@nadiavu_)
MCs: Melissa Kaulfuss & Nicholas Bruning

Sponsored by: Envato, Culture Amp, Lookahead, Reinteractive, Oneflare, Shippit, Twilio, The Conversation, Netflix, Disco, Heroku, REA Group

RubyConf AU 2018

00:00:00.030 Eleanor has many years of experience translating ancient Greek texts and working with antiquities, but she is now a developer at The Conversation. We are very thankful to the organizers for bringing her here. Eleanor loves cooking, doing yoga, and spending time with other people's dogs at the park.
00:00:11.670 Please welcome our very own Indiana Jones of Ruby. I would like to acknowledge the Gadigal people of the Eora Nation, the traditional custodians of this land, and pay my respects to the elders, both past and present. Today's discussion will take a little trip into the past. I will be saying "Coyote" in ancient Greek.
00:00:50.280 Just over two years ago, I was fortunate to learn programming on the job with the fantastic team at The Conversation in Melbourne, Australia. As Nick mentioned earlier, I had dabbled briefly in Ruby and written a couple of small programs, but most of my time was spent working with artifacts in heritage and classical language.
00:01:30.030 So, here's what you first learn in modern programming languages. Here's the classic 'Hello World' for Ruby, and here's how you say 'Hello World' in classical Greek. Interestingly, the Greeks tended to be a bit dramatic. When I began programming, one of the first things I learned was the Law of Demeter.
00:01:59.280 I remember this specifically because I thought it was a coincidence that something so relevant in programming could have ties to Greek mythology. The Law of Demeter is named after the Demeter project, which itself was named in honor of Demeter, the Greek goddess of agriculture and fertility. Demeter is also known for her association with sacred law and legislation. While the pronunciation may vary, it is commonly pronounced as "Demeter." Thanks to Demeter, my career transitioned from archaeology and classics to coding.
00:02:37.600 Initially, this change didn’t seem so dramatic. Although the links between archaeology and programming may appear tenuous at best, they became more evident over time. Today, I want to talk to you about human intention in the archaeological record and its implications for us as programmers. We'll explore context and technology, and although you’ve already had a glimpse with the Law of Demeter, there will be more history lessons along the way.
00:03:09.900 How often do you dig through a commit history, peeling back layers of complexity, sifting for clues and trying to answer the question of why this code does what it does? You're trying to separate the important from the irrelevant, only to be stopped in your tracks by historical debris—such as an ill-defined method with an amusing yet uninformative commit message. Every day we write code, and as we commit it, those commits preserve a piece of history—our reasoning, our approach, and our emotions.
00:03:55.250 This history lives on throughout the life of a project, yet often the complete story, including the reasons behind specific decisions, remains unclear. The obvious decision may not always be the best one, and when we finally manage to unravel complexities, we can find ourselves even more confused than when we began. So, how can we make sense of this? To me, the answer is obvious—it lies in archaeology.
00:04:56.590 But what does archaeology really involve? Thanks to popular culture, you may think it involves digging up dinosaurs or finding piles of gold, but those assumptions are misleading. Archaeology is certainly not about Indiana Jones-style adventures. Instead, it is a meticulous study of cultural history, material culture, and the traces left behind by people. It is a never-ending detective story, just as coding is.
00:05:34.860 Archaeology uses observations and evaluations to test ideas about what happened in antiquity, providing us with a fascinating window into the past. While this may sound romantic, our interpretations are grounded in strong scientific principles. It's important to note, however, that the archaeological record is a distorted version of past events. Artifacts are broken, buildings have collapsed, and food remains are often only partially preserved.
00:06:01.250 Most archaeological sites, with few exceptions like Pompeii, are not perfectly preserved. However, archaeologists can recognize the processes that influence the preservation of sites and can seek reliable ways to reconstruct past human behavior. This is vital for interpreting these unique traces.
00:06:36.490 Now, let's discuss human intention in the archaeological record and its relevance to coding. One common cliche is that you cannot see the individual in the archaeological record, yet it does contain clear evidence of individual actions and intentions—like digging a rubbish pit or constructing house foundations.
00:07:27.830 You can see such individuality in the first man-made codebase. How tests are structured, or the timestamps on commits, can be very telling. When I first began programming, I often heard colleagues say things like, "Ah, that’s certainly something Mark wrote," or, "This class has 'James' written all over it." But I couldn't see the individual in the code; I couldn't detect the quirks that made one person's code stand out from another’s.
00:08:21.300 I could not see intention, purpose, or individuality in what my colleagues easily observed. However, this realization that you can actually see individual lines of code, much like how I searched for traces of individuality in antiquity, was a comfort.
00:09:46.350 In archaeology, the word 'praxis' arises from Aristotle's work in the fourth century BC, which was during classical Greece. Aristotle was a student of Plato and tutor to Alexander the Great. He described praxis as an activity performed for its own sake, a realization of the higher capabilities of the human psyche.
00:10:41.070 Praxis is closely related to our modern concept of practice. The word derives from the Greek word 'praxis,' meaning action or fact. The beauty of this concept lies in its reflectivity. As the actor, you are the one making decisions when you write a method, a class, or a model. You are deciding how to structure this part of the code.
00:11:34.620 Archaeologically, I think of praxis as gaining knowledge through observation, such as excavation, leading to an understanding of the relationships between humans and their societies. Let’s consider interpretation as constructing a story of past behavior, which can allow for various explanations.
00:12:37.060 Archaeologists do not merely find artifacts; they also identify patterns of behavior and contextualize them in time and space according to their perceived interpretations. Similarly, we write code that fits within particular contexts—following certain conventions, whether team or personal, both of which serve future developers who come back to excavate and interpret.
00:13:35.070 It’s common for humans to take shortcuts, and as programmers, we often do so while under time pressure or facing specific coding conventions. It's easy to forget these considerations when you are the one looking back in the future, trying to reconstruct a story without clear interpretations or understanding the reasons behind the code.
00:14:12.520 Recognizing alternate explanations acknowledges that different circumstances require different actions. This relationship between praxis, excavation, interpretation, and individual intention is reflected in our code, where traces of individuality personify our expressions of human decision-making.
00:15:07.800 Just as the individual is present in the archaeological record, so too are we in the code we write, reflecting decisions made during its creation. Now, let’s shift our focus to context and stratigraphy. As programmers, we have the advantage of creating flat and readable histories, allowing us to rewrite and sanitize the historical narrative.
00:16:09.960 Manipulating a single commit is easy, and doing so with two commits is also manageable. However, it is crucial to recognize that history remains and context is not lost. We can view historical snapshots at any time in the codebase.
00:16:36.999 The archaeological record does not grant this privilege. Archaeologists typically see only one reference frame at a time.” Consider stratigraphy as capturing the chronological relationships within the archaeological record, allowing for understanding of these evolutions.
00:17:22.490 Stratigraphy can be conceptualized like a layer cake, with each layer representing a different time period. Similarly, when running a git log, your commits display a chronological order based on when they were added to the repository—the most recent events appear first.
00:18:13.860 To comprehend how events unfolded, archaeologists rely on chronological relationships within the archaeological record. We can apply the same principles to understand the history of our repositories. Git logs preserve a record of commits instantaneously. However, unlike archaeological sites which evolve gradually through accumulated records, commits are created instantaneously, resulting in straightforward log formations.
00:19:29.770 Now, let’s examine the Temple of Apollo at Corinth, which has a tumultuous history similar to that of a lot of ancient Greece. Prosperity was often followed by wars and conflicts until the temple was ultimately razed to the ground in 146 BC, with its walls dismantled and territory reassigned.
00:20:27.080 The temple began again under Roman influence, which encompasses what remains today. How can we date structures predating the Roman era? We utilize context. Context refers to the place and relationships of artifacts, which helps infer associations and can effectively date sites.
00:21:36.270 For example, the architectural features of the temple place it in the archaic period. Yet external evidence for this date is limited. A fragment of a middle Corinthian crater found among stone foundations allows us to date the temple to the mid-seventh century BC.
00:22:42.130 Just like conducting an excavation can uncover how artifacts were used, understanding the relationships between components aids context. Context is a vital aspect in both archaeology and programming.
00:23:09.340 As programmers, we create histories that are clear and readable—something to take pride in regardless of how simple any one aspect may seem. Embrace your intention and your contributions to the codebase, for your history will thank you.
00:23:49.500 Thank you!
Explore all talks recorded at RubyConf AU 2018
+8