Thursday, June 19, 2014

Why I Work Without Pay on Free Software: Flow and Autotelic Creative Work

An Unexpected Experience of Flow

It was a hot day and I was sweaty from walking off the tension of a meeting that hadn't gone well. My thoughts at the beginning of the walk were scattered and disorganized, running through random details of the troubled project I had recently stepped up to manage. The effort to evaluate the project was bringing in more bad news every day. Complex issues and insufficient support for off-shore developers caused compounding delays in delivery. The project was expensive and critical to the future success and value of the organization. Pressure was high. By the end of the walk I remembered that none of these were new or unique problems, and I knew a few possible ways to address each one. I was still new in the position so while pressure overall was high I still had some time to get the project on a better course.

Feeling more calm I sat down to review the messages that had come in through the night and check on the status of the few dozen highest priority tasks. My mind jumped all over as I scanned through messages and tasks to get an idea of what was stuck and needed to be clarified and delegated. I felt stressed and scattered as I worked to wrap my head around it all. For so many of the blocked tasks I felt frustrated with no obvious answer of who to delegate them to. With so many of the issues no obvious solution came to mind.

Eventually I had scanned through all of them and sat back to consider the most important priorities of the project. I started to feel more relaxed and saw the big picture made up of all these little parts. I suddenly knew which stuck task to address first, just who to delegate it to, and what to write about how to approach the task. That done I jumped to the next task that a solution came to mind for, then to a message where a good answer to the question suddenly became clear.

Some time later I looked at the clock on my laptop and was surprised to see that almost two hours had passed. I didn't remember hearing any of the noise in the busy office, even though I was in an open cubicle. I had been interrupted a few times by people stopping by, but even those conversations seemed to fit in fine with what I was working on, and a couple even allowed me to address email messages in person instead of by written reply. I felt content and satisfied, even happy. I was no longer focused and the answers were no longer flowing, but it was okay. My mind felt somewhat empty. I sat for a moment and spaced out, and it felt nice.

As I got up to see who was interested in heading out for lunch I realized I had just experienced a deep flow. I was surprised because the conditions for it were so different from the quiet, focused, unpaid free software development work where I usually experience flow. This wasn't development work breaking down details of a single well defined goal, and not even a type of work that I particularly enjoy. It wasn't something I chose to do for its own sake, just something that had to be done. Still, the goal of the effort was clear as was the general purpose that the goal fit into. It wasn't a purpose I cared about deeply for its own sake, it was a paid effort, but the purpose was clear and I was part of making it happen. There wasn't a single task to focus on, and I didn't get to choose the tasks, but I did have flexibility over the order in which to handle the tasks. I also had control over how to handle each one, and at this point had a good enough knowledge of the project and the team so that along with general experience the challenge at hand was fairly level with my ability.

Not only did I get through far more in the morning than I had anticipated, and had felt stress about not staying on top of, but my tense and frustrating morning had turned into a pleasant and fulfilling experience. I was full of energy, ready to enjoy a lunch with colleagues, and well prepared to get through the many hours of planned meetings and moving along important objectives that remained in the day. I marveled at the power of flow. I mused over the wide variety of work that could be autotelic, that could be enjoyable and rewarding on its own enough to be intrinsically motivating and not just as part of a bigger external purpose or for extrinsic motivations.

My Free Software Based Career

In 2001 I started The Open For Business Project, now Apache OFBiz, a suite of ERP, CRM, and eCommerce applications ( Between then and 2010 I worked around 8,000 hours on it without pay. I then started a series of new free software projects that are a redesign and fresh implementation of a scope similar to OFBiz: Moqui Framework, Mantle Business Artifacts, and various other projects based on them ( I have worked around 2,500 hours without pay on these projects, and anticipate thousands more.

Why would any sane person do such a thing? Setting aside the question of sanity, what about the whole issue of earning income for personal needs, family obligations and funding ventures? On top of all that I am a normal person with a wide variety of interests that require time and money such as off-grid living, exploring the wilderness on foot and motorcycle, constant reading and learning, meditation and mindful living, health and fitness, and even a little romance here and there.

When I started OFBiz my main motivation was to create something that filled a need I had seen in the two failed startups I had just worked for, and do so in a way that I could build a long-term career on it. Building commercial software does not qualify because if you part ways or the company goes under you can no longer effectively leverage the software you worked on in future contracts or business ventures. It is great to be paid to build something, but even better to build something that you can continue to use and improve no matter where you are working, or if you are working (for money).

These free software projects have been a great foundation for a career in enterprise software consulting. I have worked for some of the largest companies in the world, for fascinating and innovative startups, and everything in between. I have experienced business and culture many corners of North and Central America, Europe, and Asia. I have enjoyed a high level of independence and a good amount of work coming in through the free software projects, so I never really had to market myself in other ways. I get to work on the design and development of software that I am good at and enjoy, and not so much on the marketing and sales that I am neither good at nor enjoy very much, and yet still work as an independent consultant or in various incarnations of consulting organizations that I have tried over the years.

While these extrinsic motivators are great they are more of a side-effect and what it all comes down to is drive, to intrinsic motivation. This is not just something that drives me to work the long hours necessary for large and complex software projects, but is something that makes the work rewarding for its own sake. It is a powerful thing to experience the flow and satisfaction that comes from the combination of autonomy (of time, task, and team), challenge that often goes just beyond my existing skill and knowledge, and fulfillment in pursuing a greater purpose. These three are key to experiencing flow in creative efforts.

Doing creative work in a state of flow is both rewarding (pleasurable and satisfying) and nearly always results in effective, efficient work with excellent results. Working on free software projects benefits from a natural sense of purpose, frequent satisfying challenges, and a high level of autonomy. The experience of flow on free software or other more autonomous creative work carries over into day to day necessary work as well. People learn to get into flow and leverage it for improved results and satisfaction. This is one of the reasons why organizations allowing 20% time to work on whatever employees want see greater innovation and productivity overall.

So why do I work on free software? It is a foundation for a career, but more importantly it is something that I can tap frequently for the experience of flow. On the income side of things, it is easier to get into flow doing paid work based on the free software projects that I work on and in the ever growing set of business contexts that I am familiar with. This carries over into paid work and makes it easier for me to get into flow on those efforts. I pursue flow in other experiences like riding a motorcycle in the wilderness, adjusting speed and choosing terrain to challenge and engage myself just beyond my comfort zone (which varies day to day, and even during a ride), but the experience of flow in the context of a larger purpose and creative effort is far more satisfying and rewarding.

Books and Background

The best book for an introduction to the topic of intrinsic motivation and flow is:

Drive: The Surprising Truth About What Motivates Us by Daniel H. Pink

On an interesting side note this book features various stories about Atlassian, the company behind Jira, Confluence, and other software commonly used in projects based on OFBiz, and many software development projects in general these days. Atlassian has a policy of 20% time to work on anything desired, and various other policies that help foster and enable flow. There is some historical overlap between OFBiz and Jira, and Jira uses a customized version the Entity Engine from OFBiz.

For those interested in extreme sports and human performance in general, this is a great book:

The Rise of Superman: Decoding the Science of Ultimate Human Performance by Steven Kotler

See also the Flow Genome Project ( which is based on this work, and in particular a great slideshow they put together that describes the concept of flow and trigger for it:

Much of this is based on the extensive work of Mihaly Csikszentmihalyi. His most business-oriented book is:

Good Business: Leadership, Flow, and the Making of Meaning by Mihaly Csikszentmihalyi

For those who want to go deeper he has written various other books, and these are a couple of good ones to look into:

Flow: The Psychology of Optimal Experience by Mihaly Csikszentmihalyi

Creativity: The Psychology of Discovery and Invention by Mihaly Csikszentmihalyi

The Experience of Flow

Flow is a powerful experience of full engagement and focus. It is a state of consciousness, attention, and awareness focused on a particular activity. The parts of the mind and body that are essential for the activity are fully engaged while the remaining parts of the mind and body are suppressed.

There are many aspects of the experience and the resources above have much information about not only what people experience, but also correlated changes in brain chemistry and electrical (wave) state and areas of the brain that activate and (more importantly) deactivate. One aspect is that time perception changes, usually a sense of time slowing down or simply no awareness of the passing of time. This correlates with transient hypofrontality, or more specifically change or suppression of the parts of the brain that monitor time and control your perception of it.

In some flow experiences even the parts of your mind that perceive your self will change and the boundary between what is you and what is not you will shift. In some experiences a tool may seem to become part of you so that no conscious effort is required to use the tool, it is like it is part of you. In other experiences you may feel more connected to the environment or to people around you, as if you are part of a greater whole (and this is an important aspect of team flow... yes, people can flow in groups too!).

The most critical aspect of flow is that self evaluation, your inner critic, turns off. You experience no value judgment and confidence becomes a non-question... the part of your brain that might doubt is simply turned off. Impulse control goes away along with activation of impulse focus on the task at hand. This feels like a steady stream of impulse and action based on impulse, a literal flow of continual impulse and action.

In a creative effort the parts of the brain that are then able to impulse and flow include the parts related to pattern recognition, linking ideas together, generating new ideas, risk taking, and detailed memory of the experience. When needed for the task there may also be increases in awareness, observation, and input acceptance and processing.

That is all the performance side of the experience, which will generally result in extrinsic rewards, but what about the intrinsic rewards? This is where the real motivation for the experience kicks in. During and following flow experiences the brain has an increase in norepinepherine, dopamine, serotonin, and endorphins. It is like being on low levels of speed, cocaine, MDMA, and opiates all at once... but totally natural. It is part of your mind's built in reward for your efforts in learning, growing, creating, and unleashing cultivated abilities.

To Flow and Beyond

There are steps before and after flow that you should be aware of to understand how flow fits into the overall creative experience (and other flow experiences as well). Below are descriptions of the 4 main phases. Chances are you will recognize these from past creative and other experiences, and understanding them you can start to recognize them in future experiences.

1. Struggle: When first beginning an effort you have a lot of mental noise and scattered thoughts jumping among the value,  purpose, and details of what you are doing. This is the phase to load relevant information into your mind by reading or conversing, to recall relevant information, and think about the goal you are trying to accomplish and the purpose of the effort. This is a necessary preparation for flow even if it does sometimes seem unpleasant. The inner critic that turns off during flow is active during the struggle phase. The dominant brain wave in this phase is the beta wave, and the most prominent chemicals in your mind are cortisol and norepinepherine. Focus your intentional effort on loading information and setting a clear goal and vision to reach that goal.

2. Clarity: In this phase the specific goal and vision for reaching the goal become more clear and you start to get your head around what you are trying to do. This is a key part of getting into flow and is the stage just before flow. If you don't have a clear enough vision of the effort you will never reach this phase and never transition into the flow phase. This phase may be brief or may last a while. To get here you need to relax and move your attention away from your thinking mind to let your mind do its thing. Intentional breathing, physical activity, or a simple distraction can help with this. You will eventually have a clear vision (not necessarily an image) of the goal, and what you need to do first becomes clear. Don't try to think through the whole effort in detail, just get the vision and the first step clear then start acting. Flow is all about engaging in that first step and letting the remaining steps "flow". What is literally happening is various parts of your mind are now doing the tasks you setup in phase 1 and coordinating with your conscious mind as needed by raising impulses for you to act on. Just focus on the first step of your effort, and let the rest come as you go. The prominent brain wave here is the alpha wave, and in this phase nitric oxide in the blood stream starts to increase, which in turn increases blood flow and the delivery of various chemicals to the brain that it needs to function optimally.

3. Flow: This is where the magic happens and you experience everything described in the previous section of this article. You start to feel fully conscious (associated with theta brain waves) and at the same time various parts of your mind become active while other parts of the mind that normally suppress these active parts become inactive (the inner critic turns off, time perception changes, etc). Most of the creative work moves to the background of your mind, your subconscious, leaving your conscious mind to act. You will start to efficiently process information and have more frequent and profound insights, which are associated with gamma brain waves. The more you can focus on the effort and let impulse and action flow the longer you will stay in this phase. This can be done with other people. Sometimes things others say and do will become a part of your flow, sometimes they will break your flow.

4. Detach and Recover: This phase always happens, and it is best if you allow the time and space for it instead of getting distracted or moving on immediately to something else. You need this phase to recover and learn from the effort, and to prepare for future flow. In this phase you may feel totally spaced out, empty minded. Your mind goes into this state as a natural way to recover from, and process what, happened during the flow phase. When your whole mind is focused on a certain task there may be memories, emotions, sensations, and observations that some part of your mind notices but that don't result in an impulse to your conscious mind because they are not relevant to the effort at hand. Those may come out during this phase. The prominent brain wave in this phase is the delta wave, and both serotonin and oxytocin may be elevated. This can be a very pleasant phase but can also be a let down from the high of flow. Either way it is a valuable phase for learning from your experience and preparing for the next time you do it. For those who meditate this is an excellent time to intentionally be mindful of what is going on in your mind and body. Your whole physiology is primed for mindful meditation in this phase, and doing so will maximize the benefits and the enjoyment that come from it.

Finding Flow

That sounds like a great experience, what can I do to get into flow, especially when doing something creative like developing software?

Ultimately flow is a mental state, something your mind does to respond to focused, high value effort. You can't force flow, but there is a lot you can do to create the conditions for it, to train yourself to more readily go into and stay in flow, and even change your brain chemistry and electrical state to facilitate it.

The Flow Genome Project has a list of 17 flow triggers, and there are three that are most critical to software development and similar creative efforts:

1. Sense of Control (autonomy + competence): Autonomy is all about independence and choice in the effort. The three main aspects of autonomy are time (when to do it, how long to spend doing it), task (what to do, how to do it), and team (who to do it with). Different people will consider different of these to be most important, and will be affected in terms of flow differently by each type of autonomy. Competence is the other side of the sense of control. With a higher level of experience and competence it is easier to get to a vision for how to go about the goal, and it is easier to quiet the inner critic that can block flow.

2. Strong Purpose and Clear Goal(s): A purpose that you care about will naturally engage you more. The more clear a goal is the more easily you will be able to put together a vision for reaching the goal and identify the first step to get there. The goal and your vision for achieving it is likely to change during an effort, and while it doesn't need to be perfect or even fully complete you need something to start with.

3. Challenge/Skills Ratio: For anything you might do you have a range of challenge (or intensity or stress) that you will handle well. There is a low end to this range below which you will have difficulty getting and remaining fully engaged. In other words you'll get bored and more easily distracted, it will be difficult to remain focused. There is a high end above which your skill and experience are not adequate and you will feel overwhelmed and doubtful or even fearful. The sweet spot, where it is most easy to get into flow, is a challenge level that is just a bit higher than your comfortable skill level. Flow happens best when you are fully engaged and this happens most naturally when you push yourself to new levels of performance and achievement.

Given these important conditions for getting into flow, how can you train and improve your ability to do so? One of the most powerful practices is meditation. The ability to be fully present in both time and place, focusing on the here and now, is cultivated with meditation and with practicing presence in everything you do. Even planning for the future or pondering the past can be done fully present, just chose the moments and focus on those things. If conditions are ideal for flow then it doesn't matter so much as your mind will shift into full presence, but it is much easier to learn to be present than to always try to setup perfect conditions or be limited to the perfect conditions. Being present reduces the impact of lack of control (both lack of autonomy and lack of competence), makes it easier to accept and embrace purposes and goals, quiets your internal critic, and widens the range of challenge that you will handle well.

When a challenge is well beneath your ability level increasing your attention will keep you engaged and present even though the intensity of the challenge doesn't push you there. When a challenge is beyond your comfortable ability being present will keep your mind from running to all the possible horrible outcomes, or the failures of the past. This is the essence of equanimity which is cultivated through meditation, various other mindfulness practices, and practicing presence and attention in everything you do. The ultimate experience of meditation is to detach your consciousness from your thinking mind, body, and emotions so that they are all in the background and your conscious mind is aware of them but not controlled by, or attached to, them. Creative flow is like a meditative experience in that you are more conscious and present in both, and being familiar with conscious awareness will help you get into flow.

One good book to get you started, if you are not already familiar with meditation, is:

Mindfulness Meditation in Everyday Life and Exercises & Meditations by Jon Kabat-Zinn

Another tool that appears to have great potential, but that I have not personally tried, is neurofeedback training such as Brain Sport by SenseLabs (was Neurotopia).

Okay, that's great as an ideal, but what do I do to function effectively now while I'm practicing meditation and getting into flow? Be careful not to force flow, the extra stress will actually block it. Still, there is quite a bit you can do to "hack" flow. For example if a challenge is too easy you might intentionally make it more difficult, closer to the edge of your skill level, by doing it more elaborately, constraining it in some way (limit on time, size of result, etc), or even doing something passive at the same time such as listening to music or doing something physical (walking, stretching, etc). If a challenge is well beyond your skill level you can get help, train or study before you take it on, or identify the critical success factors and see if you can simplify the effort to something closer to the comfortable edge of your skill level.

A lack of autonomy or feeling of competence, or a purpose or goal that don't interest you, are a very different sort of challenge. These become exercises in acceptance. Acceptance is not about going along with things that are harmful to you or others, those are cases where you need to decide to be involved or not and what to do to set and enforce boundaries. Acceptance is about coming to terms with reality, letting reality be what it is without getting upset about it, and even without getting excited or happy about it. Just accept it for what it is, notice it in detail without any value judgment.

Once you understand a situation, internal or external, and are okay emotionally with what it is, then you can decide what to do with it and examine your feelings about it. By accepting a lack of autonomy and looking at the situation for what it is, you may find desire and fulfillment in the effort, and be able to flow fully with it even though it isn't ideal. By accepting a purpose or goal that doesn't interest you or even that seems undesirable at first, you may be able to see it and understand all aspects of it more clearly and start to feel interested and excited about it. It is natural when accepting something to be able to notice it more clearly, and natural when noticing something clearly to appreciate it for what it is and even feel gratitude and desire about it.

What if I want to get a boost while I'm doing inner work to be able to more fully and frequently flow? One way to suppress some of the same parts of your mind that are suppressed during flow is to use a tDCS device like the " gamer". This is a useful tool for concentration and can help with focus and turning off the inner critic, which can make it easier to get through the struggle phase into the clarity phase, which is often the most difficult part of getting into flow.

Another physical tool to help get into flow is nitric oxide (NO) boosting supplements. Nitric oxide naturally increases in the clarity phase and helps transition to the flow phase by increasing blood flow and delivering more of certain chemicals in the brain. There is a lot of research about nitric oxide and its role in mental and physical performance. There are common parts of fitness supplements that act as NO boosters such as L-Arginine and L-Citrulline. There are also more natural things that increase NO, including green leafy edibles, beets, garlic, cayenne, and good old fashioned exercise.

In general anything you can do to get the goal and details about it into your head, produce a vision for the effort, and focus intensely on the effort will help you get into flow. If you know a way to quiet the chatter in your mind effectively and safely then try that to help you get into flow. If you know ways to tune the intensity of a challenge to your skill and full engagement level, give it a try. Improving your ability to flow and the conditions for flow may involve working with others. These may be family, friends, or coworkers. Consider it an opportunity to improve your relationship with them, and maybe even get them interested in flow, presence, acceptance, and other things that will benefit them personally and professionally.

Breaking Down Goals for Ideal Flow

Software development involves lots of breaking down bigger goals into specific instructions and algorithm steps that a machine can execute. In a way it is ideal for getting into flow. Once you understand the goal and a general strategy for getting a machine to do that using whatever tools you have available you can get into the procedural flow of laying down one step at a time. Over time your mind gets so used to processes and rules that once you have the general idea of what needs to be done it is almost automatic for your mind to start breaking it down into structural and procedural chunks. Your mind trains well to send you a steady stream of impulses for you to act on as you tap out code.

For many of us this mental effort becomes so automatic that we can do it in spite of high pressure and distractions. We can also recover quickly and get back into flow after running into dilemmas and having to step back and observe the problem as a whole for a bit. In fact, we even get good at hopping between different levels of detail to work with higher and lower level processes and data structures and such, and getting into flow at varying levels of abstraction. There is a reason that once we develop some sound skill that we often thoroughly enjoy creating software.

What about higher level things, like gathering business requirements and designing user interfaces and other software development tasks where we don't have a nice clearly defined goal to work toward? What about when the task is to clearly define the actual implementation goals like screen designs, data structures, or business rules?

This is where levels of abstraction come into play. Business requirements are in effect just a high level, low detail abstraction of the software to eventually create, and preferably written in business terms as opposed to technical terms. Business requirements still live in the context of even higher level business objectives and rules. If you are using effective means of structuring and documenting requirements (such as those in HEMP, then it will become a natural level of abstraction that you work with just as effectively and efficiently as code. It is a different sort of effort from coding as it is (or generally should be) a collaborative effort with business representatives. The potential when gathering requirements is to frame and direct the conversation in such a way that the whole group focuses on particular business objectives and processes and the whole group gets into flow together laying out the details of the business process.

Flow can be experienced in a wide variety of efforts. Even writing this article involved a few distinct periods of flow! Any large project or effort can be broken down into smaller efforts, some of which are efforts to define and break down the larger efforts. Over time breaking down larger efforts to optimize the opportunity for flow with each effort will be a natural part of your work planning and one of your flow facilitating skills.

Getting Started

Now you know what flow is and what to look for as you experience different phases of efforts leading up to flow, engaging in flow, and the detaching and recovering from flow. The best way to get started is to simply be more aware, start looking for the phases, sensations, and feelings of flow. Chances are you have experienced flow hundreds of times in your life, and maybe a few times as profound, sustained experiences that you recall clearly. Take a moment to sit in those memories and recall what it felt like, how you got there, similar experiences where it didn't work and what was different that got you fully engaged, present, and focused. In addition to experiencing flow in your work life and creative pursuits you can also experience it in personal efforts like pushing your limits in fitness or physical expression. Paying close attention to what you are doing and the sensations you feel as you do so can be a profound and euphoric experience as you get into flow, and as you get out of it.

You have also most likely had experiences of flow with other people, in personal or professional efforts. Those are special and powerful experiences, and teams that do this on a regular basis do amazing things and get profound satisfaction and fulfillment from it along the way. This is one thing people really enjoy about performing music, dancing, and other activities that involve people synchronizing and coordinating with constant engagement and feedback. In a business context this happens a lot during process-driven requirements gathering where people are focused on the overall business objective and work together to layout the steps to achieve it. It also happens during technical problem solving.

You can flow in a wide variety of efforts and circumstances, and some lend themselves to flow more than others. Practicing and enjoying flow in efforts that lend themselves to it will make it easier to get into flow in efforts where the conditions are less than ideal. These are often important things to do, critical for business operations and even certain parts of creative efforts and collaboration, and you can do them better and enjoy them more in flow. The experience may be one day a week where you work on whatever you want, in whatever way you want, for your employer. It may be unpaid contribution to free software projects like I have chosen, but it doesn't have to be, and it doesn't even have to be unpaid. The key is to set up the effort to use the triggers and follow the process for getting into flow.

Remember that going into flow states for important efforts is a natural part of the function and structure of your mind and body. Important is whatever you decide it is, or more accurately, whatever you tell your mind is important. You get to decide. Flow is the ideal way to learn and grow, to create and express, and your mind and body will reward you well for it.