What is SOLID?

I know what you are thinking and no not the state of matter but in a software engineer capacity. This is an acronym that stands for the 5 principles of software development.

Single-Responsibility Principle

The first principle is called the Single-Responsibility principle, which says that a class should only have one job. So if you have a class that does some sort of calculation and then you have several other methods that print out the calculation in multiple formats then you may want to extract those out into there own class. That is because that class has become something that now does two jobs instead of just one.

Open-Closed Principle

The second is the Open-Closed principle, which says that objects should not be able to be modified but should be able to get extended if needed. Another way to put this is that it should be easy to modify the behavior of a class without actually having to modify the class itself. An easy way to achieve this is to create an interface for a class and then pass that class into another object.

Liskov Substitution Principle

The third is the Liskov substitution principle and it has a very formal saying to explain what it means. The short version however is that every subclass or derived class should work as a substitute for their parent or base class. This means that any derived class shouldn’t modify the behavior of the parent class. Essentially you need to have a very generic abstract class that you inherit from. Take an example like having a circle class and a rectangle class. Both of these classes need to inherit from a generic abstract class called shapes. This will allow you to implement things specifically for each class without interfering with the other classes. It also allows you to create new shape classes easily.

Interface Segregation Principle

The forth is the Interface Segregation principle, which states that a client should not have to implement an interface or depend on a method that it does not use. So if an interface is needed to be implemented by a class and it forces that class to actually implement a method that it will not be able to actually use, for whatever reason. Then it may mean that a new interface needs to be implemented that does not have the method.

Dependency Inversion Principle

The fifth is the Dependency Inversion principle, which states that a high level module should not depend on a low level module. Instead the modules should depend on abstractions. This means that when thinking of the interactions between the high level module and low level module it should be thought of as an abstraction. This allows for decoupling between the two modules.


These five principles are easy to grasp in concept and can be very helpful when coding. The hardest part is to remember to use these principles as you code and sometimes things will slip by but that is what refactoring the code is for.

Light Novel Review: Overlord

This light novel may be another story about being stuck in a game, or at least a world based on a game, but that doesn’t mean that Overlord is just the run of the mill story. It has a great story where the main protagonist is not just trapped in a game world, but actually taken to another world. Also the world that he ends up in is somewhat different from the actual game. This adds a nice twist to the story since the main protagonist does not have all the information about the world and therefore he can’t be all knowing about the world that he was just trapped in and has to collect information all over again. He is very overpowered compared to most of the inhabitants of the world, as far as we know. The other interesting thing is to see that the game that he was trapped in had non-human characters and he had chosen to be an undead, which means you get to see him slowly lose his humanity because he starts to take on the characteristics of the undead species. It is also amplified by the fact that he has to pretend to be a grand leader that can outperform his subordinates, which are also incredibly strong and smart compared to a regular human. This makes things interesting when he has to pretend to know what his subordinates plans are and not interfere with them, unless he wants them to find out he is an unfit leader. That brings me to all the characters that appear in this story, most already being all of the NPCs of Nazarick. They all have a unique personality that were set up by the other people in Ainz’s guild, or as the NPCs call them: “Supreme Beings”. They essentially worship them as gods and have no sympathy for humanity. It is only Ainzs’ human physice that holds them back from massacring the surrounding villages. The main plot of the story is Ainz trying to find out if the other guild members got stuck in this new world or not, and his subordinates mistaking his wishes for world domination. So if you want a good story with a crazy cast of characters then I would recommend reading this light novel.