Zen and the art of software maintenance

Andi Putra
Engineering the Skies: Qantas Tech Blog
4 min readOct 24, 2023

Maintaining a software project can sometimes feel like a quest straight out of “Zen and the Art of Motorcycle Maintenance.” For those unfamiliar, the book by Robert M. Pirsig is a philosophical work that explores complex philosophical concepts while reflecting on his personal experiences.

Quality

Pirsig’s metaphysical journey introduced us to the concept of the Metaphysics of Quality (MOQ), where quality is the cosmic glue holding the universe together. There are two types of quality, dynamic and static quality.

Dynamic quality cannot be defined and can only be understood through the use of analogy. In software development, this could be things that can be intuitively felt but hard or impossible to measure. For example, the code readability, the ease of debugging and making code changes, the level of code fragility.

When an aspect of Quality becomes repeated, it becomes static. This quality can be measured. In software development, these are things like the number of lines of code, the testing coverage, the documentation coverage.

Embracing the MOQ mindset means treating our coding sessions as our moments of introspection, where we align our code with the essence of quality. It’s about forging a deeper connection with our code and how it contributes to the big picture. It means we engage in a mindful code reviews and discussions. Sharing insights and feedback with team members aligns perspectives and fosters a collective commitment to quality.

Classical vs Romantic

In his book, Pirsig also divides human understanding into two types: classical understanding and romantic understanding. The classical thinkers assess objects in the world in terms of their functions (reason, logic). The romantic thinkers assess objects in the world in terms of their appearance (flow, beauty).

Coding is often perceived as a systematic and robotic task, where developers meticulously translate business requirements into lines of code. It’s a process of adhering to precise instructions and following documentation to the letter. While this aspect of coding is undoubtedly essential for ensuring that software functions correctly and meets specific needs, it’s only one facet of the craft.

Coding is also a dynamic and creative process that offers developers a unique opportunity to learn, play, and innovate. Beyond the strict adherence to business requirements, coding invites exploration and experimentation. It’s a playground where developers can test new ideas, push boundaries, and discover novel solutions to problems.

When we approach coding sessions in a way that respect all of its facets, we’re no longer prisoner to the classical/romantic binary. This approach empowers developers to adhere to coding conventions while also giving them the freedom to deviate when it enhances the quality of the code. It transforms coding from a mere task into an exhilarating voyage of self-discovery and creativity, thereby enriching the developer’s experience. In this light, coding extends beyond mechanical implementation, it becomes a vehicle for personal growth and innovation.

Gumption

Pirsig believes that gumption, which is a mix of determination and a fresh mindset, is crucial for quality thinking. When we face a tough problem and solve it with an open and creative approach, it fills us with gumption. This renewed energy can help us find better solutions in the future.

Picture this: you’re faced with a perplexing bug that’s causing your code to misbehave. This is where gumption steps in. It’s that inner resolve that pushes you to tackle the issue head-on, armed with a willingness to approach it from various angles.

When you confront such a challenge with a creative and open mindset, you not only resolve the immediate issue but also bolster your reserves of gumption. This newfound energy becomes a valuable asset for future debugging endeavors. It’s the mental fuel that propels you to find even better solutions, not just for debugging but for crafting high-quality code from the outset.

Now, let’s consider the gumption traps in the context of debugging. Ego, a common trap, often manifests as a reluctance to admit when you’re stuck or when your initial code may have issues. It’s that voice that says, “I can’t possibly be wrong.” Acknowledging that you’re stuck and embracing the fact that bugs happen is a crucial step in overcoming ego-driven traps. It opens the door to seeking help, collaborating with teammates, and ultimately arriving at more robust solutions.

Impatience, another trap, can lead to rushing into quick fixes that might provide temporary relief but fail to address the root cause. Debugging demands patience and a commitment to thorough investigation. Embracing the debugging process as an opportunity for growth and learning, rather than a race to the finish line, can help mitigate the impatience trap.

Conclusion

Maintaining software is not merely about reaching the end goal, but about the path you take to get there. Every line of code, every bug fixed, and every innovative solution found is part of this remarkable journey. It’s a journey filled with challenges, learning opportunities, and moments of creative insight. The process of bringing an idea to life through code is where the real magic happens, where we grow and evolve, and where the essence of quality is forged. So, while the end product may be the destination, it’s the journey of crafting the software that epitomises quality, just as Pirsig’s quality epitomises the essence of life itself.

References

Book: https://www.goodreads.com/book/show/629.Zen_and_the_Art_of_Motorcycle_Maintenance

Information has been prepared for information purposes only and does not constitute advice.

--

--