<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Concepts on Artur Rios Lab</title><link>https://artur-rios.github.io/personal-lab/concepts/</link><description>Recent content in Concepts on Artur Rios Lab</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 21 Oct 2026 00:05:00 +0000</lastBuildDate><atom:link href="https://artur-rios.github.io/personal-lab/concepts/index.xml" rel="self" type="application/rss+xml"/><item><title>What Is the Dependency Inversion Principle? Policy, Detail and Who Owns the Interface</title><link>https://artur-rios.github.io/personal-lab/concepts/dependency-inversion-principle/</link><pubDate>Wed, 21 Oct 2026 00:05:00 +0000</pubDate><guid>https://artur-rios.github.io/personal-lab/concepts/dependency-inversion-principle/</guid><description>&lt;p&gt;A checkout that takes a payment has to call the payment provider: there is no&#10;way around that at run time. It does not follow that the checkout&amp;rsquo;s source code&#10;has to &lt;em&gt;name&lt;/em&gt; the provider, import its SDK, or change when the provider changes&#10;its API. The &lt;strong&gt;dependency inversion principle&lt;/strong&gt; is the rule that separates those&#10;two things. It asks which way the arrows between modules should point, and its&#10;answer is that the code holding the important decisions should not depend on the&#10;code holding the details; the details should depend on it. This is part five of&#10;a series on SOLID, after the &lt;a href="../single-responsibility-principle/"&gt;single responsibility&lt;/a&gt;,&#10;&lt;a href="../open-closed-principle/"&gt;open-closed&lt;/a&gt;, &lt;a href="../liskov-substitution-principle/"&gt;Liskov substitution&lt;/a&gt;&#10;and &lt;a href="../interface-segregation-principle/"&gt;interface segregation&lt;/a&gt; principles, and&#10;it leads into &lt;a href="../inversion-of-control/"&gt;inversion of control&lt;/a&gt;, the mechanism&#10;most programs use to put the principle into practice. This article explains what&#10;the principle says, where it came from, why the flow of control and the&#10;direction of a dependency can point opposite ways, why the abstraction has to&#10;belong to the code that uses it, and what is not worth inverting. Every output&#10;shown here was produced by running the code on Windows 11, with Python 3.14.6,&#10;not written by hand.&lt;/p&gt;</description></item><item><title>What Is the Interface Segregation Principle? Fat Interfaces, Role Interfaces and the Clients That Shape Them</title><link>https://artur-rios.github.io/personal-lab/concepts/interface-segregation-principle/</link><pubDate>Wed, 21 Oct 2026 00:04:00 +0000</pubDate><guid>https://artur-rios.github.io/personal-lab/concepts/interface-segregation-principle/</guid><description>&lt;p&gt;An invoice printer needs to read one order. In many codebases it is handed an&#10;object that can also save orders, cancel them, total the month&amp;rsquo;s revenue and&#10;export everything to a spreadsheet, because that is the interface the order&#10;store happens to have. The printer never calls those methods, but it depends on&#10;them all the same: when one of them changes, the printer is rebuilt, retested&#10;and redeployed, and anyone writing a stand-in for it in a test has to implement&#10;all five. The &lt;strong&gt;interface segregation principle&lt;/strong&gt; is the rule against that&#10;arrangement, and the fourth of the five SOLID principles this&#10;&lt;a href="../../series/solid/"&gt;series&lt;/a&gt; covers. This article explains&#10;what it says, where it came from, what a fat interface costs, how to split one&#10;into interfaces shaped by their clients, and where splitting stops paying.&#10;Every output shown here was produced by running the code on Windows 11, with&#10;Python 3.14.6 and with the .NET 10 SDK, not written by hand.&lt;/p&gt;</description></item><item><title>What Is the Liskov Substitution Principle? Subtypes, Contracts and the Promises a Base Class Makes</title><link>https://artur-rios.github.io/personal-lab/concepts/liskov-substitution-principle/</link><pubDate>Wed, 21 Oct 2026 00:03:00 +0000</pubDate><guid>https://artur-rios.github.io/personal-lab/concepts/liskov-substitution-principle/</guid><description>&lt;p&gt;A function that sorts a list of shapes by area has never heard of the square.&#10;It was written against a base type, and it will be handed whatever subclasses&#10;exist now and whatever subclasses someone writes next year. Whether it keeps&#10;working depends on a promise nobody wrote down: that every one of those classes&#10;behaves the way the base type said it would. The &lt;strong&gt;Liskov substitution&#10;principle&lt;/strong&gt; is that promise, made explicit. It is the third of the five SOLID&#10;principles, and this is part 3 of a &lt;a href="../../series/solid/"&gt;series on SOLID&lt;/a&gt;.&#10;This article explains what the principle says, where it came from, the rules a&#10;subtype has to keep, the violations that ship inside widely used platforms, and&#10;how to repair one. Every output shown here was produced by running the code on&#10;Windows 11, with Python 3.14.6, mypy 2.4.0 and the .NET 10 SDK, not written by&#10;hand.&lt;/p&gt;</description></item><item><title>What Is the Open-Closed Principle? Extension, Abstraction, Plug-ins and the Expression Problem</title><link>https://artur-rios.github.io/personal-lab/concepts/open-closed-principle/</link><pubDate>Wed, 21 Oct 2026 00:02:00 +0000</pubDate><guid>https://artur-rios.github.io/personal-lab/concepts/open-closed-principle/</guid><description>&lt;p&gt;A shop adds a new way to ship parcels. In one codebase that means opening the&#10;function that prices shipping, adding a branch to the middle of it, and&#10;re-testing everything that calls it. In another it means writing one new class&#10;in one new file, and nothing that already works is touched. The difference&#10;between the two is what the &lt;strong&gt;open-closed principle&lt;/strong&gt; is about: arranging code&#10;so that new behaviour arrives as new code, rather than as edits to code that is&#10;released, tested and depended on. It is the second of the five SOLID principles,&#10;and this is part 2 of a series on them, after&#10;&lt;a href="../single-responsibility-principle/"&gt;the single responsibility principle&lt;/a&gt;.&#10;This article explains what the principle means, where it came from, what it&#10;looks like in running code, why no module can be closed against every change,&#10;how the expression problem sets its limits, and when the abstraction it calls&#10;for is worth paying for. Every output shown here was produced by running the&#10;code on Windows 11, with Python 3.14.6, not written by hand.&lt;/p&gt;</description></item><item><title>What Is the Single Responsibility Principle? Reasons to Change, Actors and Cohesion</title><link>https://artur-rios.github.io/personal-lab/concepts/single-responsibility-principle/</link><pubDate>Wed, 21 Oct 2026 00:01:00 +0000</pubDate><guid>https://artur-rios.github.io/personal-lab/concepts/single-responsibility-principle/</guid><description>&lt;p&gt;An online shop has an &lt;code&gt;Order&lt;/code&gt; class. Finance uses it to book revenue, the&#10;storefront uses it to print receipts, and the platform team uses it to store&#10;orders in the database. One day the storefront asks for receipts to show prices&#10;with VAT, a developer makes the change in the obvious place, every test the&#10;storefront cares about passes, and at the end of the month finance&amp;rsquo;s revenue is&#10;twenty per cent too high. Nobody touched finance&amp;rsquo;s code. They touched code that&#10;finance &lt;em&gt;shared&lt;/em&gt;. The &lt;strong&gt;single responsibility principle&lt;/strong&gt; is the rule that&#10;would have kept those two apart, and it is the most quoted and least understood&#10;of the five SOLID principles. This is the first part of a series on SOLID: it&#10;explains what the principle says, where it came from, how the acronym itself&#10;was born, what it looks like in running code, and how far to take it. Every&#10;output shown here was produced by running the code on Windows 11, with Python&#10;3.14.6, not written by hand.&lt;/p&gt;</description></item><item><title>What Is Inversion of Control? Frameworks, Callbacks, Dependency Injection and Containers</title><link>https://artur-rios.github.io/personal-lab/concepts/inversion-of-control/</link><pubDate>Tue, 20 Oct 2026 23:00:00 +0000</pubDate><guid>https://artur-rios.github.io/personal-lab/concepts/inversion-of-control/</guid><description>&lt;p&gt;A web framework calls a function when a request arrives. A test runner finds&#10;the tests in a file and runs each one. A browser calls a handler when a button&#10;is clicked, and an application server hands a class the database connection it&#10;asked for in its constructor. In each case the code a programmer wrote does not&#10;decide when it runs or where its collaborators come from: something else does.&#10;That reversal has a name, &lt;strong&gt;inversion of control&lt;/strong&gt;, and it is one of the ideas&#10;most of modern software is quietly built on. This article explains what it&#10;means, where the term came from, the forms it takes, how dependency injection&#10;and IoC containers work inside, and when the indirection is worth paying for.&#10;It closes a series on &lt;a href="../../series/solid/"&gt;SOLID&lt;/a&gt;: where the&#10;&lt;a href="../dependency-inversion-principle/"&gt;dependency inversion principle&lt;/a&gt; says which&#10;way dependencies should point, this is the mechanism that makes them point&#10;that way at run time. Every output shown here was produced by running the code on Windows 11, with&#10;Python 3.14.6 and with the .NET 10 SDK and Microsoft.Extensions.DependencyInjection&#10;10.0.13, not written by hand.&lt;/p&gt;</description></item></channel></rss>