Focus (on the right path)

So I was partaking in some soft-skills training, specifically a talk from Happy Brain Science. There were some familiar things there: don't check email, multi-tasking doesn't work, etc. but some new (to me) ideas as well. One thing I picked up was a term called "Flow". It is basically like being 'in the zone', but here was a succinct word with a bit of study behind it.

This Flow describes 'optimal experience' - something we all aspire to if we're watching a sports game or playing a video game or pursuing anything of interest: to be challenged and thrilled by a risk but feel like we're going to win. In being creative, you want to feel like you're progressing - not overwhelmed by the challenge, and not just filling in some color-by-numbers plan or others' vision.

Here's some stuff I cribbed from the webz:

Elements of Flow: * Focus: Concentration on a limited field * Clarity: Explicit goals and immediate feedback * Balance: Match between skills and challenge * No Problemo: feeling of (potential) control * No Sweat: Ease and effortlessness * Time Warp: Altered perception of being * Self-Forgetfulness: Merging of action and consciousness * Autotelic Quality: The journey is the destination

Sounds great! And over the years I've practiced each aspect to varying degrees of success. I'm pretty sure the No-Sweat thing is always going to be a lie, but I can get the time warp and self-forgetfulness in spades, Here's the thing - what if I get into Flow, and it's in the wrong direction? What if I do very well at a task and feel great about it and it's just not the right thing at the right place at the right time?

This applies to bugs as well as features. Just today I got a nasty GPU crash. Debug tools/dumps presented four separate far-apart places the bug could be, and a fifth piece of data testified absolutely it couldn't possibly be any one of them. I had four deep rabbit holes. As I do, I might get into flow down one, verifying that entire subsystems are indeed working as intended, lost in the snow-blind mechanics of code markup and #if 0'ing, recompile and reload screens. And then the day is gone. By the time I wake up, I've not got anything to show for it. Autotelically speaking, when the destination is a worthless dead-end what then is the journey?

So this time, with that double-edged sword Flow on my mind and realizing it was late enough in the day that I didn't want to succumb to its siren's song, I went home where I watched me some Sherlock Holmes - another guy challenged with flow, but at least he gets to the heart of the problem quickly, mostly. While watching I was reminded of how he approaches some problems - "when you have excluded the impossible, whatever remains, however improbable, must be the truth."

The next morning I then characterized all avenues of potential debugging as impossible. What remained was some rando stomp on everything. I then recalled some recent memory changes that went in and futz'ed with it. Sure enough that was it. Had I dived into any of the suspects from logs and traces, I'd have verified a well-oiled machine, and lost lots of time doing it.

Now, how can I do this type of thing every time? How can I see through the mis-reports, the red herrings quicker? Any path may be to an Isle of Lotus-Eaters, and there is much odyssey to be had! This is my enterprise. No sweat, right?

-- Tony Arciuolo (Senior Engine Programmer)