Week of 2021-11-22
Oops, I didn’t mean to. It just happened. I said I wasn’t going to post anything this week, but the stuff kept coming. Here goes.
If you want to catch up on the whole story, check out Jank in Teams, which starts at the beginning.
Micro and macro jank
If our team’s OODA loop runs just a tiny bit slower than the clock of the environment, we will generate a flurry of micro-jank -- many incidents that are so tiny, we can barely notice them. Unlike with machines, our collective resilience will helpfully wallpaper over these thousand cuts. However, as we’ve learned before, an incident of jank creates a deficit for the next cycle. It is fairly easy to see that this deficit continues to accrue over time. So the micro-jank grows into larger problems over time.
This larger problem usually manifests as macro-jank: a big reset that is clearly felt by everyone in the organization. The whole team seizes up and briefly stops listening to the environment’s clock, focusing inwardly to sort out their own mess.
In my experience, this phenomenon has an easily recognizable marker. A team that accrues OODA deficit tends to fall into this gait of periodically changing things around to see if their troubles will go away. However, because the source of the deficit remains unexplored, the rearranging of furniture rarely results in lasting change. Be it a dramatic shift in priorities, changing of leadership, or a reorg -- it’s at best a temporary fix, quickly leading back to deficit accrual.
One of my go-to examples of this sawtooth pattern is “leads reset.” As the team forms, a small group of leads is organized. At first, these leads operate as an effective unit, providing valuable direction and insights on priorities to the rest of the team. However, as the time goes by, leads discover gaps in their knowledge, and pull in more people onto the leads group. Sometimes this happens as a result of a team growing, but often, the breadth of the challenge is such that a small group of people simply can’t grasp it fully. Plus, it feels important to be in the leads group. After a little while, the group of leads becomes large and unwieldy. Effective conversations yield to bickering and eye-rolling. Leads themselves become disheartened, which percolates throughout the team. So what happens next? As you’d probably guessed, a new, smaller group of leads is formed -- until the next reset.
Having been part of these groups and an organizer of them, it always struck me as weird: why is it that we keep trying this same method to organize a leadership structure, over and over again? When a question like this pops up, it’s a good sign that the OODA deficit is being accrued.
Can macro-jank happen spontaneously, without first accruing micro-jank? It seems possible. Like, let’s imagine a severe and rapid environment change… oh wait, we don’t have to. It’s right outside. The COVID-19 pandemic will likely be a subject of many studies as a dramatic disruption of our environment. But was it truly an unexpected event or rather an outcome of micro-jank accumulating over a long period of time? How might we reason about that? To get there, we need to take a closer look at the nature of the OODA loop.
🔗 https://glazkov.com/2021/11/25/micro-and-macro-jank/
Retained and immediate mode
At the core of the OODA loop is the concept of a model. To create space for exploring it in depth, we’ll make a tiny little digression back into -- you guessed it! -- graphics rendering technology.
With my apologies to my colleagues -- who will undoubtedly make fun of me for such an incredibly simplified story -- everything you see on digital screens comes from one of the two modes of rendering: the immediate or the retained modes.
The immediate mode is the least complicated of the two. In this mode, the entirety of the screen is rendered from scratch every time. Every animation frame (remember those from the jank chapter?) is produced anew. Every pixel of output is brand new for each frame.
You might say: yeah, that seems okay -- what other way could there be? Turns out, the immediate mode can be fairly expensive. “Every pixel” ends up being a lot of pixels and it’s hard to keep track of them, yet alone orchestrate them into user interfaces. Besides, many pixels on the screen stay the same from frame to frame. So clever engineers came up with a different mode.
In retained mode, there exists a separate model of what should be presented on screen. This model is usually an abstraction (a data structure as engineers might call it) that’s easy to examine and tweak and it is retained over multiple frames (hence the “retained” in the name). Such setup allows for partial changes: find and update only the parts of the model that need to change and leave the rest the same. So, when we want a button to turn a different color, the only part that has to be changed is the one representing the button’s color.
Both modes have their advantages and disadvantages. The immediate mode tends to need more effort and capacity to pay attention to the deluge of pixels, but it also offers a fairly predictable time-to-next-frame: if I can handle all these pixels for this frame, I can do so for the next frame. The retained mode can offer phenomenal benefits in saving the effort and do wonders when we have limited capacity. It also yields a “bursty” pattern of activity: for some frames, there’s no work to be done, while for others, the whole model needs to be rejiggered, causing us to blow the frame budget and generate jank.
This trade-off between unpredictable burstiness and potential savings of effort is at the crux of most modern UI framework development. The key ingredient in this challenge is designing how the model is represented. How do elements of the screen relate to each other? What are the possible changes? How to make them inexpensive? How to remain flexible when new kinds of changes emerge?
The story of Document Object Model (DOM) can serve as a dramatic illustration. Born as a way to represent documents at the early beginning of Web, DOM has a strong bias toward the then-common metaphor of print pages: it’s a hierarchy of elements, starting with the title, body, headings, etc. As computing moved on from pages towards more interactive, fluid experiences, this bias became one of the greatest limiting factors in the evolution of the Web. Millennia -- hell, probably eons -- of collective brain-racking had been invested into overcoming these biases, with mixed results. Despite all the earnest effort, jank is ever-present in the Web. Unyieldingly, the original design of the model keeps bending the arc of the story toward the 1990s, generating phenomenal friction in the process.
In a weird poetic way, the story of DOM feels like the story of humanity: the struggle to overcome the limitations imposed by well-settled truths that are no longer relevant.
🔗 https://glazkov.com/2021/11/25/retained-and-immediate-mode/
The model underneath
It will probably not come as a surprise to you that we humans are a retained-mode bunch. It’s cool to imagine ourselves as the immediate-mode beings: everything in the world around us would be brand new! For every cycle of our OODA loop, nothing is retained. Talk about living in the present.
Alas, -- or fortunately, it’s hard to tell -- we aren’t like that. It would totally suck if for every situation, we would need to relearn everything from scratch. We can only learn a tiny bit from each iteration of the OODA loop. Our strength, individual and collective, is in harnessing the retained mode. For example, when we look around the room, we can only see what’s in front of us. Yet we retain details of the room that aren’t in our direct eyesight, and can reason about them. We can reach for a glass of water without looking at it. This is our model being put to work. Every cycle makes the model a bit richer and more nuanced, helping us not just visualize things that we’re not seeing directly, but also make predictions about what happens to them in the immediate future.
When I first learned about the OODA loop, I naively presumed that all steps in the process operate directly on the environment. I observe the environment, I orient within it, I decide on what to do, and then I act on it. It wasn’t until later, after I learned about the concept of constructed reality, that a different understanding of the OODA process had emerged.
Aside from the first step, the OODA loop operates on the model of the environment, rather than directly on it. This can be amazing, allowing us to connect our hockey stick with the puck for that awesome from-behind pass that sets the stands afire. It can also be a lot less awesome, because our models aren’t always representative of the environment. I reach for a glass -- and accidentally poke it with my thumb, spilling the water. The model lied.
Put differently, most steps in OODA occur in a mirror world of the environment that we created in our minds. If the mirror is clear, our actions proceed as intended. If it’s one of those funhouse mirrors, your guess is as good as mine. Our models are the sources of both our clairvoyance and our blindness.
Whether we want it or not, the OODA loop serves two interrelated purposes: one is to produce an action between the two ticks of the environment’s clock. The other is to update the model of our environment and keep it accurate. How well we manage to perform both tasks reflects in how we produce jank.
🔗 https://glazkov.com/2021/11/25/the-model-underneath/
Where will this story’s twists take us next? Will the plucky protagonist overcome the odds? Stay tuned for next week’s installment of “Jank in Teams.”