-
The Liskov Substitution Principle (LSP) — Talking About S.O.L.I.D.
If it looks like a duck, quacks like a duck, but needs batteries — You’re probably using abstraction incorrectly. The image above is an analogy that explains this principle. More technically, another definition of LSP would be: Subclasses should be substitutable for their Superclasses. LSP is often linked to OCP (Open Close Principle). Beyond the…
-
IaC and Terraform: an overview for beginners
Before diving into Infrastructure as Code (IaC) and its meaning, it’s important to revisit the reasons behind its development. Many teams, when setting up environments and various infrastructure tools, have historically created their scripts for setup and maintenance. These scripts, written in languages like Shell, Python, Ruby, Perl, and others, handle different layers of an…
-
The Open/Closed Principle (OCP) — Talking About S.O.L.I.D.
I’ve arrived with another post in the S.O.L.I.D. series, and this time I’ll be talking about the Open/Closed Principle (OCP). I’ll never forget the classes I had with my great advisor and mentor Dr. João Carlos Pinheiro, where he often spoke about the benefits of working with code that is open for extension and closed…
-
The Single Responsibility Principle – Talking about S.O.L.I.D.
Hello everybody! This is my first blog post, I stopped writing my articles a few years ago and noticed that I was losing an important part of writing: you learn a lot. So I’ll start rewriting some articles about S.O.L.I.D. and also finish talking about them with the examples rewritten in Ruby (the programming language…