The Motivation to Code

Posted on Wed, May 25, 2022 🌲 Flourishing Article Opinion

After working as a software engineer for more than a year, I started to see that I didn't really enjoy "software engineering". Being tired of tedious refactoring, endless performance issues, boring testing, etc, my mind often drifted to business, design, art, or philosophy, and found them more interesting.

More specifically, I found that I didn't like to work on engineering problems "out of the context", like an obedient robot producing code. "What kinds of features to build to really improve something in our life?" "What kinds of products to build to really bring freedom and joy to people?", for example, were questions I'd like to have chances to think deeply and come up with cheerful answers before pouring my energy into related engineering problems.

I liked solving engineering problems, though. When I was in college, I spent most of my time doing it, and I was fairly good at it. I built Notablog, a static site generator that uses Notion as a CMS. I spent many days reverse-engineering Notion's internal API and studying how to organize my code well. I built Jade, a canvas note-taking app. I spent many days learning how rich-text editing worked and optimizing the rendering performance of the canvas. I was also curious about low-level stuff. Sometimes, I tinkered with electronics, embedded systems, and Linux. There were full of engineering problems, and solving them were really fun.

Things changed when I started doing software engineering jobs. When solving engineering problems became a responsibility and felt more industrialized, the fun diminished. There were bosses who interpreted customer feedback and told me what to build. There were designers who considered every UX detail and drew pixel-perfect mockups. As a software engineer, I felt like I was just replicating things that had been "done" — by coding the UI that had been drawn and wiring up behaviors that had been formulated — with "programming languages". Sure, trying out well-made libraries, solving critical performance issues, and discussing quirks of React with other engineers were sometimes fun, but I always felt something was missing — some of my energy wasn't released — even though I got very tired every day resolving technical issues.

I came to realize that the energy was creativity. Every engineering problem I went deep into — as deep as writing ARM assembly for an STM32 microprocessor — before doing jobs, was not all about writing the code. Instead, it was about making something I wanted, perhaps to learn, to solve a problem in my life, or to fulfill a desire. I built Notablog because I wanted to write blog posts with Notion and publish the posts without copying them elsewhere, but back then, no existing solutions met my aesthetic taste and supported all block types I needed. I built Jade because I was fascinated by the idea of taking notes on a canvas, like having an infinitely large table in my computer, but back then, note-taking apps didn't have the canvas, and drawing apps didn't support rich-text and Wikilinks. In short, what really motivated me to solve an engineering problem was the opportunity to be creative, the opportunity to take an unsolved problem and bring a satisfying solution, not writing random code upon request.

I view code as a medium to be creative. I view code as a means to bring solutions that matter. That's why I started to code and how I want to continue coding. How about you? What motivates you to code?