SD TIMES BLOG
jhildebrand

Working in flow

by J.D. Hildebrand 10/12/2011 11:44 AM EST

In a recent post, I argued that putting software developers in cubicles costs employers more than they save. An investment in private office space quickly pays for itself with improved productivity. This is not merely my opinion. It is the invariable result of everyone who has ever conducted a serious study of workplace productivity.

I promised, at the end of that little rant, to follow up with a theory as to why offices support higher levels of productivity. With this post, I endeavor to keep that promise.

I'll begin by sharing a memory from my early days as a programmer. I had inherited an Apple II application – written in Applesoft BASIC – that managed the membership database for the nonprofit agency where I worked. I was working late one night, trying to optimize the code that let us retrieve a member's record by name. The search routine simply took too long.

I polished each line of the sequential search until it shone, and still the search was too slow. In desperation, I decided to implement a hack. I would compare the search string to the middle element of the index array, and confine the subsequent sequential search to either the first half or the second half of the list.

My hack cut the average search time in half.

I pondered the performance improvement as I took a pizza break. I read and reread the code – I'm sure I memorized great portions of it. I doodled a bit on the printout. And then I returned to work.

It was then that inspiration struck. What if, after cutting the list in half by comparing the search string with the middle element, I cut the list in half again by comparing the string with the middle element of the new, shorter list? And couldn't I cut the list in half again with another comparison? And again and again, until my array had just one element?

You're way ahead of me, I'm sure. That night, I “invented” the binary search. My new algorithm cut the average number of compares in a 1,500-element array from 750 to 11. The performance improvement was incredible.

If I'd had a semester of computer science under my belt, I wouldn't have had to invent this algorithm, of course. My point in relating this story is not to assert that I am some kind of superprogrammer. I've been lucky enough to befriend some superprogrammers over the years, and knowing them has only served to persuade me more seriously that I am not among their ranks.

I share the story to highlight one aspect of my experience: the enhanced mental state that allowed me to achieve the insight at the heart of the new algorithm. I wasn't working in my usual distracted state at that moment. I was operating in a hyperfocused, highly effective mental mode. I was in flow.

You have experienced flow too, I'm sure. We all have moments when our minds flip into high gear, when we become one with the problems we are working on. We do real work at these moments, but it doesn't feel like work. We lose the sense of time in the joy of ultra-concentration. It's a great way to work. I wish more of my work life resembled those in-flow moments.

What if we could find a way to trigger and sustain in-flow moments? What if we engineered our work environments to support more in-flow periods? What if we trained people to enter flow more readily?

These are among the questions posed – and answered – by psychologist Mihaly Csikszentmihalyi in a series of remarkable books. (You can also check out his ideas, including TED Conference presentations, at YouTube.)

I love Csikszentmihalyi's work. Browsing through his books I am always struck anew by an obvious question: Instead of optimizing our workspace or our tools, why not invest our energy in optimizing ourselves?

Flow, of course, is the missing element in cubicle culture. If you're subject to constant interruptions and distractions, you can't get in the zone. You can't work in flow. That's why private workspaces so reliably yield higher productivity. It's simple, really. It's all a matter of flow.

Web recommendation: I will admit to finding steampunk a compelling genre. Steampunk is a movement in art and literature arising from a simple question: What if we knew everything we know now about how the world works, but our technology was at the 19th century level? What would such a world look like? Well, I guess it would look like the photos in this wonderful gallery: Steampunk pictures gallery. J.D. say check it out.

J.D. Hildebrand has written hundreds of articles for dozens of publications and online communities dedicated to software development. He recently relocated to a small town outside Belgrade – stop by if your travels take you through Serbia.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Share this link: http://www.sdtimes.com/blog/1868

Tags:

People | project management

Comments

Add comment


 
 

biuquote
  • Comment




 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 

Download Current Issue
MAY 2012 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?


 
blogs tab
Why we leave
Ten reasons good workers leave their jobs, plus a few suggestions for retaining them.
05/22/2012 06:14 PM EST

Creation
To write better software, cultivate your ability to be creative.
05/19/2012 07:40 PM EST

Slick...but who needs it?
compilr.com is a well-designed site and the folks behind it seem to have their heart in the right place. But...who needs it?
05/16/2012 12:45 PM EST

How to be a better software developer
Want to be a better developer? You won't get there by mastering an interesting language or learning a new set of APIs.
05/14/2012 12:18 PM EST

Wooing Galatea
Do yourself a favor and check out Galatea 2.2, a wonderful book by novelist Richard Powers.
05/12/2012 07:05 PM EST

The world as story
An artificial-intelligence system at Carnegie Mellon seeks to understand the world by making statements about it.
05/10/2012 06:39 AM EST

 

Events calendar tab
5/23/2012 to 5/24/2012
Chicago
IEG

6/3/2012 to 6/7/2012
Orlando
IBM Rational

6/10/2012 to 6/15/2012
Las Vegas
SQE

6/10/2012 to 6/15/2012
Las Vegas
SQE

6/11/2012 to 6/14/2012
Bellevue, Wash.
AMD