nik codes

What Military Strategy Teaches Us About Web Performance

Pluralsight If you like my blog, you’ll love my Pluralsight courses:
Tracking Real World Web Performance
WebPageTest Deep Dive

In December of 1974, Communications of the ACM magazine published Computer Programing as an Art by Donald Knuth. In it, Knuth wrote these now famous words:
Comunications of the ACM, December1974

The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil in programming.

A couple decades earlier, at the conclusion of the Korean War, US Air Force fighter pilot Colonel John Boyd, graduated at the top of his class from the prestigious Fighter Weapons School in Nevada. Shortly thereafter he became an instructor at the school revolutionizing aerial tactics and developing the concept of the OODA loop.

ooda

The OODA loop is a reoccurring decision making cycle that, while originally intended for use by fighter pilots, has now been adopted in many fields including litigation and business. Boyd broke the loop into four phases:

  1. Observe: Collect data from the surrounding environment
  2. Orient: Analyze and synthesize the data to form a mental model
  3. Decide: Determine a course of action based on the mental model
  4. Act: Physically act on or implement the decision

The OODA loop begins with Observation, and ends in Action, but at any point in the cycle, if the situation changes or you do not have a clear picture, you can reset and go directly back to Observation. The more salient point though, is that Action is never reached without first Observing, Orienting and Deciding.

When considering web performance, following the OODA loop ensures that developers avoid the evil, premature optimizations that Knuth warns about. It is very difficult to optimize in the wrong place or at the wrong time if you’ve properly observed, oriented and decided first. Let’s consider how the OODA loop applies to web performance in practice:

  1. Observe
    Leverage web analytics and real user monitoring (RUM) techniques to gather information about page usage and performance. There are plenty of web analytics libraries available that are easy to setup and use. I’ve had great success with Google Analytics in the past. For RUM data, the WC3 has authored several specifications (Navigation Timing, Resource Timing, User Timing, etc.) that have been well adopted by browser vendors and provide most of the data required.
  2. Orient
    With usage and performance data gathered, leverage simple statistics and charting tools to build up a mental model that’s easy to reason about. Median values, time series charts and histograms are commonly used and easy to generate, even using software as common as Excel.
  3. Decide
    Identify popular, yet under performing functionality within the application and decide how to improve it with carefully calibrated synthetic tests. Synthetic testing systems, like the perennial favorite WebPageTest, use highly instrumented browsers to provide deep insight into the loading and performance of web apps. This insight allows developers to confidently decide how to best improve the performance of their targeted functionality.
  4. Act
    Update the code, commit it, deploy it, then take the most important step in the cycle.
  5. Repeat

Are you worried about where to focus your performance optimization efforts? Do you know if right now is the right time and right place? Build confidence, assurance and keep yourself on the rails with the OODA loop.

PS-AuthorBadge-Medium

If some of the terms I used in this post, like real user monitoring, synthetic testing and histograms, throw you for a loop, be sure to check out my Tracking Real World Web Performance Pluralsight course where I cover these concepts in detail, with examples and demos of how to automate the steps of the OODA loop.

Single Post Navigation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: