Factory pattern is another prevalent pattern that we need to know. The main principle about the factory is that it separates the creation from use. But what does this means? We design a factory entity that creates the objects we want depending on what we want. We do not use the constructors directly on the
Author: angelos
SOLID Principles in modern C++
When talking about patterns, one acronym seems to be the most popular, the SOLID principles. Yes, actually SOLID is an acronym that stands for: Single Responsibility, Open-closed, Liskov substitution, Interface Segregation and Dependency Inversion Too many strange terms, a little bit dry. I can think of two things that will help us go through. The
Observer Pattern in modern C++
We have started a series of posts trying to present ridiculous popular design patterns using examples in modern C++. Again, the inspiration came from the great youtube video series, ArjanCodes. This time we are going to talk about the observer pattern which is going to help us separate various modules in our code. The key
GitHub Actions and Conan
It’s always wise to use continuous integration (CI), even in our hobby projects. When working with C++, it might be painful to install the required dependencies, even for the most essential packages like the googletest for the unit tests or the spdlog for the logger. In those cases, using Conan package manager is a no
Dependency Inversion Pattern in modern C++
Dependency inversion is one more pattern that is going to help us improve abstraction. We mean that by applying this approach, we separate the definition of an interface from the actual implementation. To explain the pattern, there is a classic example with the light bulb and the switch. If we assume that we want to
Strategy Pattern in modern C++
In this post, I’m going to talk about the strategy pattern. As I have mentioned in a previous post, my initial inspiration started as I watched ArjanCodes youtube video tutorials. In of those (link), he began to explain the strategy pattern. This approach comes in handy when we build a structure, and we could have
The Template Method Pattern and the Bridge Design Pattern in modern C++
Is developing software only good (or excellent) knowledge of a programming language? Of course not. There are many things, but one of the most important is to know patterns. It might be not obvious when you develop elementary apps at the beginning of your journey, but it becomes necessary when developing decent packages for professional
Continue reading The Template Method Pattern and the Bridge Design Pattern in modern C++
[Exploratory Data Analysis] How to perform multivariate analysis
Let me clarify from the beginning that this is not an extensive or in-depth guide to multivariate analysis. Fortunately, we can find many online resources on that. It is more like a beginners’ friendly guide. In our adventure, we will use the Palmer Archipelago (Antarctica) penguin data dataset that comes as a kind of alternative
Continue reading [Exploratory Data Analysis] How to perform multivariate analysis
[Exploratory Data Analysis] How to perform univariate analysis
Let’s assume that we are about to start working on a new classification problem. Before we start, it’s always a good idea to perform a univariate analysis on the target variable. This is helpful because it’s going to give us insights into the distribution of the target. What if we discover that the dataset is
Continue reading [Exploratory Data Analysis] How to perform univariate analysis
[Feature Engineering] how to convert a date string to datetime
Let’s say that we have a dataset like rainfall in Australia (where I can find this? in kaggle) In this dataset, we have a date column that looks like this: >>> df[‘Date’] 0 2008-12-01 1 2008-12-02 2 2008-12-03 3 2008-12-04 4 2008-12-05 … 145455 2017-06-21 145456 2017-06-22 145457 2017-06-23 145458 2017-06-24 145459 2017-06-25 Name: Date,
Continue reading [Feature Engineering] how to convert a date string to datetime