First, a story.
Darla stepped off of the train at the Powell stop. She darted quickly to make it to the escalator before the crowd. There was no one expecting her at the office at any specific time, but it was a few minutes past when she liked to start working. She scurried past the unfortunate folks lining the walls of the tunnel to the street. Along the way noticing one man’s hideous toenails reaching out from his bare and filthy toes. Walking as quickly as she could, Darla made it to her desk in just a few minutes. A few nods were exchanged with colleagues as she passed, but no conversation. She took her macbook out of her bag, opened it, and started up the terminal application before she even took off her coat. She tossed her bag and coat under the desk and quickly engrossed herself into the black screen with text of various colors creeping around on it. She was right back into the code, just as she had left it the night before. Before she knew it, it was time to pack up again. She’d had a few meetings that she begrudgingly attended, they were fine, she got the information she needed from the business folks. She thought briefly about her work for the day and thought she made nice progress. She didn’t work on the new major design pattern that she wanted to start refactoring towards, and she didn’t fix that annoying bug that caused her to have to manually fix a couple of rows in the database everyday, but she added some important features. Maybe she’d get to those other things tomorrow. Oh wait, she also forgot to go ask Lisa about using the company card to buy tickets to the mindfulness conference that her boss had approved her request to attend. It can wait until tomorrow too.
Does this sound like your workday? A lot of my days are like this. I’m also habitually dissatisfied with my jobs. I was dissatisfied when I wrote code that would help cancer patients have to spend less time laying in a PET/CT scanner. I was dissatisfied when I made iPhone apps of my own invention with my girlfriend working along side me. I was dissatisfied when I worked with a group of potentially lifelong friends at a company that allowed booze consumption at all hours. I was dissatisfied when I worked for myself, contracting for friends, setting my own hours and coding how I wanted. I was dissatisfied when I worked with real geniuses trying to break new ground in data mining for medical research.
Each time that I became dissatisfied, I thought that the problem had something to do with my circumstances. I’d decide that I needed to be in a new situation. As I result, I’ve worked in a lot of different environments. Maybe it’s time I look at what all these dissatisfying jobs had in common. Just about the only thing common to them all is me, and my approach to a work day.
I’ve studied mindfulness for years. It’s changed many aspects of my life greatly. When I think of who I was even just 5 years ago, I’m so grateful for how far I’ve come. But I’ve noticed that my mindfulness practice has never seemed to change much about my work day. It’s never seemed to permeate what happens when I sit down to write code.
I remember being in the middle of great stretches of awareness and peace, but when I’d sit down to work, it would turn off like a switch. I go into the computer world, which isn’t exactly bad, but it’s not exactly mindful either. It’s something different for me. It works in a lot of ways. I’m fairly prolific in code. I get things done. But I’ve noticed in the last couple years, that my work could use more refinement, and that it’s a type of refinement that's already within my ability. I just don’t do it sometimes.
I think it’s time to reach the next level, and for me, I think the next level is mindful coding.
Why hasn’t my progress in mediation over the years made it’s way into my work naturally?
I think it has to do with habit. I’ve been writing code for a long time. I wrote my first Commodore-64 commands and BASIC before I could read english (or any spoken language). Even in my teenage years when I was mostly into music and not writing any code, I still thought about coding. I even think that my lack of success in music is in part because I was never able to stop trying to treat it like code. I spend 8 hours a day working in almost the exact same mindset that I used way back in those early days. The good news is that it still works. The other news is that I'm ready to destroy it and rebuild my work brain.
In a way, habit is the opposite of mindfulness. Mindfulness, in many cases, is the overcoming of habituation. The state of mind that I use when I write code, is a deeply ingrained habit. It’s time to begin unwinding it just like I’ve worked to unwind so many other habitual states of mind.
What do I do from there? Well, I think it’s the beginning of a great project. How do I map the things I’ve learned from Buddhist practice specifically into my coding and work day? It's about integrating intention, compassion, and mindfulness. I’ve seen plenty of talks and blog post about those topics and programming, but to me, they’ve never been very useful or realistic. I’ve never heard anyone say,
This is how I use mindfulness to write great code, and love my work. It’s not an easy problem when you get into the details. It’s different than the yard work that the monks do at the monastery. I don't know how to apply what they say to my TDD loop, but I think that's the right problem for me to work on now. Let’s begin.