Event Storming – How to deal with complexity and improve your domain design

Were you faced with implementing a new complex feature, just to discover edge case after edge case? Or did you work on a specific component, without understanding how the changes impact the overall system?

In this article, you will discover a technique that will prevent headaches and frustration when dealing with hidden dependencies, complexity or unclear requirements.

Alberto Brandolini invented Event Storming to align people in a common understanding of the business procedures, user flows, and the value creation process.

Before starting any implementation, we expect that requirements are given by domain experts (product owners, business analysts, game designers, etc).

The fundamental assumption that this technique challenges is that a single person knows the whole business domain.

That might be true in certain companies or smaller businesses, however, the reality is that we are dealing with knowledge silos and complex system, where the so-called domain experts know a certain part of the big picture and not all dependencies.

The goal of the event storming technique is to create a shared understanding of the value creation flow. Key stakeholders must participate, be in the same room and map out all domain events that are part of the system. Only through collaborative work, weaknesses are discovered and can be acted upon.

I used this method for improving our continuous delivery process. I used it in aligning understanding of our assets pipeline. When I was part of a cross-functional team, I used it before starting to implement bigger features to reduce risks and discovering all the possible flows that can influence the user flow. Over and over it brought the results that we expected and it saved many hours of building the wrong thing.

So let’s take a look at the actual steps involved in organizing an Event Storming session.

Step 1. Schedule a workshop and invite the right people.

You will need a mix of people who can ask questions (usually developers, qa engineers) and people who can answer them (usually the domain experts). The number of participants should be at least 4 persons but not more than 8, otherwise, the logistics and moderation effort would be too high.

You need a dedicated moderator as he will have a key role in the workshop. Bring posits with various colors (especially orange ones) Bring a long big plotter paper that you tape onto the entire length of the main wall. Push all chairs and tables to the corner as the workshop will be quite interactive and you need all participants to be engaged as much as possible. Draw an arrow from left to right on the plotter paper, reprising a timeline.

The room should look something like this:

Step 2. Ask the participants to write down the key events in their domain as an orange sticky note, in a verb at past tense and to place them along the timeline.

This phase marks the start of modeling the whole business line with domain events. Most participants might be a bit confused at start, but as the first event is added to the board, people start getting in a state of flow.

The moderator should keep an eye on all inserted stickers. If there are some that don’t follow the rules (e.g. not a verb at past tense) he should not interrupt the process but rotate a bit the sticker to mark that something is not right.

Some participants will make remarks on certain events, like this is always causing trouble, or I have no idea what is going on here. The moderator should capture these warnings on a purple sticker and place them close to the corresponding events.

Constraints, issues or ambiguities will be soon exposed. Key terms definitions should be captured by the moderator on a special yellow stick note and placed below the normal flow. This will help build a terminology that is commonly understood.

After this phase, your wall should look something like this.

Step 3. Start getting deeper into the mechanics and core components of the domain.

After having all the events visualized and ordered chronologically start adding blue stickers that represent user actions/intentions/decisions. For example: “cancel subscription” or “order pizza”. Alongside add a small yellow sticker that represents the actor performing the interaction.

Discussions will soon go into the direction why should user “X” perform this action? This forces people to think one layer deeper, since commands are ultimately the results of some decision.

By challenging assumptions and bringing alternative options you will make the first step in improving the overall design. That is why is important to have key stakeholders participating so that constraints can be updated or policies adjusted.

After the workshop, I usually take pictures of the entire wall and also bring the paper role in the team space so that it is always visible. When team members encounter any difficulties, they just come back to it as it represents a source of knowledge that is understood by all technical or nontechnical parties.

You can go further and build aggregates so that you can start building a domain model, but for simplicity’s sake, I will stop here and provide you bellow links towards Alberto Brandolini’s website, the inventor of this technique.

I recommend checking out his videos, presentation and grab his book where he goes in a lot more details on the thoughts behind the methods.

If you want to see the video version of this article check it out on my youtube channel.

A software developer’s journey to success – part one

Did you finish the university and you got your first job as a software developer?  Do you find it hard to define and measure the ultimate success of this career? Do you wonder what awaits for you in the next two, five or ten years?

There is enough material on the internet to get an answer to those questions. However, I would like to approach this subject differently. I find that most strategies are centered too much on technical skills, tools, and coding exercises. I think all of them are essential, but I believe that, in the beginning, focusing on having the right mindset and the proper soft skills will make the difference between a good developer and a great developer.

In this post, we will start by learning to be open to mistakes, focus on training and adapt fast, use discipline to be in control of time and at the end discover how essential it is to create a healthy work-life balance. So let’s begin.

Making Mistakes

The first thing that a new developer must understand from the beginning is that it is ok to make mistakes.  Most educational systems, teach students to avoid mistakes and even use bad marks to reflect the consequences. In real life, I see mistakes are learning opportunities to understand that one action that we took had effects that we did not expect. The data gives us the ability to adapt and do it differently next time.  What is critical is not to repeat the same action over and over and always use the gain knowledge to improve.

If you just started your career and you have not made any mistakes, I would think that you are too slow on purpose and that you are not taking massive actions into developing and pushing yourself further. Now it is the time to make mistakes. Now it is the time to experiment. Now it is the time to grow exponentially.

A small tip from my side: when you failed a task, project, etc. always hold yourself accountable and never blame someone else. Find a quiet room and write down everything it happened and try to understand why it failed. Once you have this information, start researching, brainstorming what kind of actions or options you have for the next time. I believe this simple technique will guarantee that your knowledge and abilities will get broader and broader.

Learn

Start with learning enough theory to get you started. Do some research, take some online courses or workshops. The next step is to take action.  Use the gained knowledge and put it into practice. Write a small program, extend a feature or play around with some public API. The key is to understand how everything works in reality. In a perfect world, you should not have any surprises. Finding outdated documentation is common. Service calls will return unexpected results. Methods have side effects that make your life harder. At one moment you will get stuck, and it is ok. Go back to the research and discovery phase until you can move forward and repeat this cycle over and over. With time it will become easier.

To get even better show it to others and teach them. Start with helping a coworker when he is stuck or might need a different perspective. The knowledge will deepen in your mind as you explain to others, as you answer questions that you did not think of.

Discipline

Many people consider time one of their biggest enemy to their freedom. Discipline is the way how you get control of your time. Store all your tasks, deadlines in a single central place, like a todo list app. Create a routine and do a little bit of planning around the time of the day that you are most focused. Nowadays there are great productivity techniques, apps and resources that can help. You can check my earlier post on my productivity toolbox.

Learn the importance of commitment. There are moments and situations where you will have to commit to complete a task. Please do not take it lightly, since this is one of the most critical points influencing the trust that others have in you.  True commitment means massive actions and strong will not to give up. It is better to fully commit to the wrong project, rather than partially commit to the right one. You will influence others with your energy and drive, and you will become soon a key player inside of the team.

Your initial estimations will be inaccurate since you still lack the experience and knowledge. However, collect all the data, write it down and used to refine your values in the future. This will give you the confidence to say from beginning NO and to suggest a different path of actions.  Saying NO is another way that you can earn the respect of others when used correctly. Use facts and data to explain your view and always come with constructive options.

Respect your process and hold yourself accountable. This is the key to master time and not to become its slave.

Work-Life Balance

There are many reasons why you will spend more than eight hours per day at work. You will be excited about the new possibilities, opportunities or your new role. For you, it might not be a big issue yet since you are already used to going into this “overdrive” mode during the university. However, you have to ask yourself this questions: Are you putting in extra time because you’re excited or doing it because this is your new life? How are you going to feel in a year when you are still sacrificing your weekends?

Answer these questions honestly and realize that the most important resource that we have is time. Loving what you do is essential. However, now it is the time do discover what else you love doing, find out what your passions are. Take a massage course. Find out about entrepreneurship. Learn to drive a boat. Learn to play a musical instrument.  Use all the opportunities that we have today to build a well-rounded version of yourself.

In this post, we discussed how essential is to have the right mindset at the begging of your career to grow and develop. In the next one, we will cover the importance of soft skills like communication, personal branding,  financial education to even fitness and mediation. There is a long journey in front of us, however, if you are as thrilled as I am, you will follow me to discover the rewards for yourself.


Also published on Medium.