After a hiatus of several years, I recently returned to coding, and the experience caught me off guard. I discovered a striking resonance between programming and fiction writing—two disciplines I had long considered to be at opposite poles of human endeavor.
Despite my limited technical background, my work editing and translating documentation for programming fundamentals occasionally led me to dabble in the craft myself. My interest was purely linguistic; I was drawn to anything labeled a "language". Yet, I remained skeptical, often thinking, "Is it really appropriate to call these formal syntaxes 'languages' on equal footing with natural human speech?". Stuck on this conceptual hurdle, I had never managed to achieve anything substantial in the field.
This time, however, was different. It was my first serious attempt at coding since I began writing fiction. Unlike my previous efforts, I now had the constant companionship of Generative AI. Having an LLM by my side—not just to assist with high-level design, but to meticulously point out errors and suggest fixes (notably without a hint of condescension)—was nothing short of transformative.
"Maybe, just maybe," I thought, "I can actually see a simple app through to completion on my own".
As I sat there, steadily refactoring my program, the realization struck me: This is exactly the same as writing fiction.
First, one must architect the whole to manifest a concept and purpose. You then build the underlying structure to make it function. This is fundamentally identical to the process in fiction where one selects a theme, envisions the overarching narrative, and maps out the chapter structure.
Furthermore, there are countless ways to structure a piece of code. Choosing which logic to implement and in what order to achieve the most "elegant" result—ensuring the intent is communicated clearly to the user or reader—is a creative challenge shared by both code and natural language.
When you revise a specific setting or a plot development in a story, you must painstakingly track down every ripple effect and apply careful adjustments to maintain consistency. Coding demands the same rigorous attention to systemic integrity. Even the internal debate over how much to rely on AI tools feels remarkably similar in both crafts. While the styles of writing are manifold, the ultimate quality of the work is determined by its logical consistency and contextual depth.
Perhaps most importantly, coding is never truly finished. Even when the last line is written, you inevitably discover a minor bug, find a phrase that begs for a rewrite, or feel the urge to refactor the entire architecture. This mirrors the eternal struggle of the writer. One is constantly haunted by the temptation to revise; the act of creation has no natural conclusion.
It brings to mind the words attributed to Da Vinci: "Art is never finished, only abandoned". Or perhaps the insight of the poet Kenji Miyazawa: "The state of permanent incompleteness is, in itself, completion". Both a finished manuscript and a production-ready codebase are reached only when one finally runs out of time, or out of will.
I still have a long road ahead before I can truly master the art of coding. However, I have begun to feel that referring to programming as a "language" is not a misnomer after all.
日本語版を読む Read on Medium