<?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"><channel><title><![CDATA[Finding the Art]]></title><description><![CDATA[Software Engineer at heart. Tech Lead by craft. With 16+ years in software engineering, I solve complex problems and enable the delivery of a continuous and eff]]></description><link>https://chrisfouche.com</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 15:05:41 GMT</lastBuildDate><atom:link href="https://chrisfouche.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Journalists to Editors]]></title><description><![CDATA[When ChatGPT took AI mainstream, many of us feared it might take our jobs. In a way, it did. By giving us a promotion! In the old world, we were journalists. The ones writing articles (code). Now, we’re editors!
A useful metaphor
Think about the medi...]]></description><link>https://chrisfouche.com/journalists-to-editors</link><guid isPermaLink="true">https://chrisfouche.com/journalists-to-editors</guid><category><![CDATA[copilot]]></category><category><![CDATA[agentic AI]]></category><category><![CDATA[chatgpt]]></category><dc:creator><![CDATA[Chris Fouché]]></dc:creator><pubDate>Mon, 16 Feb 2026 17:45:36 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1771263236137/4aa08dc5-b6a6-4fdd-96e5-ca190ad7784f.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When ChatGPT took AI mainstream, many of us feared it might take our jobs. In a way, it did. By giving us a promotion! In the old world, we were journalists. The ones writing articles (code). Now, we’re editors!</p>
<h1 id="heading-a-useful-metaphor">A useful metaphor</h1>
<p>Think about the media (newspaper) industry. In particular, the dynamic between editors and journalists.</p>
<p>Editors instruct journalists. Journalists write the content or articles. Editors validate and edit their writings. The result: a publishable work.</p>
<p>Once the content has been created, editors publish it. Thereafter, they monitor the public's reaction. If need be, they clarify, correct, or follow up with another publication.</p>
<p>AI's capabilities promoted us to editors. We're not so bogged down by the grunt work of content creation anymore. We delegate most of that to our journalists. Our AI agents.</p>
<p>As editors, we instruct our journalists in natural language. We validate and edit their writings. Once we’re satisfied with the quality, we publish it (release it to prod).</p>
<p>After our release, we monitor the public's reaction. We clarify the behaviour of our solution to the business and stakeholders. We correct by fixing problems. We follow up with more deployments.</p>
<p>We do this continuously.</p>
<h1 id="heading-whats-needed-to-be-a-great-editor">What's needed to be a great editor?</h1>
<p>We need to be well-versed in the art of prompting. It’s how we instruct our journalists.</p>
<p>We must be skilled in grammar. Think programming languages, libraries, and frameworks.</p>
<p>Prose and writing style! It’s how the work feels when someone reads it. Think <a target="_blank" href="https://chrisfouche.com/clean-architecture">architecture</a>, principles, patterns, and coding standards.</p>
<p>We need a process to optimise content creation from ideation to publication. Think Agile, Kanban, and DevOps.</p>
<p>Letting go. Letting go of the plan to be a journalist for one's whole life. Of wowing people with your brilliant writing (coding) skills. Clinging to that fantasy will prevent you from unlocking your inner editor.</p>
<p>AI helped me to let go of even more. But that's a topic for another day.</p>
<p>Editors also decide what topics will not be explored. Which articles will not get published. As Steve Jobs said, deciding what not to do is just as important as deciding what to do. Think YAGNI and the Tesla principle (the best part is no part).</p>
<h1 id="heading-conclusion">Conclusion</h1>
<p>Many engineers may have seen AI as an obstacle to their plan of being career-long journalists. Marcus Aurelius, the philosopher king, reminds us that the obstacle is the way. The obstacle is the way to a promotion. AI is the way of the editor!</p>
]]></content:encoded></item><item><title><![CDATA[Clean Architecture]]></title><description><![CDATA[Architecture is the art of drawing lines. A cheeky definition. I think of architecture as how concerns are separated and the rules that govern them. The lines we draw tend to depict this perspective. Clean Architecture is my go-to for source code. He...]]></description><link>https://chrisfouche.com/clean-architecture</link><guid isPermaLink="true">https://chrisfouche.com/clean-architecture</guid><category><![CDATA[Clean Architecture]]></category><category><![CDATA[Hexagonal Architecture]]></category><category><![CDATA[architecture]]></category><category><![CDATA[clean code]]></category><dc:creator><![CDATA[Chris Fouché]]></dc:creator><pubDate>Thu, 15 May 2025 22:22:18 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1747347105531/133e11e6-f668-4c01-9b19-cb26a20fc818.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Architecture is the art of drawing lines. A cheeky definition. I think of architecture as how concerns are separated and the rules that govern them. The lines we draw tend to depict this perspective. Clean Architecture is my go-to for source code. Here, I explain the gist of it and how I've made it my own.</p>
<h2 id="heading-school-of-thought">School of Thought</h2>
<p>There may be many clean architectures (in lowercase) out there. The one I'm referring to is <a target="_blank" href="https://chatgpt.com/share/68251319-6e8c-800d-953f-d622035a0079">Uncle Bob's</a> Clean Architecture. Hence the capitals.</p>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Ivar_Jacobson">Ivar Jacobsen's</a> ideas (Object-Oriented Software Engineering: A Use Case Driven Approach) influenced it. And it resembles Alistair Cockburn's Ports &amp; Adapters (Hexagonal) Architecture.</p>
<p>Fun fact: Uncle Bob and <a target="_blank" href="https://alistaircockburn.com/">Alistair Cockburn</a> are two of the <a target="_blank" href="https://chatgpt.com/share/682514e1-b8a4-800d-87a1-d32d6d6f6bbf">Agile Manifesto's</a> seventeen authors. Legends. Let's explore their architectures.</p>
<h2 id="heading-the-gist-of-it">The gist of it</h2>
<p>Clean Architecture is about the separation of concerns. In particular, the separation of business rules from I/O concerns.</p>
<p>Business rules may not know about (depend on) I/O concerns. I/O concerns may know about the business rules.</p>
<h2 id="heading-io-concerns">I/O concerns</h2>
<p>Input/Output (I/O) concerns are how your application gets and outputs data. It's the delivery mechanism of the data.</p>
<p>API endpoints, database integrations, integration to downstream systems or services (APIs), and user interfaces are all I/O concerns. Ways data flows into and out of your application.</p>
<h2 id="heading-business-rules">Business Rules</h2>
<p>Think of business rules as what the system must do, independent of I/O (data delivery) details.</p>
<p>Business rules include the code for <strong>use cases</strong>.</p>
<p>For example, consider a use case that says: 'A user must enter their email and password to register'. Notice it doesn't include I/O details — like capturing it in a React frontend, sending it to a .NET API, or saving it in a SQL database.</p>
<p>Very demure.</p>
<h2 id="heading-whiteboard">Whiteboard</h2>
<p>Let's look at some lines.</p>
<p><img src="https://foucheblog.blob.core.windows.net/articles/clean-architecture.png" alt="Clean Architecture!" /></p>
<p>A prominent architectural boundary separates the business rules and I/O concerns. Notice how the source-code dependencies only cross the boundary in one direction: from the I/O side to the business rules.</p>
<p>How can a business-rule service call a class in an I/O layer if it's not allowed to depend on it? By inverting source code dependencies such that it points against the <a target="_blank" href="https://en.wikipedia.org/wiki/Control_flow">flow of control</a>.</p>
<p>Instead of making a business rule service call an I/O class, we make it call a business rule interface. An I/O class implements that interface. Notice how the 'DbService' class implements the 'Repository' interface.</p>
<p>At runtime, an <a target="_blank" href="https://chatgpt.com/share/6825157f-61fc-800d-adc9-415cb03321d8">Inversion of Control (IoC)</a> framework will 'plug' an instance of the I/O class into the interface, which acts as a port.</p>
<h2 id="heading-ports-amp-adapters">Ports &amp; Adapters</h2>
<p><a target="_blank" href="https://alistair.cockburn.us/hexagonal-architecture">Ports &amp; Adapters</a> (Hexagonal) Architecture works the same. It also has an interface at the point where an I/O concern calls a business-rule service.</p>
<p><img src="https://foucheblog.blob.core.windows.net/articles/hexagonal-architecture.png" alt="Ports &amp; Adapters!" /></p>
<h3 id="heading-ports">Ports</h3>
<p>There are two types of ports:</p>
<ul>
<li>Primary: the interfaces that are called from the I/O side (and implemented within the business rules).</li>
<li>Secondary: the interfaces that are called within the business rules (and implemented in the I/O side).</li>
</ul>
<h3 id="heading-adapters">Adapters</h3>
<p>Adapters are the classes in the I/O layers that implement the ports.</p>
<h3 id="heading-independence">Independence</h3>
<p>Suppose the database needs to be replaced by a downstream API. In this architecture, we let a class in the integration (to downstream APIs) layer implement the secondary port instead. No other code changes needed!</p>
<p><img src="https://foucheblog.blob.core.windows.net/articles/hexagonal-architecture-api.png" alt="Ports &amp; Adapters!" /></p>
<h2 id="heading-rules-first">Rules first</h2>
<p>The business rules are the central organising principle. It drives the design.</p>
<p>Suppose you add a feature that'll include multiple layers. I recommend you start at the business rules layer. Develop and unit test it completely, first. Thereafter, add the other layers.</p>
<p>Try not to start at the I/O layers. Especially the database one! Its internal structure (such as a SQL database's relational model) may 'peer pressure' the business rules into looking and acting like it.</p>
<h2 id="heading-the-why">The Why</h2>
<p>Clean Architecture reduces the long-term cost of software by making code easier to understand and change.</p>
<p>Here's the logic:</p>
<ul>
<li>The easier it is—for us and our <strong>AI</strong> tools—to understand code, the faster we can change and test it, with precision. </li>
<li>If we can change one concern without affecting another, it's even faster.</li>
<li>The faster and safer the changes, the cheaper the software.</li>
</ul>
<p>Clean Architecture does this with how it separates concerns.</p>
<h2 id="heading-the-next-generation">The next generation</h2>
<p>My Millennial and Gen Z peers and I built <a target="_blank" href="https://monolisa.io">MonoLISA</a> on the principles of Clean Code and Clean Architecture. MonoLISA guides how we do Clean Architecture in our backend monorepos.</p>
<p>Not only did we solve our problems. But we contributed to this school of thought, too. We understood the assignment!</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Clean Architecture. Ports &amp; Adapters. MonoLISA. It's how we enable ourselves and our AI tooling to quickly understand and change code, with precision.</p>
]]></content:encoded></item><item><title><![CDATA[Tech Lead to Thought Lead?]]></title><description><![CDATA[Introduction
What's leadership? What exactly should a Tech Lead do? I wrestled with these questions when I became a Tech Lead. This year, I wrestled with a new one: Should I consider a managerial position? Join me as I reflect on my leadership journe...]]></description><link>https://chrisfouche.com/tech-lead-to-thought-lead</link><guid isPermaLink="true">https://chrisfouche.com/tech-lead-to-thought-lead</guid><category><![CDATA[leadership]]></category><category><![CDATA[tech leadership]]></category><category><![CDATA[Thought Leadership]]></category><category><![CDATA[Vision]]></category><dc:creator><![CDATA[Chris Fouché]]></dc:creator><pubDate>Fri, 11 Oct 2024 05:38:46 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1728625030797/caf33530-74fb-40aa-9d9f-d938b2957b59.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-introduction">Introduction</h3>
<p>What's leadership? What exactly should a Tech Lead do? I wrestled with these questions when I became a Tech Lead. This year, I wrestled with a new one: Should I consider a managerial position? Join me as I reflect on my leadership journey, tackle the last question, and articulate my leadership signature.</p>
<h3 id="heading-genesis">Genesis</h3>
<p>In January 2009, at 20, I started working as a full-time engineer. I had an international diploma in software development and decided to continue my studies for another two years (part-time) towards a BSc (Hons) Business Information Technology degree, which I funded with my salary.</p>
<p>Our part-time class consisted of many fellow full-time developers. I recall one of them's desire to pivot into management. I didn't get it. At the time, I loved being a developer so much that leadership wasn’t something I considered.</p>
<h3 id="heading-becoming-a-tech-lead">Becoming a Tech Lead</h3>
<p>Fast-forward to 2020. I remember the day my colleague congratulated me on becoming a tech lead. I was surprised. 'Where did you hear that?' I then learned the head of our space made two of my fellow engineers and me tech leads.</p>
<p>I was honoured and happy. I got a tech leadership role and could stay close to the engineering. Perfect!</p>
<p>It wasn't my first leadership role, though. I formally taught wushu (kung fu) group classes (on Tuesday and Thursday evenings) from 2011 to 2018. My students were fit, strong, and skilled. They also performed well at competitions!</p>
<p>Even so, I struggled to articulate to myself what leadership is. That freaked me out! I also asked our leader what my tech-lead responsibilities are. 'You tell me!' he replied. No pressure, Chris.</p>
<h3 id="heading-defining-leadership">Defining leadership</h3>
<p>I went down a rabbit hole to find out what leadership truly is. I read many articles, watched many YouTube videos, and did a leadership crash course. But I wasn't satisfied. Something was missing.</p>
<p>My aha! moment came when I stumbled upon a <a target="_blank" href="https://www.youtube.com/watch?v=rQKis2Cfpeo&amp;t=14s">video</a> in which Steve Jobs defined leadership.</p>
<blockquote>
<p>What leadership is is having a vision; being able to articulate that so the people around you can understand it; and getting a consensus on a common vision.</p>
</blockquote>
<p>It resonated with me. I found the essence I was looking for. As a result, I made vision the central organising principle of my leadership style.</p>
<h3 id="heading-defining-a-tech-lead">Defining a Tech Lead</h3>
<p>I found the writings of <a target="_blank" href="https://www.patkua.com">Patrick Kua</a> while searching for the definition of a Tech Lead.</p>
<p>A <a target="_blank" href="https://www.thekua.com/atwork/2015/06/tech-lead-circles-of-responsibility/">perspective</a> of his that I like is that the Tech Lead role is an intersection of three others: Developer, Architect, and Leader. <a target="_blank" href="https://www.patkua.com/blog/the-definition-of-a-tech-lead/">Another</a> is that while a team leader or manager leads the general 'What', a tech lead leads the technical 'How'.</p>
<p>Right! We lead the technical ‘how’ with developer-architect prowess and contribution, while partnering closely with business and management on the ‘what’.</p>
<h3 id="heading-visioning">Visioning</h3>
<p>We get vision from business and the powers that be at the levels above us. Think of it as macro vision.</p>
<p>But here in the trenches, close to the details, there are problems only we have the context of and understand. Problems such as unnecessary requirements, bad practices, complex design, messy code, technical debt, inefficient process, etc.</p>
<p>As a Tech Lead, I've provided our engineers with the vision to solve many of these problems and to <a target="_blank" href="https://chrisfouche.com/enabling-constraints">prevent</a> them from happening again. Think of it as micro vision.</p>
<p>Each micro vision sparks a process of change. I'd suggest a micro vision to my peers, we'd build it into our shared vision, and then we'd implement that.</p>
<p>It turns out I'm a natural at micro visioning. Over the last few years, I've provided a steady stream of micro visions for 'how' we'll promote the macro vision 'what'.</p>
<h3 id="heading-the-4-caps-leadership-framework">The 4-CAPS+ Leadership Framework</h3>
<p>To up my leadership game, I <a target="_blank" href="https://mitsloan.credential.getsmarter.com/e4b5d456-aa1c-407e-a9d5-3ba9c98d592f">successfully completed</a> the executive program Leadership in an Exponentially Changing World at MIT's Sloan School of Management. It taught me their 4-CAPS+ Leadership Framework.</p>
<p>It advised that we articulate our <a target="_blank" href="https://www.youtube.com/watch?v=zAItLJcmBkY">leadership signature</a> — our unique way of leading. Let me conclude this article by doing so.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>I lead with vision and from the front. I lead by providing a steady stream of ideas or micro visions, building them into shared visions with my peers, and empowering the team with what they need to implement them. I do so 'from the front' by being strategically hands-on and involved with the engineering.</p>
]]></content:encoded></item><item><title><![CDATA[MonoLISA]]></title><description><![CDATA[Software is a compound word. 'Soft' means easy to change, and 'ware' means product—an easy-to-change product. Why, then, can it be so difficult to change?! Messy code is a big reason. Clean code is needed to make it truly easy. My peers and I discove...]]></description><link>https://chrisfouche.com/monolisa</link><guid isPermaLink="true">https://chrisfouche.com/monolisa</guid><category><![CDATA[monorepo]]></category><category><![CDATA[clean code]]></category><category><![CDATA[agile development]]></category><dc:creator><![CDATA[Chris Fouché]]></dc:creator><pubDate>Fri, 14 Jun 2024 20:28:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1718386091166/0f9ea950-f9ea-45f4-a0bf-4c78d1b638ea.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Software is a compound word. 'Soft' means easy to change, and 'ware' means product—an easy-to-change product. Why, then, can it be so difficult to change?! Messy code is a big reason. Clean code is needed to make it truly easy. My peers and I discovered it becomes even easier when clean code lives in monorepos. As a result, we developed a pattern that combines monorepo practice and Clean Code: MonoLISA.</p>
<h2 id="heading-what-is-monolisa">What is MonoLISA?</h2>
<p>MonoLISA is a mnemonic for <strong>monorepo</strong> practice with:</p>
<ul>
<li><p><strong>L</strong>ayered Libraries</p>
</li>
<li><p><strong>I</strong>nterface Segregation</p>
</li>
<li><p><strong>S</strong>ingle Responsibilities</p>
</li>
<li><p><strong>A</strong>gile Architecture</p>
</li>
</ul>
<p>MonoLISA is a pattern for crafting code repositories that are easy to understand, change, and deploy to infrastructure in various ways.</p>
<h3 id="heading-value">Value</h3>
<p>The more difficult it is to change software, the longer it takes. The longer it takes, the more expensive it'll be.</p>
<p>Our experience is that we spend more time changing the code of existing features than writing code for brand-new ones. No wonder <a target="_blank" href="https://tidyfirst.substack.com/p/constantines-equivalence">Constantine's Equivalence</a> states the cost of software is approximately equal to the cost of changing it.</p>
<p>MonoLISA lowers the cost of code changes.</p>
<h2 id="heading-monorepo-practice">Monorepo practice</h2>
<p>The 'Mono' of <strong>Mono</strong>LISA.</p>
<blockquote>
<p>A monorepo is a single git repository that holds the source code for multiple applications and libraries, along with the tooling for them.</p>
</blockquote>
<p>Let's consider the elements of this <a target="_blank" href="https://nx.dev/concepts/decisions/why-monorepos">definition</a>.</p>
<h4 id="heading-libraries">Libraries</h4>
<p>Libraries (also known as modules or components) in MonoLISA represent features. It's where the logic or 'functionality' of features are written.</p>
<p>Place libraries in a dedicated folder, such as 'libs'.</p>
<h4 id="heading-applications">Applications</h4>
<p>Applications in MonoLISA are the launch or deployment vehicles of libraries. They are shells (with little to no logic) that string (or bundle) libraries together for use. An executable is an example of an app.</p>
<p>Place apps in a dedicated folder, such as 'apps'.</p>
<p>In MonoLISA, libraries must be ignorant of apps. As a result, the libs folder may not be a subfolder of the apps folder, and vice versa. Also, libraries' source code may not depend on apps.</p>
<h4 id="heading-tooling">Tooling</h4>
<p>In MonoLISA, a specialized tool should be used to manage the monorepo. It should be clever enough only to validate (lint, unit test) and build (compile) the code that your changes affected.</p>
<h4 id="heading-monorepo-in-style">Monorepo in style</h4>
<p>Many may picture a monorepo as a 'monolithic' repository with a ton of code. In MonoLISA, it doesn't have to be. It can be a monorepo in style rather than scope.</p>
<p>For example, you could use MonoLISA for a single application. The repo's apps folder would then contain one app.</p>
<h2 id="heading-layered-libraries">Layered Libraries</h2>
<p>The 'L' of Mono<strong>L</strong>ISA.</p>
<p>MonoLISA achieves <a target="_blank" href="https://en.wikipedia.org/wiki/Separation_of_concerns">separation of concerns (SoC)</a> with:</p>
<ul>
<li><p>Layers to separate technical concerns.</p>
</li>
<li><p>Libraries to separate the concerns of actors.</p>
</li>
</ul>
<h3 id="heading-layers">Layers</h3>
<p>Define a layer for each high-level technical concern.</p>
<p>Domain (business rules), API (endpoints), database (repositories), and integration (to downstream services) are examples of backend layers.</p>
<p>Create a folder for each layer in the libs folder. For example:</p>
<pre><code class="lang-plaintext">libs
- domain
- api
- db
- integration
</code></pre>
<h3 id="heading-libraries-1">Libraries</h3>
<p>Create libraries for <a target="_blank" href="https://en.wikipedia.org/wiki/Actor_(UML)">actors</a> within the layers.</p>
<h4 id="heading-actors">Actors</h4>
<p>An actor is a role a user plays the moment they act on the system.</p>
<p>For example, if you are developing an email app, the user could be seen as an ‘inbox viewer’ actor when they view the inbox and a ‘draft editor’ when they write an email.</p>
<pre><code class="lang-plaintext">libs
- domain (layer)
  - inbox (lib)
  - draft-editor (lib)
- api (layer)
  - inbox (lib)
  - draft-editor (lib)
etc.
</code></pre>
<h2 id="heading-interface-segregation">Interface Segregation</h2>
<p>The 'I' of MonoL<strong>I</strong>SA.</p>
<p>The idea of the <a target="_blank" href="https://en.wikipedia.org/wiki/Interface_segregation_principle">Interface Segregation Principle (ISP)</a> is for your code to know as little as possible. In particular, it says a source-code construct should not depend on (use) interfaces with more members than it needs.</p>
<p>Imagine a class that only needs a client's first and last names as a source-code construct that must follow the ISP.</p>
<p>The following violates the principle, because Client has unneeded members:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> Client {
  firstName: <span class="hljs-built_in">string</span>;
  lastName: <span class="hljs-built_in">string</span>;
  age: <span class="hljs-built_in">number</span>;
  email: <span class="hljs-built_in">string</span>;
}

<span class="hljs-keyword">class</span> ClientDetailsService {
  generateFullName(client: Client) {
    <span class="hljs-keyword">return</span> <span class="hljs-string">`<span class="hljs-subst">${client.firstName}</span> <span class="hljs-subst">${client.lastName}</span>`</span>;
  }
}
</code></pre>
<p>The following honours it:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> Client {
  firstName: <span class="hljs-built_in">string</span>;
  lastName: <span class="hljs-built_in">string</span>;
}

<span class="hljs-keyword">class</span> ClientDetailsService {
  generateFullName(client: Client) {
    <span class="hljs-keyword">return</span> <span class="hljs-string">`<span class="hljs-subst">${client.firstName}</span> <span class="hljs-subst">${client.lastName}</span>`</span>;
  }
}
</code></pre>
<p>In MonoLISA, a library is the source-code construct that may not depend on interfaces with unneeded members. The interfaces used by that library must be defined within it. That means whatever depends on (uses) that library will need to map to its interfaces.</p>
<p>The libraries of at least one layer in MonoLISA must adhere to the ISP.</p>
<h2 id="heading-single-responsibilities">Single Responsibilities</h2>
<p>The 'S' of MonoLI<strong>S</strong>A.</p>
<p>In MonoLISA, each library must adhere to the <a target="_blank" href="https://en.wikipedia.org/wiki/Single-responsibility_principle">Single Responsibility Principle (SRP)</a>.</p>
<p>The SRP says a library must have a single responsibility and defines responsibility as the needs of an actor. In other words, each library may only serve a single actor.</p>
<p>The email-app example under the 'Actors' section earlier adheres to the SRP because it has libraries for the 'inbox' and 'draft editor' actors. Without the SRP, an engineer may have created an 'email' library with both responsibilities.</p>
<h2 id="heading-agile-architecture">Agile Architecture</h2>
<p>The 'A' of MonoLIS<strong>A</strong>.</p>
<p>A Waterfall process has <a target="_blank" href="https://en.wikipedia.org/wiki/Big_design_up_front">Big Design Up Front (BDUF)</a>. Teams that practice BDUF make many significant design decisions upfront. For example, they may decide to have 𝓧 microservices before they start development and fashion their repos around that decision.</p>
<p>Agile has 'small design up front'. Just enough design decisions are made to kick off development, and the others are deferred to the iterations (sprints) in which they're needed. The design evolves or <a target="_blank" href="https://ronjeffries.com/xprog/articles/emergent-design/">emerges</a> over the course of iterations.</p>
<p>MonoLISA has Agile architecture because of its synergy with Agile. The ignorace features (libraries) have of how they're deployed (apps) allows us to change our deployment model with minimal effort at any time. This allows us to start with a simple deployment model, to defer deployment decisions, and to pivot when needed.</p>
<p>For example, we could deploy our libraries as a <a target="_blank" href="https://martinfowler.com/bliki/MonolithFirst.html">monolith first</a>. After that, suppose we find it does not suffice. In that case, we can quickly pivot to microservices by adding an app for each microservice, plugging the relevant libraries into them, and launching them into infrastructure.</p>
<h2 id="heading-acknowledgements">Acknowledgements</h2>
<p>MonoLISA was developed under the technical direction of Burgert Vermeulen and me. We and our peers have battle-tested and refined it since 2021 with excellent results! For example, one monorepo that follows MonoLISA has over 100 libraries and 5000 unit tests. On a smaller scale, we also used MonoLISA on a monorepo (in style) with one app.</p>
<p><a target="_blank" href="http://www.cleancoder.com/products">Uncle Bob's</a> teachings on Clean Code had a huge influence on MonoLISA!</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Monorepo practice. Layered Libraries. Interface Segregation. Single Responsibilities. Agile Architecture. MonoLISA! It's been guiding us to high-quality, lower-cost software since 2021. And it can guide you to it, too!</p>
<p>Think of 'her' as a personification of Clean Code.</p>
]]></content:encoded></item><item><title><![CDATA[Waterfall in sprints isn't Agile]]></title><description><![CDATA[I've worked in unstructured, Waterfall, and Agile software processes since 2009. One I found ineffective is 'Waterfall in sprints', confused as Agile. When I saw a meme about it, I realised it's a common Agile anti-pattern. Here, I'll unpack what I m...]]></description><link>https://chrisfouche.com/waterfall-in-sprints-isnt-agile</link><guid isPermaLink="true">https://chrisfouche.com/waterfall-in-sprints-isnt-agile</guid><category><![CDATA[agile]]></category><category><![CDATA[Waterfall]]></category><category><![CDATA[anti pattern]]></category><category><![CDATA[process]]></category><dc:creator><![CDATA[Chris Fouché]]></dc:creator><pubDate>Thu, 01 Feb 2024 04:55:04 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1714420600632/fc9fa921-884a-46a9-bda3-8da0f3160ed5.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I've worked in unstructured, Waterfall, and Agile software processes since 2009. One I found ineffective is 'Waterfall in sprints', confused as Agile. When I saw a meme about it, I realised it's a common Agile anti-pattern. Here, I'll unpack what I mean by 'Waterfall in sprints' and what's needed to make it Agile.</p>
<h2 id="heading-cycles">Cycles</h2>
<p>Software development has a cycle of requirements gathering, analysis, design, coding, testing, and operations/maintenance.</p>
<p>Waterfall executes this in a macrocycle where all analysis is done before design, all design before coding, and so on. Alternatively, this macrocycle's steps can be repeated across the length of a project in microcycles, known as iterations or sprints.</p>
<p>You need more than sprints to make you Agile. The teams of some questionable processes I worked in believed we were doing Agile because we worked in sprints. In retrospect, we were doing 'Waterfall in sprints' because of how we used them.</p>
<h2 id="heading-sprints">Sprints</h2>
<p>The purpose of a sprint is to produce feedback.</p>
<p>The following is true when we plan: We don't know what we don't know. As a result, we base our plan on many assumptions or hypotheses.</p>
<p>In Agile, we figure out what we (including our customer) don't know with the feedback from sprints. We use it to test our assumptions early and continuously.</p>
<p>The feedback includes:</p>
<ul>
<li>Customer feedback<ul>
<li>From seeing working software.</li>
</ul>
</li>
<li>Data<ul>
<li>Velocity (the average amount of stories or <a target="_blank" href="https://www.offerzen.com/blog/why-i-use-the-old-school-definition-of-story-points">story points</a> completed per sprint).</li>
</ul>
</li>
<li>Misc. learnings<ul>
<li>If the design is right.</li>
<li>How time-consuming it is to code.</li>
<li>Missed requirements.</li>
<li>Etc.</li>
</ul>
</li>
</ul>
<h2 id="heading-waterfall-in-sprints">Waterfall in sprints</h2>
<p>I define 'Waterfall in sprints' as a process with <strong>Waterfall thinking</strong> and sprints.</p>
<p>Waterfall thinking, in my definition, is the disregard of feedback, the tendency to delay the release of value, and the belief the initial plan can work.</p>
<h3 id="heading-disregard-of-feedback">Disregard of feedback</h3>
<p>Waterfall lacks continuous feedback. If a team ignores the feedback from sprints, it's as if that feedback doesn't exist. Such a process is virtually 'Waterfall in sprints'.</p>
<h3 id="heading-delayed-releases">Delayed Releases</h3>
<p>In Waterfall, there's a big bang release. If an 'Agile' team produces features in sprints but delays their release until the project's end, their release pattern is identical to Waterfall.</p>
<h3 id="heading-initial-plan-confidence">Initial-plan confidence</h3>
<p>Waterfall invests a lot of time in up-front analysis and design to produce a 'perfect' plan for development. With such an investment, a team may believe the plan will work.</p>
<p>They may think tuning their plan is unnecessary when they see themselves deviating from it during development. To adjust it would be to admit it's flawed.</p>
<p>This Waterfall thinking may motivate a team to catch up to their plan by drastic means, such as:</p>
<ul>
<li><p>Quality shortcuts</p>
</li>
<li><p>Excessive overtime</p>
</li>
</ul>
<h2 id="heading-the-agile-way">The Agile Way</h2>
<p>How can one convert 'Waterfall in sprints' into Agile? By fixing Waterfall thinking.</p>
<p>Ron Jeffries (an author of the Agile Manifesto) defined <a target="_blank" href="https://ronjeffries.com/articles/015-aug/manifesto/">Agile</a> as being consistent with the Agile Manifesto:</p>
<blockquote>
<p>Let's use "Agile" to mean "consistent with the Manifesto".</p>
<p>. . . People are devising new values, principles, ideas and tools all the time. These may well be consistent with the Manifesto. When they are, we call them "Agile".</p>
</blockquote>
<p>Let's work with this definition. The following is an alternative to Waterfall thinking, consistent with the Agile Manifesto.</p>
<h3 id="heading-feedback">Feedback</h3>
<p>Pay attention to the feedback from your sprints. Learn from it and respond.</p>
<h4 id="heading-responding-to-change">Responding to change</h4>
<p>The Agile Manifesto says <a target="_blank" href="https://agilemanifesto.org">responding to change</a> is more valuable than following a plan. If feedback informs an Agile team their plan won't work, they respond quickly to this change in project knowledge.</p>
<p>How? By tuning the plan. By turning the knobs of the <a target="_blank" href="https://en.wikipedia.org/wiki/Project_management_triangle">iron triangle</a>:</p>
<ul>
<li><p>Scope (Requirements)</p>
</li>
<li><p>Skills (Resources)</p>
</li>
<li><p>Schedule (Time)</p>
</li>
</ul>
<p>Sprints give managers the feedback they need to turn these knobs early and continuously. They tune it by changing the scope, getting more resources (early enough to mitigate <a target="_blank" href="https://en.wikipedia.org/wiki/Brooks%27s_law">Brook's Law</a>), or asking for a deadline extension.</p>
<h3 id="heading-releases">Releases</h3>
<p>Don't do big-bang releases at the end. Release value (usable software) to your customer early and continuously.</p>
<p><a target="_blank" href="https://agilemanifesto.org/principles.html">Principle #1</a> of the Agile Manifesto says:</p>
<blockquote>
<p>Our highest priority is to satisfy the customer through the early and continuous delivery of valuable software.</p>
</blockquote>
<p>Principle #3 says:</p>
<blockquote>
<p>Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale.</p>
</blockquote>
<h3 id="heading-initial-plan-confidence-1">Initial-plan confidence</h3>
<p>The initial plan is not perfect. Expect it to be flawed. Please resist the temptation to force it with excessive overtime or a compromise on quality.</p>
<p>Excessive overtime leads to burnout, which reduces the pace of the team. <a target="_blank" href="https://chrisfouche.com/enabling-constraints">Sustainable Pace</a> is an Extreme Programming practice to prevent this.</p>
<p>Principle #8 of the Agile Manifesto says:</p>
<blockquote>
<p>Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely.</p>
</blockquote>
<p>Quality compromises can ruin a team's ability to sustain a good pace. The resulting technical debt will require interest payments in time. We should never compromise on quality.</p>
<p>Uncle Bob (another author of the Agile Manifesto) <a target="_blank" href="https://twitter.com/unclebobmartin/status/1163789159309434880?lang=en">says</a>:</p>
<blockquote>
<p>. . . Low quality means low speed. Always.</p>
<p>The only way to go fast is to go well.</p>
</blockquote>
<p>Not only is this consistent with Principle #8 of the Agile Manifesto, but also with #9:</p>
<blockquote>
<p>Continuous attention to technical excellence and good design enhances agility.</p>
</blockquote>
<h2 id="heading-conclusion">Conclusion</h2>
<p>We considered 'Waterfall in sprints' as the application of Waterfall thinking to sprints. Here's what's needed for such a process to go Agile: An early and continuous response to sprint feedback consistent with the Agile Manifesto. To more agility and less 'falling'!</p>
]]></content:encoded></item><item><title><![CDATA[You Aren't Gonna Need It]]></title><description><![CDATA[YAGNI! You Aren't Gonna Need It. It's a phrase I've been broadcasting a lot lately. It sparked lively debates within our team. My observation is that most software engineers have a remarkable inclination to do the opposite.
Here, I'll explain why I b...]]></description><link>https://chrisfouche.com/you-arent-gonna-need-it</link><guid isPermaLink="true">https://chrisfouche.com/you-arent-gonna-need-it</guid><category><![CDATA[YAGNI]]></category><category><![CDATA[agile]]></category><category><![CDATA[lean]]></category><category><![CDATA[extreme programming]]></category><dc:creator><![CDATA[Chris Fouché]]></dc:creator><pubDate>Wed, 08 Nov 2023 01:11:06 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1699401235602/1a294cef-7d89-49d1-a09b-1b29096b20b0.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>YAGNI! You Aren't Gonna Need It. It's a phrase I've been broadcasting a lot lately. It sparked lively debates within our team. My observation is that most software engineers have a remarkable inclination to do the opposite.</p>
<p>Here, I'll explain why I believe YAGNI is an essential Agile ingredient and show how Elon Musk uses the underlying principle at SpaceX.</p>
<h3 id="heading-an-agile-principle">An Agile Principle</h3>
<p>YAGNI is a principle from Extreme Programming (XP) that says a capability we think (assume) is needed in the future shouldn't be developed now. It's also known as Simple Design.</p>
<p>Five of the seventeen authors of the Agile Manifesto were Extreme Programmers. Its apparent inclusion in the <a target="_blank" href="https://agilemanifesto.org/principles.html">12 Principles</a> of the Agile Manifesto is, therefore, no surprise.</p>
<p>Principle #10:</p>
<blockquote>
<p>'Simplicity—the art of maximizing the amount of work not done—is essential'.</p>
</blockquote>
<p>YAGNI maximises the amount of work not done by minimising the work on hypotheticals.</p>
<h3 id="heading-yagni-prevents-waste">YAGNI prevents waste</h3>
<p>Why would we want to maximise the amount of work not done? Because we don't want to produce waste.</p>
<p>Lean manufacturing defines waste as anything that doesn't add value and overproduction as a type of waste. Value is whatever the customer desires. We'd overproduce if we develop more than needed to meet our customer’s known desires.</p>
<p>There are many parallels between Agile and Lean. Kent Beck <a target="_blank" href="https://youtu.be/cGuTmOUdFbo?t=1342">mentioned</a> how reading Toyota Production System by Taiichi Ohno influenced his thinking and how he explained XP (before he co-authored the Agile Manifesto). He shared the following:</p>
<blockquote>
<p>Just thinking of overproduction as a problem rocked my world!</p>
</blockquote>
<p>If we add unnecessary functionality for our current requirements just 'in case' it's needed in the future, we're not adding any value now. If the hypothetical never happens (likely), the time &amp; effort spent on it would've been wasted on overproduction.</p>
<h3 id="heading-looking-elsewhere">Looking elsewhere</h3>
<p>Doctors follow a YAGNI-ish practice. They only prescribe medicine for problems they know their patients have. Imagine the problems if doctors prescribed unnecessary medication 'in case' their patients have hypothetical complications in the future. Let's be more like doctors and only write specifications &amp; code (prescriptions) for our customers' known needs, shall we?</p>
<p>It's not rocket science. Producing more than needed will cost the customer more. Speaking of rocket science, let's consider how Elon Musk uses the underlying principle at SpaceX.</p>
<h3 id="heading-elon-musks-5-step-process">Elon Musk's 5-step process</h3>
<p>Elon Musk described his 5-step engineering process in an <a target="_blank" href="https://youtu.be/t705r8ICkRw?t=814">interview</a> Everyday Astronaut had with him at SpaceX's Starbase. His second step is a principle that says you should try to delete a part or process step.</p>
<p>The following are quotes from the interview.</p>
<p>He recognises the in-case inclination of engineers:</p>
<blockquote>
<p>'The bias tends to be very strongly towards let's add this part or process step in case we need it. But you can basically make in-case arguments for so many things...'</p>
</blockquote>
<p>He gave an example of how they applied it to their rockets:</p>
<blockquote>
<p>'So that's why the grid fins, for example, don't fold down because that's a whole extra mechanism that we don't need . . .</p>
<p>. . . But in any case it's a thing we could add later . . .</p>
<p>. . . But it followed the principle of, like, delete the part delete the process.'</p>
</blockquote>
<p>I felt like I was in good company when I watched the interview. Elon Musk's principle is the same as YAGNI! With YAGNI, we prevent (delete) parts we don't need for our current requirements. If the part we prevented becomes a need in the future, we could simply add it then.</p>
<p>I love how he put the <a target="_blank" href="https://youtu.be/t705r8ICkRw?t=1049">following</a>:</p>
<blockquote>
<p>'Possibly, the most common error of a smart engineer is to optimize a thing that should not exist.'</p>
</blockquote>
<p>Genius!</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>YAGNI. Simple Design. Elon Musk's engineering principle. Think of it as the art of minimising overproduction. Let's strive to launch more by doing less!</p>
]]></content:encoded></item><item><title><![CDATA[Why I use the old school definition of story points]]></title><description><![CDATA[This is a republish of this article I wrote for OfferZen's blog.
Story points are ubiquitous in the Agile world. If you ask two different Agile teams what they are, however, you’ll likely get different answers. Some say it represents complexity or ef...]]></description><link>https://chrisfouche.com/why-i-use-the-old-school-definition-of-story-points</link><guid isPermaLink="true">https://chrisfouche.com/why-i-use-the-old-school-definition-of-story-points</guid><category><![CDATA[story points]]></category><category><![CDATA[agile]]></category><category><![CDATA[Estimation]]></category><category><![CDATA[planning]]></category><category><![CDATA[extreme programming]]></category><dc:creator><![CDATA[Chris Fouché]]></dc:creator><pubDate>Wed, 02 Aug 2023 22:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1735240794689/97e5046e-970a-4f4d-9568-350bf8ac315a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This is a republish of <a target="_blank" href="https://www.offerzen.com/blog/why-i-use-the-old-school-definition-of-story-points">this article</a> I wrote for OfferZen's blog.</p>
<p>Story points are ubiquitous in the Agile world. If you ask two different Agile teams what they are, however, you’ll likely get different answers. Some say it represents complexity or effort. Others say it represents a combination of qualities. And so on.</p>
<p>Here I’ll share why I define story points as ideal days and how this helps me with Agile estimation.</p>
<h2 id="heading-the-confusion-around-story-points">The confusion around story points</h2>
<p>Story points estimate the effort or complexity required to complete a user story. It’s an alternative to traditional time estimates.</p>
<p>It’s popular in Agile because many software teams find it easier to estimate in effort than time. The idea is simple: You give a story a point (typically a number) representing its effort. The bigger the effort, the bigger the point.</p>
<p>I’ve worked with multiple teams that used various kinds of story points. Initially, I was not too fond of it because we didn’t have a consensus on how to convert those points to time. Some developers even felt that we didn’t need to do this. Having fuzzy estimates that couldn’t answer how long stories would take to implement felt silly to me.</p>
<p>For example, in one team, we used a Fibonacci sequence to standardise our points: 1, 2, 3, 5, 8, 13, etc. While this created consistency in the difference between points (aside from 2, each number is about 60% larger than its antecedent one), the numbering still felt arbitrary.</p>
<p>In another team, we used T-shirt sizes (S, M, L, etc.) to represent the effort or complexity of our stories. There was a case where another team I was in used a variant of T-shirt sizes, but in such a way that there was no objective proportionality to each other nor consensus on what each size represented. This complicated our iteration planning and backlog refinement sessions.</p>
<p>I didn’t believe story points were supposed to be so difficult. As a result, I went down a rabbit hole to find out what it ought to be straight from the horse’s mouth. That was when I discovered a living legend who’s done software for over 50 years: <a target="_blank" href="https://en.wikipedia.org/wiki/Ron_Jeffries">Ron Jeffries</a>.</p>
<h2 id="heading-going-back-to-the-old-school-story-points-definition">Going back to the old school story points definition</h2>
<p>Ron Jeffries — one of the 17 authors of the Agile Manifesto — <a target="_blank" href="https://ronjeffries.com/articles/019-01ff/story-points/Index.html">created story points</a>. First used in Extreme Programming (XP), the original definition of a story point was one ideal day.</p>
<p>An ideal day represents the ideal circumstances for development. A day without meetings other than the daily standup. A day without distractions. Serenity.</p>
<p>Technically, an ideal day consists of about 8 hours of ‘implementation’ time, as Ron Jeffries calls it. Think of implementation time as when you’re actively working on a story in your ‘assembly line’. That’s when you’re actively developing, testing, integrating, or deploying the story’s code.</p>
<p>Note that this is not the same as elapsed or cycle time. Cycle time is the total time it takes to complete a story from when you started working on it. Think of it as the time from when it moves into the ‘Doing’ column to when it moves into the ‘Done’ one of your Kanban board.</p>
<p>For example, if you spend an hour a day implementing a story for eight days, its implementation time would be eight hours - or one ideal day - and its elapsed/cycle time would be eight days.</p>
<h2 id="heading-the-benefits-of-using-ideal-days-as-story-points">The benefits of using ideal days as story points</h2>
<p>Having worked in teams defining story points as the old school ‘ideal days’, I’ve experienced this definition being more effective than the other kinds of story points we used before. Because it has an objective description that’s easy to understand and it’s easy to convert to traditional estimates.</p>
<h3 id="heading-faster-estimates-with-ideal-days">Faster estimates with ideal days</h3>
<p>Ideal day story points have enabled my peers and I to estimate our user stories faster because we don’t have to consider cycle-time concerns. For example, we don’t have to think about how much time we’ll have outside of meetings, responsibilities outside our projects, or when our team members will be on leave. We just imagine how long it will take to implement in ideal days. As a result, our backlog refinement sessions are more productive.</p>
<h3 id="heading-easy-to-convert-ideal-days-to-traditional-estimates">Easy to convert ideal days to traditional estimates</h3>
<p>Ideal day story points allow us to convert our story points to traditional estimates based on the solid data produced by our iterations. By having traditional estimates, such as the number of actual days it will take us to complete a story, we are able to effectively communicate with our stakeholders and express the work time in terms they are familiar with.</p>
<p>We can convert our points to traditional estimates using our average velocity, where velocity is the average number of story points completed per iteration. To get our load factor, we divide our velocity by the days in the iteration. For example, if our average velocity is 30 points and we work in two-week iterations, the ratio will be 3 (30 points / 10 iteration days).</p>
<p>To know how long a story will take in actual days (cycle time), we multiply its points by the calculated load factor. A 1-point story will therefore take about three actual days.</p>
<p><img src="https://foucheblog.blob.core.windows.net/articles/story-points-calculation.png" alt="Actual Day Calculation" /></p>
<h3 id="heading-ideal-days-allow-us-to-calculate-our-flow-efficiency">Ideal days allow us to calculate our flow efficiency</h3>
<p>With ideal days, we can measure our Kanban board’s flow efficiency with a fair degree of accuracy. Flow efficiency is the ratio of implementation time to cycle time. Because we use ideal days, our average velocity reflects our team’s average implementation time per iteration.</p>
<p>We can calculate our flow efficiency as the average velocity per implementer to the days in the iteration. To get the average velocity per implementer, we divide our velocity by the number of implementers (developers and QAs).</p>
<p>For example, if our velocity is 32 points and we have six devs and two QAs, the average velocity per implementer would be 4 (32 points / 8 implementers). Now we can apply the efficiency formula. The flow efficiency would be 0.4 or 40% (4 ideal days per implementer / 10 iteration days). Leadership can now ask why implementers can only spend about 40% of their days implementing (on the assembly line).</p>
<p><img src="https://foucheblog.blob.core.windows.net/articles/story-points-calculation-2.png" alt="Flow Efficiency Calculation" /></p>
<p>In retrospect, I remember a project where excess meetings were one of the main reasons for such low efficiency. I wish I had ideal day story points to do this calculation back then. That would’ve shifted some pressure away from us implementers to those who bogged us down in superfluous meetings.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>I love estimating with ideal day story points. It’s easy to understand. Quick to estimate with. You can convert it to traditional estimates. And you can use it to measure your workflow efficiency. How’s that for a reason to go old school on story points?</p>
]]></content:encoded></item><item><title><![CDATA[Enabling Constraints]]></title><description><![CDATA[An oxymoron is a figure of speech that pairs two opposing words. There is one I include in my software-engineering repertoire: enabling constraint. We can enable our goals by constraining ourselves. Let's consider this paradoxical effect.
Apple
Steve...]]></description><link>https://chrisfouche.com/enabling-constraints</link><guid isPermaLink="true">https://chrisfouche.com/enabling-constraints</guid><category><![CDATA[agile]]></category><category><![CDATA[extreme programming]]></category><category><![CDATA[Devops]]></category><category><![CDATA[kanban]]></category><dc:creator><![CDATA[Chris Fouché]]></dc:creator><pubDate>Sun, 23 Apr 2023 22:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1735239730259/57d77ae8-1fc1-4742-b01b-5db64b416cff.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An oxymoron is a figure of speech that pairs two opposing words. There is one I include in my software-engineering repertoire: enabling constraint. We can enable our goals by constraining ourselves. Let's consider this paradoxical effect.</p>
<h2 id="heading-apple">Apple</h2>
<p>Steve Jobs' strategy when he returned to Apple in 1997 (to save them) is an example of enabling-constraint thinking.</p>
<p>His strategy was to produce only four products: A desktop and a portable device with consumer and professional models. He got rid of the plethora of other Apple products. He constrained what Apple worked on to enable them to develop those four products, with focus and simplicity, to perfection.</p>
<p>I value his <a target="_blank" href="https://www.cnbc.com/2019/10/05/apple-ceo-steve-jobs-technology-is-nothing-heres-what-it-takes-to-achieve-great-success.html">insight</a>:</p>
<blockquote>
<p>Deciding what not to do is as important as deciding what to do.</p>
</blockquote>
<p>Think about it. Constraints are decisions of what not to do.</p>
<h2 id="heading-process">Process</h2>
<p>Here's an enabling-constraint perspective on Agile process.</p>
<h3 id="heading-iterations">Iterations</h3>
<p>Working in iterations constrains us from planning, analysing, and designing (in detail) too far ahead. That enables us to validate our assumptions early and continuously.</p>
<h3 id="heading-initial-plan-desires">Initial-plan desires</h3>
<p>Agile says <a target="_blank" href="https://agilemanifesto.org">responding to change</a> is more valuable than following a plan. The feedback (data) from completed iterations may signal that the initial plan won't work.</p>
<p>If we constrain the desire we have to forge ahead with it, it enables us to respond well. We'll then have enough time to 'turn the knobs' of the <a target="_blank" href="https://en.wikipedia.org/wiki/Project_management_triangle">iron triangle</a> to drive the project to the best possible outcome.</p>
<h3 id="heading-daily-standup">Daily standup</h3>
<p>The daily standup enables a team to assess their progress and give feedback to those in attendance. Constraining it to 15 minutes max enables dynamic and productive feedback.</p>
<h3 id="heading-kanban-boards">Kanban boards</h3>
<p>Kanban boards help us optimise our workflow. The WIP limits on columns constrain multitasking. That enables us to focus and resolve bugs quicker. As a result, we'll be able to complete more stories.</p>
<h3 id="heading-extreme-programming-xp">Extreme Programming (XP)</h3>
<p>I love <a target="_blank" href="https://en.wikipedia.org/wiki/Extreme_programming">XP</a>! It's my favourite Agile process.
As a tech lead, I've relied on its practices to make our engineering productive.</p>
<p>XP's <a target="_blank" href="https://ronjeffries.com/xprog/what-is-extreme-programming">Circle of Life</a> depicts these practices in a memorable way:</p>
<p><img src="https://foucheblog.blob.core.windows.net/articles/circle-of-life.svg" alt="XP Circle of Life" /></p>
<h4 id="heading-pair-programming">Pair Programming</h4>
<p>Pair Programming constrains engineers from always coding alone. That promotes collaboration and enables them to have context of each other's work. It also bakes peer-reviewing into the coding process.</p>
<h4 id="heading-test-driven-development-tdd">Test-Driven Development (TDD)</h4>
<p>TDD constrains us from just writing production code. When doing it, we write unit tests first. That lets us know if our code works right after changing it. It also promotes more decoupled code.</p>
<h4 id="heading-refactoring">Refactoring</h4>
<p>Refactoring (a là the <a target="_blank" href="https://martinfowler.com/bliki/OpportunisticRefactoring.html">Campground rule</a>) constrains us from just writing new code. We must continuously improve existing code (even if our peers wrote it). That enables our codebase to stay clean.</p>
<h4 id="heading-simple-design">Simple Design</h4>
<p>Most engineers seem inclined to over-engineer solutions. They do it just 'in case' it's needed in the future. Simple Design constrains this inclination to enable sophisticated solutions. It also reduces waste. YAGNI!</p>
<h4 id="heading-coding-standard">Coding Standard</h4>
<p>A coding standard constrains us from coding however we want. That enables engineers to understand each others' code quickly. And reduce the cost of code changes.</p>
<h4 id="heading-sustainable-pace">Sustainable Pace</h4>
<p>A software project is a marathon, not a sprint. Sustainable Pace constrains how often we work overtime. That prevents us from burning out.</p>
<h4 id="heading-continuous-integration-ci">Continuous Integration (CI)</h4>
<p>CI pipelines with quality gates constrain us from merging broken or not-up-to-standard code into the main branch. That enables us to automate the enforcement of many standards. And have a trunk that's always ready to ship.</p>
<h4 id="heading-small-releases">Small Releases</h4>
<p>Small Releases constrains large-release (Waterfall) inclinations. That enables our customers to get early and continuous value. And us to get early and continuous feedback. Furthermore, it reduces the risk of deployments.</p>
<h4 id="heading-customer-tests">Customer Tests</h4>
<p>Customer Tests are those tests included in the specifications of stories (also known as Acceptance Tests). It constrains developers from declaring a story as developed until all its acceptance tests have passed. That enables better flow by reducing bugs.</p>
<h4 id="heading-whole-team">Whole Team</h4>
<p>The practice where those working on a project co-locate (sit together). It constrains individual members from working wherever they like. That enables <a target="_blank" href="https://wiki.c2.com/?SerendipitousCommunication">serendipitous</a> and nonverbal communication.</p>
<h3 id="heading-social-thought">Social Thought</h3>
<p>Who should choose enabling constraints? Tradition suggests the answer lies in a balance of subsidiarity and solidarity.</p>
<p><a target="_blank" href="https://dictionary.cambridge.org/dictionary/english/subsidiarity">Subsidiarity</a> is a principle that says regulation should happen on the local level. By this principle, the team defines its enabling constraints.</p>
<p>Solidarity is about the unity and alignment of the whole. It motivates a central authority (such as the federal government in the USA) to regulate the entire organisation. By this principle, a central body chooses the enabling constraints.</p>
<p>Because a central authority isn't in the trenches, they may not know the best solutions for local problems. A balance of subsidiarity and solidarity is therefore needed.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>We enable ourselves with constraints. How ironic! Strategy. Agile. Kanban. DevOps. You name it! Let's decide what not to do to enable what we want.</p>
<h4 id="heading-ps">P.S.</h4>
<p>This article has changed significantly since its initial publication on Apr 24, 2023.</p>
]]></content:encoded></item><item><title><![CDATA[The Stable Dependencies Principle]]></title><description><![CDATA[What if I told you change is coming? Lots of it. Like the domino effect, a simple code change could trigger a chain reaction that forces you to change many additional bits. A stable codebase is needed to minimise the propagation of this coming change...]]></description><link>https://chrisfouche.com/the-stable-dependencies-principle</link><guid isPermaLink="true">https://chrisfouche.com/the-stable-dependencies-principle</guid><category><![CDATA[cleancode]]></category><category><![CDATA[dependency management]]></category><category><![CDATA[architecture]]></category><category><![CDATA[dependency inversion]]></category><category><![CDATA[Coupling]]></category><dc:creator><![CDATA[Chris Fouché]]></dc:creator><pubDate>Thu, 30 Mar 2023 23:52:12 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1680465767237/51e7c2ec-29c8-40c9-8c6a-a99e8e874dd0.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>What if I told you change is coming? Lots of it. Like the domino effect, a simple code change could trigger a chain reaction that forces you to change many additional bits. A stable codebase is needed to minimise the propagation of this coming change. Let's explore how the Stable Dependencies Principle of <a target="_blank" href="http://cleancoder.com">Uncle Bob</a> can guide us towards it.</p>
<p>Stability is determined by the likelihood a bit of code has to change. The less likely it’s to change, the more stable it is. And vice versa. Consider modules (libraries, components, or packages). There are many reasons why some may change more than others. Risky modules change less than low-risk ones. Expensive modules change less than cheap ones. Or users may request fewer changes to some than others. We need to figure out how our modules should depend on each other to optimise stability.</p>
<p>The Stable Dependencies Principle says modules may not depend on less stable ones. Consider two modules, A and B. Suppose A is likely to change 𝓧 times. And B is likely to change 𝓧/2 times. A may depend on B, as it's more stable (less likely to change). Now. Let's explore what happens if B is less stable. Say 2𝓧 as likely to change. If A depends on B, it could be twice as likely to change than it was alone. Because every time B changes, A may also have to. A violation of the principle. How can we adhere to it?</p>
<p>We should remove that coupling if A depends on a less stable B. As our <a target="_blank" href="https://chrisfouche.com/knowledge-and-responsibility">mantra</a> reminds us, it shouldn't know about it. We could do it by refactoring the code so A doesn't have to call B. Problem solved. But what if A must call B? We can’t then refactor that flow of control away. But we can invert the source-code dependency between these modules such that it points against the flow of control. This technique is called dependency inversion. This means A can call B at runtime without knowing about it in the source code. Brilliant! Let's use it to solve our problem.</p>
<p>Suppose module A has a class, Rules, that calls a class, Data, in module B.</p>
<p><img src="https://foucheblog.blob.core.windows.net/articles/di-before.png" alt /></p>
<p>We can create an interface, IData, in A to represent Data. Let Rules call IData. And let Data implement IData. We'll then configure an <a target="_blank" href="https://en.wikipedia.org/wiki/Inversion_of_control">Inversion of Control (IoC)</a> framework – such as <a target="_blank" href="https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection">.NET</a> and <a target="_blank" href="https://docs.nestjs.com/fundamentals/custom-providers">Nest</a> – to inject Data, at runtime, where IData is used.</p>
<p><img src="https://foucheblog.blob.core.windows.net/articles/di-after.png" alt /></p>
<p>Voilà! A doesn't know about B anymore.</p>
<p>Let’s bring it together. The Stable Dependencies Principle reduces the propagation of change. Dependency inversion can help us adhere to it. The lesser the propagation of changes the faster we’ll be able to make them. This increase in productivity lowers the cost of change. And enables us to use the time that would otherwise be used on changing superfluously affected code to develop new features. This is the way.</p>
]]></content:encoded></item><item><title><![CDATA[Parents, teenagers, and unit tests]]></title><description><![CDATA[There’s a theory of stability. It applies to entities. We can observe its effect on human behaviour. It explains why parents tend to be more stable individuals than teenagers. And can explain why unit tests make code more stable.
The theory says stab...]]></description><link>https://chrisfouche.com/parents-teenagers-and-unit-tests</link><guid isPermaLink="true">https://chrisfouche.com/parents-teenagers-and-unit-tests</guid><category><![CDATA[unit tests]]></category><category><![CDATA[unit testing]]></category><category><![CDATA[dependencies]]></category><category><![CDATA[Theory]]></category><dc:creator><![CDATA[Chris Fouché]]></dc:creator><pubDate>Sat, 04 Mar 2023 17:06:50 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1677949223161/fff83056-cb8d-4dd2-8a96-49268bc14b1c.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There’s a theory of stability. It applies to entities. We can observe its effect on human behaviour. It explains why parents tend to be more stable individuals than teenagers. And can explain why unit tests make code more stable.</p>
<p>The theory says stability increases with dependants. Let’s explore this by juxtaposing parents and teenagers. A typical teenager doesn’t have dependants. They can afford to change their behaviour. They can change their sleeping patterns. They change their discipline, perhaps to play more computer games and study less. Because their changes, for the most part, only affect them. Parents are different.</p>
<p>Parents have dependants, their children. If they’re conscientious, this makes them stable. They can’t change their sleeping patterns, because children may miss out on important activities. They have to stay disciplined, be it to keep their job as a breadwinner or to help their children at home. Their behaviour remains consistent because changes to it may have a bad effect on their dependants. You may now think, 'That's commendable. But how is this relevant to unit tests?’</p>
<p>Think of unit tests as the expectations of what your code’s supposed to do personified as dependants. Writing them gives your code dependants. In theory, a unit of code's stability should go up when you make tests depend on it. Dependants can also provide feedback to their dependency about how well they're regulating their behaviour. A child can inform their parent if things are wrong. Unit tests also do this. Not to their units but to software engineers. They tell you when the changes to their dependency, the unit, is wrong.</p>
<p>That's it! A strange perspective of unit tests. They're dependants you give to units of code to increase stability.</p>
]]></content:encoded></item><item><title><![CDATA[Knowledge and Responsibility]]></title><description><![CDATA[A mantra is a memorable phrase you repeat to yourself for guidance. 'Focus and simplicity' was one of Steve Jobs's. I love how he distilled his thought process into those two words. It made me wonder if I could come up with one that’ll influence its ...]]></description><link>https://chrisfouche.com/knowledge-and-responsibility</link><guid isPermaLink="true">https://chrisfouche.com/knowledge-and-responsibility</guid><category><![CDATA[clean code]]></category><category><![CDATA[software design]]></category><category><![CDATA[Coupling]]></category><category><![CDATA[single responsibility principle]]></category><dc:creator><![CDATA[Chris Fouché]]></dc:creator><pubDate>Mon, 06 Feb 2023 20:44:12 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1675717510038/6b8a14df-4d2d-4de0-8ed3-deb6fbeb63c9.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A mantra is a memorable phrase you repeat to yourself for guidance. 'Focus and simplicity' was one of Steve Jobs's. I love how he distilled his thought process into those two words. It made me wonder if I could come up with one that’ll influence its thinker to craft code that’s flexible, more robust, and easier to understand. I like to separate my code such that each bit has a single responsibility and knows as little as possible about the others. 'Knowledge and responsibility' is the mantra I extracted from this approach.</p>
<p>Responsibility is about how you separate your concerns. This concept speaks to cohesion. The Single Responsibility Principle is used to do so. In a nutshell, it says you should separate your code such that each bit serves the needs of a single actor. An actor (from UML) is the role played by an entity (human or computer) at a particular moment.</p>
<p>When a barista makes coffee, they can be seen as a 'coffee maker' actor. When they clean the coffee machine, they can be seen as a ‘coffee-machine cleaner’. If you were to develop the software of the coffee machine, you’d have a module for each of these actors. Not one for a barista. Nor none at all. After establishing modules, figure out how to make each one know as little as possible.</p>
<p>Knowledge is about source-code dependencies. This concept speaks to coupling. A bit of code knows about another if it depends on it. This can be risky because the more code knows, the more fragile it becomes. If module A depends on module B, it can be affected by changes to B. Such changes could break A. If A also depends on C and D, even more things can affect it! A should, therefore, know about as little as possible. You may also discover the less code knows, the easier it's to understand.</p>
<p>The Stable Dependencies Principle helps me to determine if a module may know about another. It says modules may not depend on less stable ones. It can also guide you to clean source-code architecture, with layers and a prominent boundary that separates business rules from input/output (I/O) code. There's more to be said about stability. For now, note it's something you’ll need in your repertoire if you’d like to master making code know less.</p>
<p>There you have it! Knowledge and responsibility. A mantra that can help you to write cleaner code with high cohesion and low coupling.</p>
]]></content:encoded></item></channel></rss>