How E. Coli Taught Me To Work Smarter

How E. Coli Taught Me To Work Smarter

Travis Petersen
Travis Petersen

July 07, 2020

In my previous post, I talked a little bit about how, if I can't think of a good solution from the onset, I sometimes start to doubt my ability to solve a problem at all.

I observed this not too long ago when working with my apprentice on one of his code assignments. He wasn't very far into it before he asked me for help because he was blocked. I met with him to discuss the issues he was facing, and learned that he actually had several ideas for how he might start making progress, but felt that he couldn’t move forward because he couldn’t see exactly how any of those ideas would yield an ideal solution. He was so focused on the fact that he couldn't find the best solution that he'd lost confidence in his ability to find a solution at all, and his progress had come to a standstill as a result. He was clearly capable of coming up with some kind of solution, and I knew he would be able to iterate on that (which was what I really wanted to see him doing anyway) until he arrived at a pretty good one too, but not until I could help him out of his state of anxiety.

I think what is required in these situations is a means of making one's self-perception more commensurate with reality. A way of approaching a problem that provides useful feedback on whether you're making progress or just completely lost. Natural trail markers by which to orient yourself when a map isn’t available. After all, operating under some level of ignorance is a precondition for a state of flow, and a way of life for software engineers. Some people (like me) are naturally less comfortable with that and thus naturally more prone to anxiety, and we’re the ones who will benefit most from a strategy that declaws, but doesn’t necessarily eliminate, the ignorance. The strategy I want to suggest was invented by a genius that existed long before humanity was even a twinkle in evolution's eye: E. coli.

The E. Coli Solution

The E. coli bacteria doesn't have a whole lot of tools at its disposal when it comes to finding food. They can't see, but they can sense whether or not they're in the presence of welcome or unwelcome chemicals. They can move in two different ways: they can "run" and they can "tumble." They can also "remember" just enough to tell whether they are in a higher or lower concentration of favorable chemicals than their immediately prior location. Using just these abilities, they are remarkably effective at finding food.

They start by simply tumbling around, moving through their environment in a very haphazard and aimless manner until they sense that they are in a higher concentration of chemicals associated with food than their previous location. When this happens, they run in a more direct trajectory along that gradient. As long as the gradient continues, so do they. When it stops, they go back to tumbling and the process starts over in an elegant example of a nature’s penchant for recursion. Thus, in spite of being incapable of directly sensing a food source that’s not right in its, um ...face? E. coli is still able to meet the challenge of finding food by simply picking a direction to move in, seeing if it made any progress, and then changing or maintaining course accordingly.

Similarly, when we feel that a challenge is beyond us, regardless of the facts of the matter, we can reality-check the resultant anxiety by forgetting about the details of the finish line or exactly how to reach it, and instead picking a direction to move in and watching for signs that we're going the right way. Been going down a rabbit hole for too long without results? Try a different rabbit hole. Or a gopher hole.

It's not a miracle cure—eventually you may exhaust all of the ideas you have for where to go next, and that's when you're truly blocked and it's time to ask for help. This still has at least two advantages. You've learned what doesn't work, which will almost certainly come in handy in the future. You’ve also explored the problem space thoroughly enough at that point to make it as easy as possible for another person to effectively provide assistance.

Often, even though a challenge can in fact be overcome without excess mental strain, our perception of it as being insurmountable is enough to stop us in our tracks. This is worsened when we fixate on coming up with the best solution from the get-go (which is so tempting, because if you can do that, all you have to do is implement it, right?) when, most of the time, the “best solution” is a myth anyway. Willingness to experiment instead with the best idea currently available, and focusing on finding a working solution before a good solution and a good solution before the best solution, allows us to get back into that ideal state of flow. That’s better for individual health, team health, and productivity, and enables us to continue learning and finding ways to enjoy challenges rather than be daunted by them.