Software development is hard. In fact, I suspect one of the biggest reasons many of us enjoy programming is because we know it’s hard. We know it’s hard and yet we enjoy striving for perfection. This kind of enjoyment occurs in software development when we work on a project whose scope is at the edge of our limits or comfort zone, but we still believe we possess the skills to pull through it. Within these conditions come the moments of supreme control, of timelessness, of pure excitement and creativity. We feel brilliant in the moments when we have glimpses of ingenuity among the myriad of setbacks that arise naturally while trying to control the chaos that is developing modern software applications.

This enjoyment feeling is succinctly captured by Mihaly Csikszentmihalyi in his concept of Flow. Flow is what I strive for every day of my programming career, but I don’t always get there. It’s not easy and sometimes I fear it’s beyond my control. There are so many factors both internal and external to the computer that are crucial to developing a product. Many of these factors will remain unknown to us until they inevitably pop up out of nowhere; snapping us out of any semblance of a programming flow. On the best of days we handle these problems with grace and understand how to circumvent, on the worst of the days we fight them head on and get nowhere.

So how do we recognize the worst of days? How do we know when to cut our losses and try another approach? How do we maximize the potential for reaching flow in our daily lives as developers?

Asking ourselves these questions is the first step. Being introspective and truly honest with one’s self is the quickest way to any real personal progress. There are so many factors that naturally affect our flow; some may be unique to certain developers while others may be more common than we realize. Recognizing the factors that most affect you and your team is paramount to your success in the field.

From talking to my colleagues and examining these factors within myself, there appears to be some patterns in the things that affect us most. Let’s take a look at some of these factors.

Find Challenges that Suit You

1*ZrB2eXQcpIZaJV-O8G-rwg

Challenges and goals should never be too easy. You should always be adjusting your trajectory towards ambitions that excite and even scare you a bit. Ideally this is finding an organization whose purpose aligns most with your own objectives. At a minimum this is finding challenges and goals to set within your organization that will intrinsically motivate you.

Finding these challenges is fairly straightforward when tasked with a new project or exciting new feature. However, there will be times where you will be faced with a long list of simple bugs or mundane tasks. Even within these instances, there are techniques that can be utilized towards setting your own challenge level and achieving flow.

For simple bugs, ask yourself:

Can you find the root cause of this bug instead of settling for a band-aid solution? Could this bug occur anywhere else in your codebase? What steps can be taken to preventing it from occurring ever again?

You can choose to see it not just as one bug, but as an instance of a class of bugs. See it as an opportunity to catch something now and determine procedure towards making sure variations of it never occur again. Make it your personal vendetta to extinguish those bugs once and for all.

For mundane tasks, ask yourself:

Can you achieve the goal of the task in a more effective manner than proposed? What kind of additional functionality in this space might delight your end-user? If you’ve done this task before, Is there a way to automate it or create a sort of framework or library to encapsulate your solution?

Understanding your natural cycle of energy throughout the day is another factor to consider. Perhaps you are somebody who is more adapted towards taking on creative tasks in the morning, while handling the more routine tasks or bug fixes in the evening (or vice versa). Keep a log and examine the days you feel most productive. How were those days structured?

Stay Healthy and Alert

For most developers, programming is a career and it’s something we intend to be doing for years and years. If you have a habit now that you cannot foresee yourself maintaining for the next 10 years of your life, when will it stop? Will you see the crash coming or will you burn out first?

We need to maintain our mental and physical well-being every day of our lives to the best of our ability. Doing this will boost not only our longevity in the field, but also our daily productivity. Let’s focus on some things we can do to maintain or physical and mental interests.

  • Eat smart and understand what you’re putting into your body does to your productivity levels. In an effort to maintain productivity into the afternoon I’ve found keeping lighter lunches helps increase productivity. The industrious Benjamin Franklin believed that always being a bit hungry is essential to productivity.
  • Sleeping enough to reach the recommended amount, when possible. When it’s not possible understand what it does to your productivity. You may find that you’re better off crushing quick, easy tasks and bugs when you’re sleep deprived; or maybe it’s documentation. Whatever it is, maybe save it until Friday when you’ve got that late concert Thursday night.
  • Meditation can be effective for both creative purposes and maintaining focus. It can open your mind to allow ideas to flow in or calm your mind to focus on the things that really matter.
  • Exercise will keep you feeling strong, alert and healthy. It’s not necessary that you become an athlete, but our bodies were not meant to stay in one position all day. Make sure you move around a bit, find something that makes you want to stay on your feet for an hour or two.
  • Keeping consistent with your schedule will allow you to find your most productive self. Just as we do with our computers, we’ll want to program our daily lives to be as efficient as possible. Explore the bounds of what your schedule can hold for you and then reign in on the habits that best perpetuate your goals and desires.

Know When its Time to Take a Break

As important as it is to stay focused and on track, there are times when we push too headstrong into a problem and we need to take a step back and allow our brains to open up and get creative. Taking a break or changing the scenery can help spur new ideas.

Don’t be afraid to take breaks when you’re not feeling productive. If you have the freedom you can go for a long walk, a bike ride or a long drive in your car. Maybe take a laptop or notebook to a local coffee shop or park and try to write some ideas out there. Often times our minds are still working on tough problems even while we’re not consciously aware of it; when we’re sleeping, showering, or eating. It’s surprising how often we’ll stumble on our most creative solutions the morning after a long night of grinding away at a problem trying to force something to happen.

It can be especially beneficial to find complimentary training or learning resources that provide you with a break, while still learning concepts that can be applied to the difficult problem you’re stuck on. I was introduced to Codewars three years ago by a co-worker and it’s been a favorite resource of mine for training programming skills ever since (in full disclosure I work at Codewars now). The beautiful thing about the training modules, referred to as Kata, is that they are small, self-contained programming sessions with clear indicators of success and failure. Through the difficulty settings we can pick the challenge level that engages us and work until we have clearly achieved the solution. Incidentally these are the exact conditions necessary for finding flow.

Wrap Up

We’re lucky as developers to have a craft with the potential to practice and learn to our heart’s content. With only a computer and some decent internet access we can work on our projects and hone our skills through the night. It’s a craft that appeals to those of us with a growth-mindset and the drive to become great at what we do. The only limit to our success is where we choose to spend our time. Regardless of what our personal lives are like, we’re all limited to a certain number of hours that we can put in each week. We may be able to squeeze blood from the stone and pull out some more hours out of our week, but to what end? We must realize that it is not how many hours we put into our craft, but the quality of those hours that really determines our success.

Let’s recognize that finding flow is paramount to our success as developers. Be sure to ask yourself what factors contribute most to your flow and don’t stop there. Ask other developers, especially those on your team, what contributes to their success and focus. Often times posing these questions will bring up insights and factors you’ve never even considered. Picking up on these factors will continue to make you grow and be productive in ways you could have never imagined.

How do you find your flow?