<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Arsalan Valoojerdi on Medium]]></title>
        <description><![CDATA[Stories by Arsalan Valoojerdi on Medium]]></description>
        <link>https://medium.com/@arsalan.valoojerdi?source=rss-1c6eb11dc34------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sXgvnAhK6EDkNAANNbVsgA.jpeg</url>
            <title>Stories by Arsalan Valoojerdi on Medium</title>
            <link>https://medium.com/@arsalan.valoojerdi?source=rss-1c6eb11dc34------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 13:36:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arsalan.valoojerdi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Toxic Technical Managers: Identifying, Addressing, and Moving Forward]]></title>
            <link>https://medium.com/@arsalan.valoojerdi/toxic-technical-managers-identifying-addressing-and-moving-forward-1ad63a6f8f7a?source=rss-1c6eb11dc34------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ad63a6f8f7a</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[technical-lead]]></category>
            <dc:creator><![CDATA[Arsalan Valoojerdi]]></dc:creator>
            <pubDate>Sat, 10 Feb 2024 06:46:29 GMT</pubDate>
            <atom:updated>2024-02-10T07:19:47.752Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*yeQ7uS7Jv2qLb8pf51jwkg.png" /></figure><p>In the realm of technical teams, the influence of a manager is paramount, shaping both project outcomes and team morale. However, not all managers foster environments conducive to growth and collaboration. Some exhibit characteristics that not only hinder team performance but also jeopardize mental well-being. Let’s delve into the defining traits of toxic technical managers and explore strategies for mitigating their negative impact:</p><ol><li><strong>Refusal of Delegation: </strong>Toxic technical managers often exhibit a reluctance to delegate tasks and responsibilities, undermining team autonomy and impeding productivity. This refusal stems from a desire to maintain control, leading to bottlenecks in workflow and stifling the professional development of team members.</li><li><strong>Aggressive Behavior:</strong> Aggression is antithetical to effective leadership, yet toxic technical managers may resort to hostile conduct to assert dominance. This behavior breeds fear and resentment among team members, poisoning the work environment and hindering collaboration.</li><li><strong>No Acceptance for Feedback:</strong> Toxic technical managers demonstrate an unwillingness to accept feedback, viewing it as a challenge to their authority. This closed-minded approach stunts personal and team growth, as constructive criticism is disregarded, and opportunities for improvement are squandered.</li><li><strong>Insecurity Regarding Position:</strong> Insecure managers harbor a fear of losing their position, leading to defensive behaviors and hindering collaboration. This fear-driven mindset fosters a culture of mistrust and stifles innovation, as managers prioritize self-preservation over team success.</li><li><strong>Dependency on Single Source of Knowledge: </strong>Toxic technical managers hoard knowledge, creating a dependency on a single source of information within the team. This reliance poses a significant risk to project continuity, as the departure or unavailability of the manager can lead to disruptions and delays.</li><li><strong>Culture of Blame: </strong>Toxic technical managers foster a culture of blame, deflecting responsibility for failures onto others. This toxic behavior erodes trust and morale within the team, inhibiting creativity and collaboration as team members fear reprisal for mistakes.</li><li><strong>Lack of Team Appreciation: </strong>Toxic technical managers fail to recognize and appreciate the contributions of their team members. This lack of acknowledgment undermines morale and motivation, leading to disengagement and decreased productivity.</li><li><strong>Interdepartmental Conflict Proliferation: </strong>Toxic technical managers contribute to conflicts with other departments, impeding collaboration and hindering project progress. This proliferation of interdepartmental strife creates unnecessary barriers and detracts from the overarching goals of the organization.</li></ol><p>To address the challenges posed by toxic technical managers, organizations must prioritize proactive measures aimed at fostering a positive work environment and promoting effective leadership. By identifying these characteristics and implementing strategies for intervention and improvement, teams can navigate the complexities of toxic management and forge a path towards growth and success.</p><p>It’s time to recognize, address, and move forward from the toxic behaviors that hold teams back. By fostering a culture of respect, accountability, and appreciation, organizations can create environments where both individuals and teams thrive.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ad63a6f8f7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Team Topologies: A Blueprint for Effective Team Structures — Part 2]]></title>
            <link>https://medium.com/@arsalan.valoojerdi/team-topologies-a-blueprint-for-effective-team-structures-part-2-5c349d37a45f?source=rss-1c6eb11dc34------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c349d37a45f</guid>
            <category><![CDATA[team-topologies]]></category>
            <dc:creator><![CDATA[Arsalan Valoojerdi]]></dc:creator>
            <pubDate>Sun, 06 Aug 2023 12:09:05 GMT</pubDate>
            <atom:updated>2023-08-06T12:20:11.370Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Team Topologies: A Blueprint for Effective Team Structures — Part 2</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*j316dj__fSq35htCxJxd1Q.png" /></figure><p>In today’s fast-paced and ever-changing business landscape, effective team structures are crucial for organizations to stay competitive and deliver value to customers efficiently. Team Topologies is an approach that focuses on optimizing team structures to enhance agility, collaboration, and innovation within an organization. In this article, we will delve into the four fundamental team topologies: Stream-aligned Teams, Enabling Teams, Complicated-Subsystem Teams, and Platform Teams, exploring their characteristics, behaviors, and outcomes.</p><blockquote><strong>Stream-aligned Teams:</strong></blockquote><p>Stream-aligned teams are the backbone of the Team Topologies approach. They are designed to deliver a continuous flow of work aligned to a specific business domain or organizational capability. These teams are empowered to build and deliver customer value independently, without relying on other teams for hand-offs. Key characteristics of stream-aligned teams include:</p><p><strong>· </strong>Clear alignment to a single valuable stream of work, such as a product, user journey, or user persona.</p><p>·<strong> </strong>Cross-functional skills mix, allowing the team to handle end-to-end development and delivery.</p><p>·<strong> </strong>Rapid course correction based on feedback, using an experimental approach to product evolution.</p><p>·<strong> </strong>Minimal or zero hand-offs of work to other teams, resulting in increased speed and efficiency.</p><p>·<strong> </strong>Evaluation based on the sustainable flow of change and supporting technical and team health metrics.</p><p><strong>· </strong>Focus on addressing code quality changes to maintain a safe and easy-to-change codebase.</p><p>An effective stream-aligned team fosters a sense of autonomy, mastery, and purpose among its members, promoting engagement and high performance.</p><blockquote><strong>Enabling Teams / Technical Consulting Teams:</strong></blockquote><p>While stream-aligned teams have end-to-end ownership, they often face challenges in finding time for research and learning new skills due to constant delivery pressure. Enabling teams’ step in to bridge this capability gap by providing specialized expertise and guidance. Key characteristics of enabling teams include:</p><p>· Specialists in a given technical or product domain, providing insights and suggestions to stream-aligned teams.</p><p>· Collaborative nature, understanding the problems of stream-aligned teams and empowering them to grow their capabilities.</p><p>· Focus on increasing the autonomy of stream-aligned teams, prioritizing problem-solving over providing ready-made solutions.</p><p>· Regularly staying updated on new approaches and practices in their area of expertise, acting as curators for knowledge sharing.</p><p>· Acting as messengers of good and bad news regarding technology life cycles and facilitating learning across teams.</p><blockquote><strong>Complicated-Subsystem Teams:</strong></blockquote><p>Some systems within an organization require specialized knowledge to understand and make changes effectively. Complicated-subsystem teams are responsible for building and maintaining such subsystems. Their primary goal is to reduce the cognitive load on stream-aligned teams by handling complex components. Key characteristics of complicated-subsystem teams include:</p><p>· Specialists in the specific area of knowledge related to the subsystem.</p><p>· Collaboration with stream-aligned teams during early development phases and a focus on subsystem interface and feature evolution in later stages.</p><p>· High delivery speed and quality for the complicated subsystem compared to stream-aligned teams working on it alone.</p><p>· Correctly prioritizing and delivering upcoming work to meet the needs of stream-aligned teams using the subsystem.</p><blockquote><strong>Platform Teams:</strong></blockquote><p>Platform teams work on the underlying platform that supports stream-aligned teams in their delivery process. By simplifying complex technology and reducing cognitive load, platform teams empower stream-aligned teams to focus on their core work. Key characteristics of platform teams include:</p><p>· Full ownership of building, running, and fixing their application in production by stream-aligned teams.</p><p>· Provision of internal services via self-service capabilities, reducing the effort required from stream-aligned teams to develop underlying services.</p><p>· A focus on usability and reliability, continuously assessing and improving their services.</p><p>· Leading by example by using their services internally and collaborating with other teams.</p><p>· Understanding the adoption curve for new services and technologies, facilitating smooth integration within the organization.</p><blockquote><strong>Team Interaction Modes:</strong></blockquote><p>It is not enough to organize teams into specific patterns. High effectiveness is achieved by identifying how these teams interact and knowing when to change those interactions. Poorly defined team interactions and responsibilities can lead to friction and inefficiency within organizations. To address this, the concept of Team Interaction Modes is introduced, helping teams make informed decisions about their collaboration methods.</p><blockquote><strong>Importance of Team Interaction Modes:</strong></blockquote><p>Simply arranging teams into predefined patterns is insufficient for high effectiveness. Teams must also understand how to interact with one another to achieve optimal results. Poorly defined team interactions can lead to frustration and hinder productivity.</p><blockquote><strong>Choosing Between Collaboration and Service Consumption:</strong></blockquote><p>A crucial decision when considering the relationship between teams is whether to collaborate or treat another team as a service provider. This choice can be made at various levels within an organization, such as collaborating on projects or consuming services from specialized teams.</p><blockquote><strong>The Three Essential Team Interaction Modes:</strong></blockquote><blockquote>1- <strong>Collaboration:</strong></blockquote><p><strong>Characteristics:</strong></p><ul><li>Suitable for high adaptability and discovery, especially when exploring new technologies or techniques.</li><li>Facilitates rapid innovation and discovery by avoiding costly hand-offs between teams.</li><li>Best suited for early phases of new systems development or situations requiring quick discovery of new information.</li><li>May not be ideal for extended periods if clear, well-defined interfaces between teams are necessary.</li></ul><p><strong>Advantages:</strong></p><ul><li>Rapid innovation and discovery, fewer hand-offs.</li></ul><p><strong>Disadvantages:</strong></p><ul><li>i. Wide shared responsibility, higher cognitive load, possible reduced output.</li></ul><p><strong>Constraints:</strong></p><ul><li>A team should collaborate with, at most, one other team at a time.</li></ul><blockquote>2- <strong>X-as-a-Service:</strong></blockquote><p><strong>Characteristics:</strong></p><ul><li>Suitable for situations where one team provides a code library, component, API, or platform “as a service” to other teams.</li><li>Provides clear responsibility boundaries and allows teams to focus on their work without requiring extensive collaboration.</li><li>Requires effective service management by the providing team to maintain viability over time.</li></ul><p><strong>Advantages:</strong></p><ul><li>Clarity of ownership, reduced cognitive load</li></ul><p><strong>Disadvantages:</strong></p><ul><li>Slower innovation, potential flow reduction if not effectively implemented</li></ul><p><strong>Constraints:</strong></p><ul><li>A team can expect to use X-as-a-Service with multiple other teams simultaneously.</li></ul><blockquote><strong>3- Facilitating</strong></blockquote><p><strong>Characteristics:</strong></p><ul><li>Suitable when one team needs active help from another team to enhance productivity and remove impediments.</li><li>Enables teams to be more effective, learn quickly, and understand new technologies better.</li><li>Facilitating teams focus on enhancing interactions between other teams rather than building software systems.</li></ul><p><strong>Advantages:</strong></p><ul><li>Unblocking teams, detecting gaps and misaligned capabilities.</li></ul><p><strong>Disadvantages:</strong></p><ul><li>Requires experienced staff, unfamiliar interactions.</li></ul><p><strong>Constraints:</strong></p><ul><li>A team should facilitate with only a small number of other teams simultaneously.</li></ul><blockquote><strong>Conclusion:</strong></blockquote><p>Team Topologies offers a valuable framework for organizations to optimize their team structures and achieve better collaboration, agility, and innovation. The four fundamental team topologies — Stream-aligned Teams, Enabling Teams, Complicated-Subsystem Teams, and Platform Teams — each play a crucial role in creating a successful and efficient organization. By understanding their characteristics, behaviors, and outcomes, organizations can tailor their team structures to meet specific business needs and deliver exceptional value to customers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c349d37a45f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Team Topologies: A Blueprint for Effective Team Structures — Part 1]]></title>
            <link>https://medium.com/@arsalan.valoojerdi/team-topologies-a-blueprint-for-effective-team-structures-part-1-f545df910fbf?source=rss-1c6eb11dc34------2</link>
            <guid isPermaLink="false">https://medium.com/p/f545df910fbf</guid>
            <category><![CDATA[team-topologies]]></category>
            <dc:creator><![CDATA[Arsalan Valoojerdi]]></dc:creator>
            <pubDate>Sat, 29 Jul 2023 13:38:48 GMT</pubDate>
            <atom:updated>2023-07-29T13:41:25.308Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Team Topologies: A Blueprint for Effective Team Structures — Part 1</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*j316dj__fSq35htCxJxd1Q.png" /></figure><p>In the rapidly evolving and competitive business landscape of today, the significance of constructing team structures efficient cannot be overstated. Inspired by the groundbreaking book “Team Topologies”, this article delves into the concept of Team First Thinking and examines the nuances of different types of Cognitive Load. Additionally, it provides a comprehensive overview of the diverse team topologies featured in the book. By understanding and implementing these principles, organizations can lay a strong foundation for high-performance teams that drive innovation and adaptability.</p><blockquote><strong>Team First Thinking:</strong></blockquote><p>At its core, Team First Thinking is all about designing organizational team structures around the products or services they deliver. Unlike traditional approaches, where teams are confined within functional boundaries, this approach emphasizes building teams that are directly responsible for delivering specific products or services. The ultimate goal is to create a culture of collaboration and shared responsibility, where teams are driven by a common purpose — delivering value to the customer.</p><blockquote><strong>Team First Thinking — Small, Long-Lived Teams as the Standard:</strong></blockquote><p>In the realm of Team First Thinking, the concept of “team” takes on a specific meaning — a stable grouping of 5 to 9 individuals working cohesively toward a shared goal. Work is assigned exclusively to teams, not to individuals. By limiting the number of team members, organizations maximize trust within the team, fostering effective communication and decision-making. An optimal team size of around 7 to 9 people ensures a balance between agility and efficiency.</p><blockquote><strong>Team First Thinking — Owning the Software: A Team’s Responsibility:</strong></blockquote><p>Under Team First Thinking, the team assumes full ownership of the codebase and takes pride in caring for it. This sense of ownership fosters accountability and encourages teams to strive for continuous improvement. By nurturing a culture where the team takes responsibility for the software, organizations can enhance code quality and facilitate faster delivery of valuable features.</p><blockquote><strong>Team First Thinking — Cultivating a Team First Mindset:</strong></blockquote><p>For Team First Thinking to flourish, team members must prioritize the collective needs of the team over individual objectives. This entails arriving on time for stand-ups and meetings, keeping discussions on track, and encouraging a strong focus on team goals. Collaborative behaviors such as unblocking other team members, mentoring, and exploring options rather than winning arguments foster an environment of trust and cooperation.</p><blockquote><strong>Team First Thinking — Embracing Diversity in Teams:</strong></blockquote><p>Diverse teams, comprising members from varied backgrounds and skillsets, bring a wealth of perspectives and creativity to problem-solving. They tend to generate innovative solutions rapidly and display a heightened ability to empathize with the needs of other teams. Embracing diversity is a powerful catalyst for boosting team performance and driving organizational success.</p><blockquote><strong>Team First Thinking — Rewarding the Whole Team:</strong></blockquote><p>In a Team First Thinking environment, recognition and rewards should extend to the entire team rather than singling out individual achievements. By celebrating team successes, organizations reinforce the idea of collective efforts driving progress and outcomes.</p><blockquote><strong>Team First Thinking — Minimizing the Cognitive Load:</strong></blockquote><p>To operate at peak performance, teams must manage their cognitive load effectively. High cognitive load can impede a team’s ability to own and evolve software safely. With a team-first approach, organizations align the team’s responsibilities with their cognitive capacity, ensuring a balance that promotes efficiency and reduces burnout.</p><blockquote><strong>Cognitive Load:</strong></blockquote><p>Cognitive load refers to the mental effort required for learning, understanding, and problem-solving. In the context of software development and team dynamics, cognitive load plays a pivotal role in determining a team’s effectiveness and productivity. It is crucial for organizations to recognize the significance of managing cognitive load to foster high-performance teams.</p><p>When a team faces an excessively high cognitive load, several adverse consequences can arise. Firstly, team members may become overwhelmed, leading to decreased focus and increased chances of making errors. Secondly, high cognitive load can hinder the team’s ability to fully understand and take ownership of the software they work on, potentially resulting in incomplete or suboptimal solutions. Moreover, elevated cognitive load can lead to team burnout and decreased job satisfaction, impacting overall team morale and motivation.</p><blockquote><strong>Different types of Cognitive Load:</strong></blockquote><p><strong>Intrinsic Cognitive Load:</strong> Pertaining to fundamental aspects of a task, intrinsic cognitive load is shaped by the knowledge required to navigate the problem space. For instance, for a web application developer could be the knowledge of the computer language being used.</p><p><strong>Extraneous Cognitive Load:</strong> Arising from the task’s environmental context, extraneous cognitive load includes distractions or complex details that impede productivity. For example, remembering numerous console commands for deploying a component adds unnecessary cognitive strain.</p><p><strong>Germane Cognitive Load:</strong> Involving aspects that require special attention for learning or high performance, germane cognitive load enhances problem-solving and learning. Examples include understanding specific business domain (such as invoicing system or video-processing algorithm) or different service interactions.</p><blockquote><strong>Managing Team Cognitive Load:</strong></blockquote><p><strong>Minimize Intrinsic Cognitive Load:</strong> Through training, skillful technology choices, strategic hiring, and promoting pair programming, organizations can alleviate intrinsic cognitive load and enhance team expertise.</p><p><strong>Eliminate Extraneous Cognitive Load:</strong> Identifying and automating repetitive, low-value tasks allows teams to focus on critical work, reducing unnecessary cognitive burden.</p><p><strong>Leaving Room for Germane Cognitive Load:</strong> Prioritizing business domain knowledge empowers teams to make more informed decisions and fosters innovation.</p><blockquote><strong>Measure Team Cognitive Load:</strong></blockquote><p>- <strong>Ask a simple question:</strong> Do you feel like you’re effective and able to respond in a timely fashion to the work you are asked to do?</p><p>- <strong>Domain Complexity: </strong>When measuring cognitive load, what we really care about is domain complexity — how complex is the problem that we’re trying to solve with software?</p><p>o <strong>Different types of domains:</strong></p><p>§ <strong>Simple: </strong>Most of the work has a clear path of action</p><p>§ <strong>Complicated: </strong>Changes need to be analyzed and might require a few iterations on the solution to get it right</p><p>§ <strong>Complex: </strong>Solutions require a lot of experimentation and discovery</p><blockquote><strong>Conclusion:</strong></blockquote><p>In this article, we delved into the essential concepts of Team First Thinking and Cognitive Load, both of which serve as the foundational pillars for building effective and high-performance teams. In the upcoming article, we will take our understanding of Team First Thinking and Cognitive Load further by exploring different team topologies and team interactions. By studying various team structures proposed in the “Team Topologies” book, we will uncover how these models can optimize team collaboration, streamline workflows, and drive innovation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f545df910fbf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Engineering: Where Communication Drives Success]]></title>
            <link>https://medium.com/@arsalan.valoojerdi/software-engineering-where-communication-drives-success-6abad7880fae?source=rss-1c6eb11dc34------2</link>
            <guid isPermaLink="false">https://medium.com/p/6abad7880fae</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[communication]]></category>
            <dc:creator><![CDATA[Arsalan Valoojerdi]]></dc:creator>
            <pubDate>Thu, 20 Jul 2023 06:36:12 GMT</pubDate>
            <atom:updated>2023-07-20T06:41:35.271Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0t6gfnUtEkxnk841OpLvAA.png" /></figure><p>Software engineering is a dynamic and intricate discipline that goes far beyond lines of code and algorithms. While technical skills are essential, at its core, software engineering is all about effective communication. Collaboration, comprehension, and conveying ideas play a pivotal role in creating successful software products. In this article, we explore how communication is the lifeblood of software engineering, enabling teams to align their efforts, solve complex problems, and deliver high-quality solutions.</p><blockquote><strong>The Collaborative Nature of Software Engineering:</strong></blockquote><p>Effective software engineering demands collaboration among diverse teams. Engineers, designers, product managers, and stakeholders must work together to build cohesive software systems. Communication facilitates a shared understanding of requirements, specifications, and project goals, enabling teams to deliver results that meet expectations. By fostering an environment of open communication, teams can harness the collective intelligence and creativity of individuals, leading to innovative solutions.</p><blockquote><strong>Bridging the Gap between Technical and Non-Technical Stakeholders:</strong></blockquote><p>Software engineers must bridge the gap between technical intricacies and the needs of non-technical stakeholders. They serve as intermediaries, translating complex technical concepts into understandable terms for clients, end-users, and business stakeholders. Effective communication ensures that everyone involved is on the same page, leading to better decision-making, reduced misunderstandings, and successful project outcomes.</p><blockquote><strong>Clear Communication Prevents Misinterpretations:</strong></blockquote><p>One of the most challenging aspects of software engineering is building a product that truly matters to the customer. Often, software development teams face difficulties in creating the right product due to miscommunication between technical and business professionals. Miscommunication can result in misunderstandings, inefficiencies, and even software bugs. However, by prioritizing clear and concise communication, the risks of misinterpretations can be mitigated, and a shared understanding of requirements, specifications, and design patterns can be fostered. Effective communication by engineers enables the early identification of potential pitfalls in the development cycle, thereby preventing costly errors and rework.</p><blockquote><strong>Communication as a Problem-Solving Tool:</strong></blockquote><p>Software engineering is inherently problem-solving-oriented. Effective communication is vital in tackling complex issues and brainstorming innovative solutions. Teams must be able to articulate their ideas, discuss trade-offs, and explore different approaches. By encouraging diverse perspectives and maintaining open lines of communication, engineers can overcome challenges more efficiently and arrive at robust solutions.</p><blockquote><strong>Communication in Conflict Resolution:</strong></blockquote><p>In the fast-paced and rapidly evolving world of software engineering, conflicts can arise from various sources. Technical disagreements, competing deadlines, resource limitations, and changing project requirements are just a few examples of the factors that can give rise to conflicts. Without open and effective communication, these conflicts can escalate, leading to decreased productivity, strained relationships, and compromised project outcomes. Therefore, software engineers must recognize that addressing conflicts promptly and constructively is crucial for maintaining a healthy work environment and achieving project success. By prioritizing communication as a means to resolve conflicts, teams can foster collaboration, promote understanding, and ultimately create an atmosphere conducive to innovation and growth.</p><blockquote><strong>Conclusion:</strong></blockquote><p>Software engineering is undoubtedly a technical discipline, but its success relies heavily on effective communication. From collaborating with teammates to conveying complex concepts and aligning with stakeholders, communication is the key to driving successful software projects. By recognizing the importance of communication, software engineers can foster stronger collaborations, avoid misunderstandings, and deliver high-quality solutions that meet the needs of clients and end-users. Embracing communication as a core skill empowers software engineers to thrive in an increasingly interconnected and collaborative world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6abad7880fae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shared Understanding, Shared Success: Importance of BDD in Software Development]]></title>
            <link>https://medium.com/@arsalan.valoojerdi/shared-understanding-shared-success-importance-of-bdd-in-software-development-357aeb92d794?source=rss-1c6eb11dc34------2</link>
            <guid isPermaLink="false">https://medium.com/p/357aeb92d794</guid>
            <category><![CDATA[discovery]]></category>
            <category><![CDATA[bdd]]></category>
            <dc:creator><![CDATA[Arsalan Valoojerdi]]></dc:creator>
            <pubDate>Mon, 17 Jul 2023 05:33:54 GMT</pubDate>
            <atom:updated>2023-07-17T05:41:45.401Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Cc2eQ8QAdS8X_4zoTlnIBg.jpeg" /></figure><p>In the ever-evolving world of software development, one of the most crucial challenges is to create a product that truly matters to the customer. Often, development teams find themselves in a conundrum: they either build a product with perfect technical prowess that fails to meet the user’s requirements, or they create a product that satisfies the customer’s needs but lacks solid technical foundations. This is where Behavior-Driven Development (BDD) comes to the rescue, enabling teams to “<strong>Build the right product, right.</strong>”</p><blockquote><strong>Traditional problem in software development:</strong></blockquote><p>Traditionally, the discovery phase of software development has been a complex endeavor. It involves aligning the expectations of different stakeholders, including software engineers, product owners, product designers, and more. Each member brings their unique perspective and expertise to the table, but without a shared understanding, mis-communication and misunderstandings can hinder progress. These miscommunications and misunderstandings can hinder progress, leading to rework, delays, and even project failures. The lack of a shared understanding can result in wasted efforts, as team members may spend time and resources working on features or functionalities that are not aligned with the product’s overall goals.</p><blockquote><strong>Role of BDD in establishing a shared understanding:</strong></blockquote><p>BDD plays a pivotal role in establishing a shared understanding among diverse team members. By promoting effective collaboration and communication, BDD ensures that everyone involved is on the same page regarding the product’s goals, features, functionality, and the reasons behind building specific features. This shared understanding forms the bedrock for successful software development, as it aligns the team’s efforts towards a common objective.</p><blockquote><strong>Importance of examples in BDD:</strong></blockquote><p>The essence of BDD lies in its emphasis on examples. Using a structured language called Gherkin, BDD enables teams to express requirements in the form of scenarios. These scenarios describe the expected behavior of the software from the user’s perspective, allowing all stakeholders to visualize and comprehend the desired outcomes. Gherkin scenarios act as a common language that bridges the gap between technical and non-technical team members, fostering effective communication and reducing the chances of ambiguity or misinterpretation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*lApM3qFUFCZF3E-sVhtIiQ.png" /><figcaption>Using examples for Select Hotel feature</figcaption></figure><p>By employing BDD, development teams can leverage these examples to create a shared understanding of the project’s requirements. Each stakeholder can contribute their perspectives and insights, bringing their domain knowledge to the forefront. This collaborative approach helps uncover nuances, edge cases, and potential pitfalls that might have been overlooked otherwise. With a shared understanding in place, the team can effectively align their efforts, make informed decisions, and prioritize features that truly matter to the customer.</p><p>Furthermore, BDD promotes a shift in mindset from merely writing code to designing features and tests that reflect the user’s needs. Rather than focusing solely on technical aspects, BDD encourages teams to consider the software’s behavior and its impact on the end user. This user-centric approach helps prioritize user satisfaction, resulting in a product that not only meets technical standards but also delights the customer.</p><blockquote><strong>BDD and Automation Testing:</strong></blockquote><p>In addition to facilitating shared understanding, BDD also offers several practical benefits. The use of Gherkin scenarios as executable specifications enables automated testing, ensuring that the software behaves as intended. This helps detect issues early in the development process, reducing the overall cost of defects and enhancing the quality of the final product.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*eFP6eFtrMRXdsgyih6BifA.png" /><figcaption>Automating examples using Screen-Play pattern</figcaption></figure><p>In conclusion, in an industry where building the right product for the customer is paramount, BDD emerges as a powerful ally for software development teams. By facilitating shared understanding through examples and promoting effective collaboration, BDD ensures that all stakeholders are aligned towards a common goal. This approach leads to the creation of software that not only meets technical requirements but also fulfills the needs and desires of the end user. Embracing BDD empowers teams to unlock shared success and deliver software solutions that truly matter.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=357aeb92d794" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing for Success: Why Strategic Design Matters — Part 2]]></title>
            <link>https://medium.com/@arsalan.valoojerdi/designing-for-success-why-strategic-design-matters-part-2-6538aca9d878?source=rss-1c6eb11dc34------2</link>
            <guid isPermaLink="false">https://medium.com/p/6538aca9d878</guid>
            <category><![CDATA[strategic-design]]></category>
            <category><![CDATA[domain-driven-design]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Arsalan Valoojerdi]]></dc:creator>
            <pubDate>Sat, 08 Jul 2023 13:18:27 GMT</pubDate>
            <atom:updated>2023-07-08T13:22:32.151Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Designing for Success: Why Strategic Design Matters — Part 2</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*HTs00jVmKa6EwG_VkHbc4g.png" /></figure><p>In the previous article, we delved into the fundamentals of Strategic Design in Domain Driven Design (DDD). In this continuation, we will explore key aspects of Strategic Design, including the decomposition of complex domains into subdomains, the importance of establishing a shared language between domain experts and software engineers, and the value of identifying context maps within our system. By grasping the essence of these strategic design concepts, we can align software development with business objectives and ensure the creation of the right software, right from the start.</p><blockquote><strong>Decomposing Complex Domains into Subdomains:</strong></blockquote><p>When dealing with a complex domain, it is crucial to break it down into manageable parts known as subdomains. This decomposition serves a twofold purpose: it not only allows us to focus on specific areas of expertise but also significantly reduces cognitive load. Complex problems can overwhelm our cognitive capabilities, making it challenging to comprehend and address the entire domain at once. However, by breaking it down into smaller, well-defined subdomains, we effectively lighten the cognitive load on both domain experts and software engineers. Each subdomain can be examined, understood, and addressed independently, fostering a clearer understanding of the domain as a whole.</p><blockquote><strong>The importance of categorizing subdomains:</strong></blockquote><p>While decomposing a domain, it is helpful to categorize subdomains into three distinct categories: <strong>Core</strong>, <strong>Supporting</strong>, and <strong>Generic</strong>.</p><p>· <strong>Core subdomain:</strong> Represent the heart of the business, holding the most critical and differentiating functionalities.</p><p>· <strong>Supporting subdomain:</strong> Provide auxiliary services and functionality that enhance the Core subdomain.</p><p>· <strong>Generic subdomain: </strong>Encompass universal functionalities that are commonly found across various domains.</p><blockquote><strong>Categorizing subdomains have several advantages:</strong></blockquote><p>· <strong>Strategic advantage: </strong>By emphasizing the core subdomain, we can prioritize the development of features that differentiate your application from competitors, providing a strategic advantage in the market.</p><p>· <strong>Resource allocation:</strong> By categorizing subdomains, we can strategically assign expert developers to the core subdomain, which holds the highest value for our business. The core subdomain typically encapsulates the most critical and differentiating functionalities of the system. By dedicating our most experienced and knowledgeable developers to this area, we ensure that the core functionalities are designed and implemented with utmost precision and efficiency. Expert developers possess the domain-specific expertise and technical acumen necessary to tackle the complexities associated with the core subdomain, resulting in a higher probability of success and a greater impact on the overall system.</p><p>· <strong>Possibility of using existing solutions: </strong>Categorizing subdomains as generic enables us to leverage existing solutions and frameworks that cater to universal functionalities found across various domains. This allows us to benefit from pre-existing implementations, established best practices, and well-tested components. By adopting existing solutions, we can save time and effort, allowing our development teams to allocate more resources to the core subdomain, where complex engineering solutions may be required.</p><blockquote><strong>Building a Shared Language:</strong></blockquote><p>One of the challenges in software development projects lies in effective communication between domain experts and software engineers. Often, these two groups speak different languages, leading to misunderstandings and a mismatch between requirements and implementation. To address this, Strategic Design emphasizes the creation of a shared language known as the Ubiquitous Language. This language bridges the gap between domain experts and engineers, enabling a common understanding of the domain concepts and facilitating smooth collaboration.</p><p>Let’s explore the challenge of language disparity between software engineers and business stakeholders in more detail. When working on a healthcare system development project, it is common for software engineers to utilize technical jargon, while domain experts, such as doctors and administrators, communicate using business terms. This language gap can lead to misinterpretations and hinder effective collaboration.</p><p>For example, software engineers might refer to a particular functionality as a “data model,” whereas domain experts might describe it as a “patient record.” Without establishing a shared language, confusion and misalignment may arise, jeopardizing the accurate implementation of the healthcare system. To address this issue, the concept of Ubiquitous Language comes into play. Ubiquitous Language emphasizes the creation of a shared vocabulary that bridges the gap between software engineers and domain experts. It encourages both parties to collaborate and agree on precise definitions for key terms, enabling clear and unambiguous communication. By establishing a shared language, software engineers gain a deeper understanding of the healthcare domain and its specific terminology. This comprehension empowers them to translate complex technical concepts into meaningful and relevant business terms. Simultaneously, domain experts become familiar with essential technical terminology, enhancing their ability to effectively communicate their requirements and expectations to the software engineers. Through the adoption of a shared language, the software development process becomes more streamlined and efficient. Misunderstandings are minimized, and the chances of developing software that accurately aligns with the domain’s intent significantly increase. The shared language fosters effective communication, ensuring that software engineers and domain experts are on the same page throughout the development journey.</p><blockquote><strong>The Importance of Context Maps:</strong></blockquote><p>Within a complex system, interactions between subdomains and bounded contexts can become intricate. This is where context maps come into play. A context map is a visual representation of the relationships and boundaries between different parts of the system. By identifying these relationships, we gain insight into the system’s overall structure and can anticipate potential integration challenges or conflicts.</p><p>Context maps are essential for maintaining the integrity of the system and enabling efficient collaboration between teams working on different subdomains. They provide a high-level overview of the system’s boundaries and help define clear communication channels and integration points, reducing ambiguity and fostering a cohesive and well-orchestrated architecture. Context map can be useful in different areas include:</p><p>· <strong>Planning: </strong>By examining the context map, product owners and stakeholders gain insights into the dependencies and relationships between teams. This knowledge allows them to identify potential bottlenecks, risks, and areas of potential failure. For example, if Team A is responsible for a core subdomain, and Team B, an external vendor, is responsible for a supporting subdomain that relies heavily on Team A’s outputs, any delay or miscommunication between these teams can jeopardize the overall product timeline and success.</p><p>· <strong>Risk management: </strong>The context map acts as a risk mitigation tool by highlighting such dependencies and potential points of failure. It enables product owners to proactively address risks by fostering effective communication channels, establishing clear expectations, and ensuring collaboration between teams. By identifying and addressing these risks early on, the product team can take appropriate measures to prevent potential delays, misunderstandings, and overall product failure.</p><p>· <strong>Resource allocation: </strong>It provides a clear overview of the interdependencies between teams, enabling product owners and technical leads to allocate resources effectively and prioritize tasks based on critical dependencies. For instance, if a core subdomain requires significant development effort and multiple supporting subdomains are reliant on it, the product team can allocate more resources and prioritize development efforts accordingly, ensuring that critical areas receive the necessary attention and reducing the risk of product delays or failures.</p><blockquote><strong>Conclusion:</strong></blockquote><p>Strategic Design in DDD encompasses various vital elements that contribute to the success of software development projects. By decomposing complex domains into subdomains, categorizing them appropriately, establishing a shared language, and identifying context maps, we create a solid foundation for effective collaboration, clear communication, and the development of robust and maintainable software systems. Embracing these strategic design principles can greatly enhance our chances of achieving success in DDD projects, enabling us to build software that aligns seamlessly with the domain’s objectives and requirements.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6538aca9d878" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing for Success: Why Strategic Design Matters in DDD — Part 1]]></title>
            <link>https://medium.com/@arsalan.valoojerdi/designing-for-success-why-strategic-design-matters-in-ddd-part-1-bd8aa8d3de16?source=rss-1c6eb11dc34------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd8aa8d3de16</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[strategic-design]]></category>
            <category><![CDATA[tactical-design]]></category>
            <category><![CDATA[domain-driven-design]]></category>
            <dc:creator><![CDATA[Arsalan Valoojerdi]]></dc:creator>
            <pubDate>Sat, 01 Jul 2023 11:16:05 GMT</pubDate>
            <atom:updated>2023-07-01T11:30:26.025Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Designing for Success: Why Strategic Design Matters — Part 1</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*HTs00jVmKa6EwG_VkHbc4g.png" /></figure><p>When it comes to Domain-Driven Design (DDD), successful outcomes are determined by the delicate interplay between strategic design and tactical design. However, there is a prevailing tendency among engineers to prioritize the tactical aspects, often neglecting the strategic considerations that lay the groundwork for an effective solution. In this article, we delve into the world of strategic design in DDD, emphasizing its crucial role in managing complexity and aligning software development efforts with business goals. By understanding the importance of strategic design and the potential pitfalls of overlooking it, we can elevate our DDD practices and pave the way for successful software development.</p><h3><strong>The Two Faces of Design:</strong></h3><p>To comprehend the significance of strategic design in DDD, we must first grasp its relationship with tactical design. Strategic design is concerned with the problem space, tackling the complexities inherent to the domain and shaping the direction of the solution. Tactical design, on the other hand, focuses on the solution space, transforming strategic decisions into concrete technical implementation choices. While both are vital, it is essential to acknowledge the primacy of strategic design and its influence on the effectiveness of tactical decision.</p><h3>The Power of Strategic Design:</h3><p>Strategic design serves as the compass that guides software development efforts within the DDD approach. By understanding the domain, identifying core business goals, and defining a clear direction, strategic design ensures that the system is purpose-built and aligned with organizational objectives. It allows developers to make informed decisions about what to build, what to prioritize, and what trade-offs to consider, reducing complexity and ensuring a robust, fit-for-purpose solution. One critical aspect of strategic design is the effective communication and collaboration between domain experts and development teams. The process of identifying core business goals and understanding the domain cannot be achieved in isolation. It requires active engagement with stakeholders who possess deep knowledge of the domain, including subject matter experts, product owners, and business analysts. Through open and frequent communication, experts can articulate the business objectives, the problems to be solved, and the value that the software solution should deliver. This dialogue helps developers gain valuable insights into the nuances of the domain, the needs of end-users, and the broader market context. When domain experts and developers work together, they can uncover hidden requirements, challenge assumptions, and explore innovative solutions. This collaboration brings a holistic perspective to the strategic design process, ensuring that the software solution addresses the actual business needs rather than superficially meeting technical requirements.</p><h3>The Pitfall of Neglecting Strategic Design:</h3><p>Despite its importance, strategic design often takes a backseat in favor of tactical considerations. Engineers, driven by their technical expertise and the desire to start coding, may be tempted to dive headfirst into the technical aspects of a project, focusing on the immediate challenges and intricacies of the solution space. In doing so, they may inadvertently disregard the broader context and fail to align their efforts with the problem space.</p><p>Neglecting strategic design can have severe consequences for a software project. When developers bypass the strategic phase, they risk building solutions that are misaligned with the true business needs and objectives. Without a clear understanding of the domain, its complexities, and the core business goals, the resulting software may fail to address the underlying problems effectively. This can lead to wasted time, resources, and potential setbacks for the project as a whole.</p><h3><strong>Striking the Balance:</strong></h3><p>To achieve success in DDD, it is vital to strike a balance between strategic and tactical design. Engineers must recognize that strategic design forms the foundation upon which tactical decisions are built. By allocating sufficient time and resources to strategic design activities, such as building a common language, identifying domain boundaries, and collaborating with domain experts, teams can gain a comprehensive understanding of the problem space and make well-informed tactical decisions that align with the broader business context.</p><h3>Shifting the Mindset:</h3><p>Encouraging a shift in mindset is essential to cultivating a culture that values strategic design in DDD. This involves raising awareness about the importance of strategic design, providing education and training opportunities, and fostering open communication channels between domain experts and development teams. By empowering engineers to see beyond the immediate technical challenges and consider the larger picture, organizations can unlock the true potential of DDD and set the stage for successful software development.</p><h3><strong>Conclusion:</strong></h3><p>Strategic design is the bedrock of effective Domain-Driven Design. Its role in managing complexity, aligning software development efforts with business goals, and guiding tactical decisions cannot be understated. By acknowledging the tendency to focus more on tactical design and emphasizing the significance of strategic design, we can embark on a transformative journey that elevates our DDD practices and leads to software solutions that truly deliver success. Let us embrace strategic design as the compass that navigates our path to excellence in DDD.</p><h3>Part 2:</h3><p>In Part 2 of our series, we’re going to explore all the components that make up strategic design and why they’re super important. It’s going to be an eye-opening journey that will reveal how strategic design plays a crucial role in shaping successful DDD projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd8aa8d3de16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cross Aggregate Validations: Exploring Set-Based Validation Techniques in Event Sourcing]]></title>
            <link>https://medium.com/@arsalan.valoojerdi/cross-aggregate-validations-exploring-set-based-validation-techniques-in-event-sourcing-e28d9e0ffce6?source=rss-1c6eb11dc34------2</link>
            <guid isPermaLink="false">https://medium.com/p/e28d9e0ffce6</guid>
            <category><![CDATA[event-driven-architecture]]></category>
            <category><![CDATA[cqrs]]></category>
            <category><![CDATA[event-sourcing]]></category>
            <dc:creator><![CDATA[Arsalan Valoojerdi]]></dc:creator>
            <pubDate>Sat, 24 Jun 2023 10:11:30 GMT</pubDate>
            <atom:updated>2023-06-24T10:36:12.756Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*uT-vaRWmOV-WOIcyWXhX4A.jpeg" /></figure><p>In event sourcing projects, set-based validation plays a crucial role in ensuring data consistency and enforcing business rules. Cross-aggregate validation, which involves validating business rules across multiple aggregates, can be particularly challenging. We will explore different approaches for handling cross-aggregate validation, evaluating their pros and cons, to effectively ensure uniqueness in this scenario.</p><p><strong>The Challenge: Enforcing Unique Instagram Page IDs in an Advertising Platform:</strong></p><p>In our case study, we encounter the challenge of validating unique Instagram page IDs in an advertising platform. The goal is to ensure that each Instagram page added to the platform has a unique InstagramPageID. We will explore various techniques to tackle this validation requirement.</p><p><strong>1- Loading All Event Streams:</strong></p><p>The basic approach for set-based validation is to load all event streams pertaining to a specific aggregate. In the case of Instagram pages, this would involve loading the millions of event streams and applying all the events to reconstitute the Instagram page objects for validation.</p><p><strong>Pros:</strong></p><p>· <strong>Simplicity:</strong> Loading all event streams is a straightforward solution to implement, especially for simpler or academic projects.</p><p>· <strong>Ease of Implementation:</strong> Since it involves loading and applying events in sequence, it aligns well with the fundamental principles of event sourcing.</p><p><strong>Cons:</strong></p><p>· <strong>Low Performance:</strong> Loading and processing millions of event streams can introduce significant performance bottlenecks, especially as the size of the event streams grows over time.</p><p>· <strong>Scalability Challenges:</strong> As the number of event streams increases, the approach becomes less scalable, potentially impacting the responsiveness of the system.</p><p>· <strong>Resource Intensive:</strong> Loading all event streams can consume substantial memory and processing resources, further impacting system performance.</p><p><strong>2- Uniqueness Validation using In-Memory Read Models:</strong> To validate the uniqueness of attributes like Instagram page IDs, an in-memory read model can be created. This read model stores the necessary information and allows quick access for validation during write operations. When adding a new Instagram page, the read model is consulted to check whether the desired page ID is already in use.</p><p><strong>Pros:</strong></p><p>· <strong>Ease of Implementation:</strong> Utilizing an in-memory read model for uniqueness validation is relatively straightforward to implement. It provides a simple and efficient solution to enforce uniqueness constraints.</p><p><strong>Cons:</strong></p><p>· <strong>Eventual Consistency:</strong> Read models in event sourcing systems are eventually consistent, meaning they may not reflect the latest state immediately. As a result, there is a possibility of temporarily incorrect validation results until eventual consistency is achieved.</p><p>· <strong>Time-Dependent Validations:</strong> Uniqueness validations based on read models are subject to race conditions, particularly when concurrent write operations occur. Depending on the implementation, conflicts may arise if multiple write operations attempt to add Instagram pages with the same ID simultaneously.</p><p><strong>3- Index Tables:</strong> To validate uniqueness, we can create an index table in a relational database, specifically designed to store Instagram page IDs as primary keys. Before adding events to the event stream, a new record is inserted into this table. If no <strong>DuplicatePrimaryKey</strong> error occurs, it confirms that the page ID is unique and can proceed with event creation.</p><p><strong>Cons:</strong></p><p>· <strong>Relational Database Scaling Problem:</strong> As the number of Instagram pages grows, the scalability of a relational database may become a limiting factor.</p><p>· <strong>Increased Infrastructure Maintenance Cost:</strong> Utilizing a relational database for uniqueness validation introduces an additional component that requires maintenance and management, potentially leading to increased infrastructure costs.</p><p><strong>4- Delayed Uniqueness Validation:</strong> Rather than performing immediate uniqueness checks, we allow customers to add potentially duplicate Instagram pages to our write side. Subsequently, these duplications can be identified and handled on the read side, either through manual interventions or automated processes.</p><p>· <strong>Manual Handling for Occasional Problems:</strong> In some cases, not all problems require immediate software solutions. For example, when duplications occur infrequently, it may be more cost-effective and efficient to handle them manually. This can involve contacting the customer directly to remove the duplicate page or sending notifications to inform them about the duplication and request resolution.</p><p>· <strong>Weighing Software Costs:</strong> Implementing software solutions for every possible problem can come with associated costs. In scenarios where duplications or similar issues are rare or occur only a few times, the cost of developing and maintaining a software solution may outweigh the benefits. In such cases, employing manual handling methods can be a more practical choice.</p><p><strong>Conclusion:</strong></p><p>In this exploration of set-based validation techniques in event sourcing, we have examined different approaches for handling cross-aggregate validation, with a focus on ensuring uniqueness in an advertising platform’s Instagram page IDs. Each technique offers its own set of advantages and disadvantages, providing valuable insights into the complexities of set-based validation. Choosing the most appropriate set-based validation technique depends on the specific requirements and constraints of the event sourcing project. It is essential to carefully evaluate the pros and cons of each approach and consider factors such as performance, scalability, consistency, and maintenance costs. By understanding the challenges and trade-offs associated with cross-aggregate validation in event sourcing, developers and architects can make informed decisions to ensure data consistency and enforce business rules effectively. Continued research and exploration in this area will further refine and enhance set-based validation techniques, contributing to the success of event sourcing projects in various domains.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e28d9e0ffce6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Idempotency in CQRS/ES Projections: Strategies and Implementation Techniques]]></title>
            <link>https://medium.com/@arsalan.valoojerdi/idempotency-in-cqrs-es-projections-strategies-and-implementation-techniques-e21a7cd06575?source=rss-1c6eb11dc34------2</link>
            <guid isPermaLink="false">https://medium.com/p/e21a7cd06575</guid>
            <category><![CDATA[event-sourcing]]></category>
            <category><![CDATA[idempotency]]></category>
            <category><![CDATA[event-driven-architecture]]></category>
            <category><![CDATA[cqrs]]></category>
            <dc:creator><![CDATA[Arsalan Valoojerdi]]></dc:creator>
            <pubDate>Sat, 17 Jun 2023 13:35:23 GMT</pubDate>
            <atom:updated>2023-06-20T06:20:39.438Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*-c_GOxIIzcQuO3bItrRoZQ.jpeg" /></figure><p>In CQRS/ES projects, projections play a vital role in providing efficient read models and query capabilities. Projections are denormalized views of the event stream that capture the state of the system at a given point in time. However, ensuring the accuracy and consistency of projections can be challenging, especially when dealing with idempotency. This article aims to explore the concept of idempotency in the context of projections in CQRS/ES projects. We will delve into the significance of idempotency, discuss common challenges in maintaining idempotency, and present strategies and best practices for handling idempotency in projections.</p><p><strong>What is Idempotency?</strong></p><p>Idempotency refers to a property or characteristic of an operation or function where multiple identical requests or invocations have the same effect as a single request. In other words, if an idempotent operation is performed multiple times, the result remains the same as if it were performed only once. In the context of software development and systems design, idempotency is an important concept to ensure the consistency and reliability of operations, especially in distributed and fault-tolerant systems. It helps prevent unintended side effects or duplicate actions caused by retries, network issues, or other system failures. An idempotent operation can be retried or repeated without causing any change in the system beyond the initial invocation. For example, if an HTTP PUT request is idempotent, sending the same request multiple times will result in the same state as sending it once. Similarly, applying an idempotent event in an event-sourced system will not alter the system’s state if the event has already been applied.</p><p><strong>Role of Idempotency in CQRS / ES Projections:</strong></p><p>Handling idempotency in CQRS/ES projections is essential for maintaining the accuracy, consistency, and reliability of the read models and query capabilities. Here are some key reasons why idempotency should be addressed in CQRS/ES projections:</p><p>· <strong>Consistent and Predictable Results:</strong> Idempotency ensures that performing the same operation multiple times produces the same outcome. In the context of projections, this means that repeated projection updates won’t introduce inconsistencies or undesired changes to the read models. It provides a consistent and predictable view of the system’s state.</p><p>· <strong>Error and Failure Resilience:</strong> In distributed systems, network issues, failures, or retry mechanisms can lead to duplicated commands or events being processed. By handling idempotency, projections can detect and discard duplicate commands or events, preventing redundant or conflicting updates to the read models. This resilience helps maintain data integrity and avoids unnecessary computation or processing.</p><p><strong>How to Handle Idempotency in Projections:</strong></p><p><strong>1- Semantic Idempotency: </strong>In order to ensure idempotency in projections, a powerful approach is to leverage event data to prevent duplicate updates. This strategy, allows us to make informed decisions based on the event information. Let’s consider an example using a <strong>“CampaignStarted”</strong> event and its corresponding event handler</p><pre>   public class CampaignEventHandlers : IEventHandler&lt;CampaignStarted&gt;<br>    {<br>        public void Handle(CampaignStarted @event)<br>        {<br>            if (CampaignAlreadyStarted(@event.CampaignId))<br>                return;<br><br>            var campaign = MapToCampaign(@event);<br>            _db.Campaigns.Add(campaign);<br>        }<br>    }</pre><p>Semantic idempotency enables us to determine whether a campaign has already been stored in our read model by examining the campaign ID provided in the event. The event data acts as a reliable source of truth, guiding the decision-making process and ensuring that only relevant changes are applied. It’s worth noting that the implementation of semantic idempotency may vary depending on the specific needs of your CQRS/ES project. However, the key principle remains the same: utilizing event data to determine whether an operation should be performed, thus preventing unnecessary updates.</p><p><strong>2- De-Duplicating using message identifier: </strong>Handling idempotency in projections can also be accomplished by utilizing a message’s unique identifier. One approach involves checking if an event has already been processed by performing a lookup in a <strong>“ProcessedEvents”</strong> table. By implementing this strategy, we can effectively prevent duplicate event handling. A decorator pattern can be utilized to apply this approach across multiple event handlers.</p><pre>    public class IdempotentEventHandlerDecorator&lt;T&gt; : IEventHandler&lt;T&gt;<br>    {<br>        private readonly IEventHandler&lt;T&gt; _decoratedEventHandler;<br><br>        public IdempotentEventHandlerDecorator(IEventHandler&lt;T&gt; decoratedEventHandler)<br>        {<br>            _decoratedEventHandler = decoratedEventHandler;<br>        }<br><br>        public void Handle(T @event)<br>        {<br>            if (EventAlreadyProcessed(@event.Id))<br>                return;<br><br>            _decoratedEventHandler.Handle(@event);<br><br>            _db.ProcessedEvents.Add(@event);<br>        }<br>    }</pre><p>In the above implementation, the <strong>“IdempotentEventHandlerDecorator”</strong> acts as a wrapper around the actual event handler. Here’s how it works:</p><p><strong>Checking Event Existence:</strong> Before invoking the decorated event handler, the decorator verifies if the event has already been processed. This is achieved by checking the unique identifier of the event against the <strong>“ProcessedEvents”</strong> table or a similar mechanism.</p><p><strong>Event Handling:</strong> If the event has not been processed, the decorated event handler is invoked to process the event and perform the necessary operations, such as updating the read model or performing additional business logic.</p><p><strong>Storing Processed Event:</strong> After successful event processing, the event’s information is stored in the <strong>“ProcessedEvents”</strong> table. This ensures that subsequent duplicate events will be identified and ignored during future processing. It is essential to emphasize that both the event processing and the storage of the processed event should be executed within a single transaction. This guarantees consistency and avoids data inconsistencies. By employing the de-duplication strategy using message identifiers, you can effectively handle idempotency in projections. This approach provides a reliable mechanism to prevent redundant event processing and maintain the integrity and consistency of the read models.</p><p><strong>Handling Idempotency in Databases without Multi-Document Transaction Support:</strong></p><p>In situations where the database used for read models does not support multi-document transactions, an alternative approach is required to handle idempotency. One solution is to store the processed event IDs directly within the read models and check for their presence before processing an event. Let’s explore an example using the <strong>“CampaignBudgetIncreased”</strong> event and its corresponding event handler.</p><pre>public class CampaignEventHandlers : IEventHandler&lt;CampaignBudgetIncreased&gt;<br>{<br>    public void Handle(CampaignBudgetIncreased @event)<br>    {<br>        var campaign = GetCampaignById(@event.CampaignId);<br><br>        if (campaign.ProcessedEventIds.Contains(@event.Id))<br>            return;<br><br>        campaign.IncreaseBudget(...);<br><br>        campaign.ProcessedEventIds.Add(@event.Id);<br>    }<br>}</pre><p>By storing the processed event IDs directly within the read models, this approach enables efficient idempotency checking without relying on multi-document transactions. Each read model maintains its own list of processed event IDs, ensuring that duplicate events are properly detected and avoided during subsequent processing. It’s crucial to ensure that the collection is persisted alongside the campaign read model to maintain the idempotency state across system restarts or database operations.</p><p><strong>Conclusion:</strong></p><p>Idempotency plays a critical role in handling projections within CQRS/ES projects, serving as a foundation for maintaining consistent and reliable read models. By recognizing the challenges and complexities involved in achieving idempotency, developers can employ effective strategies and best practices to overcome these obstacles and build robust and scalable projection systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e21a7cd06575" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Chaos to Clarity: Discovering Domain Boundaries using Event Storming]]></title>
            <link>https://medium.com/@arsalan.valoojerdi/from-chaos-to-clarity-discovering-domain-boundaries-using-event-storming-5695c23a630d?source=rss-1c6eb11dc34------2</link>
            <guid isPermaLink="false">https://medium.com/p/5695c23a630d</guid>
            <category><![CDATA[eventstorming]]></category>
            <category><![CDATA[domain-driven-design]]></category>
            <category><![CDATA[discovery-phase]]></category>
            <dc:creator><![CDATA[Arsalan Valoojerdi]]></dc:creator>
            <pubDate>Sun, 11 Jun 2023 07:58:47 GMT</pubDate>
            <atom:updated>2023-06-11T07:58:47.217Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o-emq1RrIBnP1udmIizEgw.jpeg" /></figure><p>In the world of software development, having a solid understanding of domain boundaries is essential for building resilient applications. However, the process of defining these boundaries frequently presents itself as a complex and challenging task. Considering the fact that domain knowledge is distributed among various domain experts, it becomes essential to adopt an approach that facilitates the consolidation of this knowledge. This is where Event Storming comes into play — a powerful technique that helps teams navigate the complexities of requirements and effectively identify distinct domain boundaries. In this article, we will explore how Event Storming can be leveraged to uncover potential domain boundaries.</p><p>Let’s explain various indicators that can help in identifying potential candidate domain boundaries:</p><p>· <strong>Expertise Segmentation:</strong> One significant sign of a potential domain boundary is the presence of distinct groups of domain experts who possess specialized knowledge and expertise in specific areas. When different domain experts have different perspectives and focus areas within a larger system, it suggests the possibility of defining separate domains.</p><p>· <strong>Pivotal Events:</strong> Identifying pivotal events within a domain can be instrumental in recognizing potential domain boundaries. Pivotal events are significant occurrences or milestones that have a significant impact on the system. These events often act as triggers for various processes, actions, or decisions, and they can help demarcate different domains based on their specific responsibilities and interactions.</p><p>o <strong>Example:</strong> Let’s take the context of recruitment as an example. Within this domain, we can identify three key events: <strong>“JobSeekerApplied”</strong>, <strong>“JobSeekerAccepted”</strong> and <strong>“OnBoardingProcessStarted”</strong>.</p><p>In the recruitment process, a job seeker initiates their application by submitting the necessary information and documents, which triggers the <strong>“JobSeekerApplied”</strong> event. Once the application is reviewed and assessed by the hiring team, they make a decision on whether to accept or reject the applicant. When the decision is positive, the <strong>“JobSeekerAccepted”</strong> event occurs, indicating that the job seeker has been accepted for the position.</p><p>Following the acceptance of the job seeker, the next significant event is the <strong>“OnBoardingProcessStarted”</strong>. This event represents the commencement of the onboarding process, which involves integrating the new employee into the organization and providing them with the necessary resources and information to begin their role. Therefore, in this particular example, the occurrence of the <strong>“JobSeekerAccepted”</strong> event triggers the subsequent event of <strong>“OnBoardingProcessStarted”</strong> indicating that the onboarding process will be initiated after the job seeker has been accepted for the position. Therefore, the event <strong>“JobSeekerAccepted”</strong> holds significant importance in this scenario and serves as a pivotal event.</p><p><strong>To identify pivotal events, consider the following questions:</strong></p><p><strong>·</strong> Are there any events that cannot occur without the prior occurrence of another event?</p><p><strong>·</strong> Are there any processes that depend on the occurrence of specific events?</p><p>· <strong>Collaboration Trigger: </strong>During an event storming workshop, it is not uncommon to observe a situation where a domain expert is waiting for another person to introduce an event onto the shared board before actively participating in the collaborative session. This behavior can indicate that these individuals have different domain boundaries, and the first person is specifically waiting for a pivotal event to occur. Once this pivotal event takes place, they can then engage and collaborate effectively. By observing such behavior, it becomes apparent that distinct domain boundaries exist.</p><p>· <strong>Semantic Variations: </strong>In complex domains, it is common for a single term or word to possess multiple interpretations or meanings depending on the context. This phenomenon arises when stakeholders or domain experts use the same word but attribute different significances to it. Such variations in meaning often indicate the presence of distinct domain boundaries, emphasizing the need to establish a shared understanding. When different individuals within a domain use the same term but assign divergent meanings, it can lead to misunderstandings, miscommunications, and inefficiencies. It highlights the existence of separate perspectives and knowledge domains within the larger system.</p><p>o <strong>Example:</strong> In the context of tourism, a “tourism ticket” typically refers to a document or voucher that grants access or admission to a specific tourist attraction, event, or activity. On the other hand, in the context of issue tracker systems, a “ticket” refers to a record or item that represents a specific task, problem, or request within the system. It serves as a standardized unit of work that aids in tracking and managing issues, bugs, feature requests, or other types of tasks that require attention. This example highlights the use of the word “ticket” in two distinct contexts, indicating a clear indication of different subdomains.</p><p><strong>Conclusion:</strong></p><p>Event Storming is a game-changer when it comes to discovering domain boundaries and shaping the architecture of software systems. By embracing this collaborative and visual technique, teams can navigate the chaos, gain clarity, and establish robust domain models. With Event Storming, you can empower your team to build better software that truly aligns with the needs of the business and its stakeholders.</p><p>Remember, the journey from chaos to clarity begins with Event Storming. Embrace this powerful technique and unlock the potential of your domains.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5695c23a630d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>