Sometimes you should come a full circle in order to understand a thing. At the very beginning you might be doing it just right but lack the rationale. Then, you start analyzing your moves, and reading pieces on how to Do The Thing Properly, and listening to your peers claiming superior understanding of the thing. And gradually, bit by bit, you are forgetting how you did it at the outset of your journey.
When I was a novice computer programmer, long before I took my first job, I used to write all my code in Notepad. I formatted it compulsively, carefully picked the names for variables, checked that no trailing spaces remain, and always ensured there was a blank line at the end of each file. I did all that without a linter too, for a simple reason that I didn’t know that such a thing existed.
Yet the most important thing I did was turn code into a painting. I made sure it looked, read, and was understood as gracefully as possible. Code as a work of art.
Doing that half-editorial half-artistry work was moderately time-consuming but ultimately, it resulted in a codebase that was always clean, readable, and easily manageable. Occasionally, I recovered pieces written a few years prior and I would always quickly understand which part was responsible for what functionality, and how to change it promptly. Much later, after years of praxis, my software engineer’s eye had grown sharp enough to catch at a glance mistakes that would otherwise have taken hours to debug.
Eventually, I got a job. At first, no one said much about my methods. As a newbie, you usually get a tacit permission to be weird with your tools until you feel comfortable and confident. When that period was over, some colleagues started hinting at the idea that such code cleanliness was not mandatory. We had linters at work, which in my opinion wasn’t nearly enough, but they relied fully on them, and their code was often far from my high standards of beauty. I remained stalwart at that point, not conflicting with more experienced teammates but also not dropping my practice of making the code look impeccable.
At some point though, I became mature enough that I had to leave the premises of the code monastery and start communicating with product people. They were much less accepting of my views. It was time spent on vain beautification, in their opinion, and should have been cut to minimum. The actual features are much more important than minimization of the time we spend adding them, they would say, and I started going along with those arguments now and then. The pain I felt when I stopped myself from a half-hour of “redundant” code polishing was mild enough so I acceded to my seniors’ reason. It tingled me just a little bit as an act of self-betrayal.
Years passed, and I got used to neglecting my urge to write beautiful code. I was still more pedantic than all my colleagues, but I basically stopped paying attention to the tapestry of code and what visual and conceptual patterns were woven into it. My code has become a boring production artifact instead of the work of art it should have been. The instantaneous pain was almost unnoticeable but its regularity and inevitability were overbearing, and I was steadily burning out.
At my last few workplaces, I experienced days—sometimes weeks—when I couldn’t deliver anything of value. I simply didn’t want to turn on my PC. When you burn out on a type of creative work, I realized, the joy gets sucked out of all intellectual activity, not just the thing you had agreed to do for you current employer.
Not that much time has passed since I quit the last company I was working with. I’ve started building my gamedev studio, and whenever I’m back to writing code I feel the same compulsion not to enjoy what I’m doing. The false wisdom of aiming for productivity and not code aesthetics is still showing its ugly face. I shoo it away, but it hasn’t died out yet. I can say with such certainty that it is false because each time I disregard the time spent and just make my code beautiful, I end up with more actual work done.
And to think of it, that is yet another case of “aesthetics is upstream of everything.”