Flow State, Design Patterns & Software Architectures

June 30, 2017

“The happiest people spend much time in a state of flow - the state in which people are so involved in an activity that nothing else seems to matter”

When it comes to learning design patterns and software architectures, I feel a major benefit of decreased decision making and increased working memory efficiency as a developer is somewhat undervoiced in the argument.

It is no secret that developing software requires significant load on brain functions such as Working Memory and Decision Making. And it is also no secret that very talented programmers tend to have higher working memory capacities.

Yet, we rarely ever consider or attempt to optimize the amount of Mental RAM consumed in the development process and the inevitable thrashing experienced 3-4 hours into a coding session.

Consider for example, the amount of processing load on your working memory when you have three browser windows open with dozens of tabs, several code files to juggle and the context of the current problem you’re attempting to solve. It’s not suprising that after 20 - 30 minutes of Googling in the solution searching mode that we feel sapped.

What’s more, just like like our laptops, the brain has only a finite amount of mental energy everyday that is rapidly diminished making millions of micro-decisions during the development process.

Microdecisions can include things like:

  • What package should this class go to?
  • Should this be an interface?
  • What to call this variable or process?

If we consider ~2 GB allocation of RAM to our working memory (call it mRAM), these microdecisions can eat up anywhere between 10-25% of our focus.

If we roughly quantify the feeling of flow state as the near maximum utilization of our 2 GB allocation (where flow state is a developers maximum productivity velocity), it is critical to reduce wasted processing and hold ups on microdecisions.

This is where understanding design patterns and architecture shines. Two spectacular benefits include: (1) the expanded vocabulary to describe abstract processes, actors and solutions, and (2) the ability to recognize patterns and decrease abstract nature of code significantly.

The proper application of both can focus more processing power on concrete construction instead of conceptual jumping jacks of “function” or “theme” parsing in your code.

The tangible result I see from these benefits is a significant reduction microdecision making.

A well studied blueprint in hand, the developer transforms herself into the artist with design patterns as her tools to sculpt, sketch and paint the creation of her dreams. But rather than contemplating the use these tools, the design patterns make what once seemed incredibly complex, intuitive. Reducing blocks and barriers to the euphoric flow state we all crave as artists, programmers and humans alike!

Great Resources For Learning Design Patterns and Architectures:

  1. Classic, Gang of Four
  2. Software Architecture in Practice - Len Bass
  3. Clean Architecture