Scenario Hunting is Design First Test Method

Scenario Hunting Process

Scenario Hunting is an approach to minimize the length of feedback loop between visual design artifacts (like Event Storming sticky notes) and code.


4 Minute Demo




What is Scenario Hunting and Why it Matters?

Scenario Hunting accelerates revealing deeper insights into your models. The quickness of the process allows individual developers to asynchronously ensure the practicalities of the proposed model during modeling workshops. Developers hunt for the most critical scenarios, grasp valuable feedback, and share it with stakeholders to update the model collaboratively and make more informed decisions.


Traditionally, we used to separate the modeling “phase” from the implementation “phase” (even if we don’t refer to them as separate phases). However, there are some caveats to that approach. In practice, things may diverge during the implementation.

We are humans. We’re not compilers. We’re unable to compile the hypothetical model on sticky notes in our brains. But we need to ensure that the model is practical. The theoretical model represented on sticky notes may not be consistent. It may not integrate into the rest of the system. An algorithm may not be implementable. The time complexity of a mathematical algorithm may turn out to be factorial, and so on. Yes, these are the details. But some of them impact the model, if not the business.

“Designing information systems is kind of fractal. There are things that matter at all levels of detail, and there are tiny details that invalidate grand assumptions, and there are grand assumptions that prevent effective progress at the level of tiny details.”
Dave Farley

We arrange modeling workshops like Event Storming mainly to tackle the complexity. We take the general idea, break it down, and add more and more details to make it more transparent and practical. The ultimate model is the working code (which also reflects the model's purpose, of course).


Switching from event storming to code

The workshop provides a common ground where both technical and non-technical stakeholders can communicate on to share their knowledge and ideas and carve models out of them. Finally, the model proposals must be tested to ensure they work in practice.

“Software development is a learning process; working code is a side effect.”
Alberto Brandolini

Working code is a side effect of learning. Coding is the last step in the learning process. But coding isn't allways the best tool for solving high-level business problems. So rather than directly writing code, we use sticky notes to understand and demistify the requirements. However, sticky notes can’t be compiled, run, or tested. They need to be turned into code first. Often, we can't be sure about the consistency, integrity, and feasibility of the model before translating the sticky notes to code. At the end of the day, it's the working code that closes the feedback cycle.

Translating theoretical models into code takes longer than feasible during workshops. Postponing the translation can make the practicalities of the model proposal uncertain. This lack of certainty can in turn, hinder the design of the model's dependencies, as it is challenging to be confident about the a model without a clear understanding of its practical implications.

In short, the impedance mismatch between sticky notes and code is a bottleneck for the design process, and Scenario Hunting minimizes the paradigm shift penalty without losing track.

Scenario Hunting helps you to drill down quickly into a small piece of the model at a time. Using Scenario Hunting, you translate a small piece of the model into a test case. The test shapes a guardrail that keeps your implementation on the model’s road and notifies you as soon as it loses it. It helps you integrate the model into code bit by bit, see if it fits in, and leverage the compiler to notify you with meaningful feedback along the way.

When implementing a new scenario, a failed test can indicate that the scenario is incompatible with the existing code base, the model is inconsistent, or the proposed model doesn't align with the expected outcomes. In these cases, it is important to reevaluate the model and make necessary adjustments before moving forward with the implementation.



How to switch from Event Storming to code

When we separate the modeling and implementation "phases", we extend the feedback loop too long. Suppose the model turns out to be inconsistent during implementation and needs adjustments. In that case, it wouldn't be possible to interrupt and gather all the stakeholders and bring them back to the context to decide how to modify the model every time.

Scenario Hunting can be used to mitigate the risk. During the modeling workshop, developers are distributed among groups of stakeholders and hunt for scenarios from the most indeterminate parts of the model. By hunting each scenario, they learn more about the model's practical implications and how integratable it is with the existing code.

Even if translating all sticky notes into code at once were possible, the prefferred approach would still be to focus on a small piece of the model at the time and share the feedback on the board so that everyboday (including non technical people) can understand and continue to continute to the design interatively. Doing so can also protect the sticky notes as a living documentation.


After the workshop, developers continue hunting scenarios and grasping deeper insights into the model. As they implement scenarios, they mark them on the board and share their feedback there when necessary. The feedback may affect the rest of the system, update the model, or help them make more informed decisions. Categories of helpful feedback can facilitate achieving breakthroughs.

Scenario Huntnig keeps the model up-to-date and provides better living documentation than a discrete pile of gherkin scenarios.


Tooling Support

Scenario hunting is an idea to create better software in a shorter time. However, as like any other idea, it needs its equipment to be practical. For that reason, we've created the minimum required tooling so that you can start your experiment. You can simply click here to install the open source framework which you can install on a Miro board. In terms of toolsets and automation, scenario hunting opens an endless world of possibilities. The test results can be reported on stickies enabling the progress to be tracked on the board. Consequently, the stakeholders can see who is working on what, and how much it takes. Later on, the data can be used to come up with more accurate estimates and resource management. Also since scenario hunting creates a one-to-one relationship between design and the implementation artifacts, it can connect the data gathered from both worlds and between them. And the data can be fed into Artificial Intelligence algorithms to collect sophisticated recommendations. Machine learning algorithms can also be leveraged to learn from the design of various systems and their outcomes in practice to make stronger design recommendations or even generate the self-testing code for an entire system.



Conclusion

Using Scenario Hunting, you keep your models more practical and precise. Scenario Hunting allows developers to focus on what matters and keep the living documentation alive. It also enables them to treat modeling and implementation as a single task, improving their productivity and mental health because they incur less cognitive switching penalty using Scenario Hunting.

Scenario Hunting reduces the gap between modeling and implementation paradigms. You reflect the model proposal as code and protect it from deviation while implementing it. Scenario Hunting helps developers to stay focused on the model and leverages the compiler to reveal potential hidden complexities behind proposed solutions.




Build Faster

Be more productive and focus on what matters by automating the unimportant costly jobs and minimizing the navigation constraint between the code and model proposal.

Focus on Model

Focus on what deserves your attention (the design). Derive code from the model. Deal with code on the sidelines.

Coding = Designing

Minimize the gap between coding and modeling. Use the right environment, and the right people, at the right time, for the right job. Manage your resources.

Task Switching

Treat modeling and coding as a single task to minimize the task-switching penalty. It focuses you on a single task at a time without loosing the track.

Product Quality

Focusing on a single task at a time while keeping track of its relationship with the rest of the system improves the quality of the resulting product.

Shorten Feedback Loops

Stay focused on the model, quickly drill down a bit of it at a time, acquire a deeper insight, share the feedback, and improve the model accordingly.

Collaborative

You can integrate asynchronously and collaboratively adjust the model based on the feedback as per need.

Complements Mob

Scenario Hunting accelerates and facilitates the driver’s job in a mob setting, revealing more accurate insight.







Resources