Contents The Two Hats The Rule of Three Understanding the Rule of Three The Essence of the Rule Example the Rule of Three in Practic...
Principles in Refactoring
What is Refactoring? Why do We Need Refactoring?
Refactoring isn’t just about cleaning up code; it’s a vital process for maintaining the health, efficiency, and sustainability of a software system. Contents What is Refactoring? ...
Why do We Need to Use More Composition and Less Inheritance?
While inheritance is a fundamental OOP concept, its overuse can lead to various problems. Many people think that inheritance is an Anti-Pattern and should rarely be used, or even not used at all. ...
What gets inverted in DIP?
This Dependency Inversion Principle is relatively simple to use, but the related concepts are harder to understand. For example, What gets inverted in the Dependency Inversion Principle? What is th...
Lists and Collections in Event-B
Contents Collection of Lists Modelling a list of items Queues Modelling a Printer Queue Relating jobs and queue positions Ass...
Proof-Based Verification in Event-B
Contents Validation and Verification Validation Verification What is Formal Verification? Proof Obligations (PO) ...
For ISP, What Is an "Interface"?
The key to understanding the principle of interface separation is to understand the word “interface”. In fact, the term “interface” can be used in many contexts. In software development, we can ei...
For OCP, What Exactly Are "Extensions" and "Modifications"?
The Open/Closed Principle (OCP) is a cornerstone in crafting maintainable, scalable, and robust OOP systems. It encourages us to think ahead, design with flexibility in mind, and respect the existi...
For SRP, How Do We Determine If a Class Has a "Single" Responsibility?
Many people think that SRP is the simplest principle in SOLID because they think that it is very easy to give modules a single responsibility. Actually, it’s not. In my opinion, SRP is the hardest ...
SOLID Principles
Design principles and ideas are more universal and important than design patterns. Contents What are SOLID principles? Single Responsibility Principle (SRP) Concept ...