once upon a time in san francsico — (c) Alex Furman

Premature Optimization is the Root of all Evil 

How a software engineering truism teaches us to be better at… everything

“Premature Optimization is the Root of all Evil”

This is likely the single most famous phrase in the history of Software Engineering. Many a holy war was fought over it’s exact meaning, it’s quoted in thousands upon thousands of papers and essays, a Google search reveals over half a million exact hits.

This is neither the right time nor place for a deep dive into what Donald Knuth meant when he said it, which, you guessed it, is also a topic of some debate. The gist of it is that we’re not very good at being able to tell in advance which parts of a complex system are going to turn out to be actual bottlenecks. Thus, optimizing the performance of this or that piece ahead-of-time is not only likely useless (when it turns out that this piece ultimately has an insignificant part to play in the big picture), indeed it’s often harmful. Highly optimized code is hard to read, easy to misunderstand, and prone to problems that are difficult to diagnose and fix. It also tends to take more time to produce, time that could be spent building everything out in a straightforward way, carefully measuring the results, and then tactically optimizing where needed. If needed.

So, you’ve made something that takes 0,0001% of the time and resources twice faster! Clap. Clap. Clap.
Recently, it occurred to me that this approach generalizes to many things outside of engineering.

We’re terrible at being able to predict which decisions of ours are going to become fateful and which — completely insignificant. Our personal lives tend to be perfect examples of this. My marriage to Marina (and the subsequent birth of our daughter Nyusha) was easily the most important event in my life and it came about as a result of a long chain of extremely unlikely events. My role in all of it is laughably small — it mostly boils down to recognizing something good and opportunistically latching on to it hands-and-feet. Had someone asked me what I wanted from life, relationship-wise, the day before I met Marina, I would have said something completely different.When I now look back on all the angst and fear and trepidation that went in to some of the other romantic decisions in my life, it brings a smile to my face. All of the high drama wound up meaning very little on the grand scheme of things, while the truly important things just happened. Organically.

The result of a long chain of highly unlikely events, which all seemed pretty inconsequential at the time

If you look at my professional life, you see a similar trend. I got where I got as a consequence of yet another chain of highly unlikely events. The path that took me to co-founding a biotechnology company is easy to trace, but it absolutely not something that I could ever have planned.

Now, granted, I’m much less risk-averse than your average Joe, and the role of randomness in my life is probably somewhat of an outlier. That said, I've discussed this with many people from radically different walks of life, and I've found that while there are exceptions, they are just that — exceptions. Exceptions prove the rule.

Where I’m going with this is pretty simple. We all have a natural tendency to overestimate the importance of any particular decision that happens to be in front of us at a given point in time. Optimizing the hell out of the choice-du-jour is (almost) always the wrong thing to do. Whenever we’re faced with the proverbial diverging paths, the first question to ask is “Is this really life-or-death and irreversible”. If the answer to that question is “no”, which it almost always is, then the right strategy is to make a choice quickly and easily, see how it goes, and adjust as needed once you've gained more perspective. Most truly life-changing things that happen to us are of the Black Swan variety, things we can neither plan nor even anticipate. How you come out on the other side of cataclysms is all about two things: your preparedness going in and your ability to react, then adjust, then readjust ad nauseum as your world is shifting around you. The things that you’re agonizing about now — they probably won’t matter at all when the dust settles.

Embrace chaos. With chaos comes opportunity.

Plus, it’s fun.