There are many software design principles that you, as a developer, can learn and study. In this article, we are going to take a look at 5 key principles that make up the acronym SOLID.
These principles are meant to make the architecture of an application more flexible, scalable and maintainable. Implementing them in your work can also increase the overall complexity of the project.
Alright, the SOLID principles are the following:
This principle establishes that a class should only handle one specific part of the…
Choosing between different data structures to store data can be tricky if we don’t understand the differences between them. For instance, we can use an array or a linked list to store data, both are linear data structures that allow you to store data in a linear way. There are different advantages and disadvantages over one another.
In this article, we’ll talk about another data structure that can give you better performance than the two data structures mentioned above — I’m talking about a Binary Search Tree.
This article assumes some basic knowledge about data structures and Big O notation.
Interfaces are tools to define sets of actions and behaviors. They help objects to rely on abstractions and not on concrete implementations of other objects. We can compose different behaviors by grouping multiple interfaces.
In this article we are going to talk about interfaces in Golang and how to use them.
An interface is a set of methods that represent common behavior for different data types.
With interfaces, we can organize different groups of methods that apply to different types of objects. …
Ruby as many programming languages can create objects that we can use to store properties, methods and perform operations on them. In Ruby, everything is an object, strings, integers, boolean, hashes, arrays and instances of a class.
Each object has a bunch of public methods that we can use. In this article, we will focus mainly on one method — Object Id.
For every object, Ruby offers a method called object_id. You guessed it, this represents a random id for the specific object. This value is a reference of the address in memory where the object is store.
Inversion of control is a principle in Software Development that sometimes could lead to some confusion.
In this article, I’ll explain what Inversion Of Control means, the power of this principle, the benefits of it, and the close relation with Dependency Injection.
This principle states that you should invert the flow of control within your modules, by using another concept that is Dependency Injection. That way we can invert the control by injecting dependencies into your classes and making them work with different types of objects.
This in turn allows your superclasses and subclasses to depend on abstractions and not…
Writing dynamic code can be difficult sometimes. Fortunately, Ruby supports metaprogramming, which allows you to write code that will write more code for you on the fly.
Metaprogramming is a powerful technique when it comes to creating classes or methods and calling them dynamically, which also makes your code DRY. The downside of using metaprogramming is that it is much more expensive than writing normal code, and in my opinion, you should only use metaprogramming when there is no other way to solve the problem or accomplish what you want.
In this article, we are going to talk about how…
Postgres offers two types of views, normal views and materialized views. Both can solve similar problems that are related to encapsulation, abstraction, and speeding up performance.
It is worth mentioning that views and materialized views are not only available when using Postgres as a database, almost all relational databases have support for using views and materialized views.
Let’s defined first what is a view in Postgres.
A view is a set of SQL queries, that can be treated as a table. …
In this article, I’ll cover a gRPC call using a Bi-Directional Streaming — implementing a client that will send a stream request, and a server that will respond with streaming messages.
This is the last article of the series, if you haven’t checked them out, here is the list:
In a bi-directional streaming rpc call, both the client and the server sends multiple messages to each other. Using this type of rpc call, can be a…
In this article, I’ll cover a gRPC call using Server Streaming response— implementing a client and server Go applications.
This is the third article of the series:
In a server streaming rpc call, the client sends a single request, and the server responds with a stream of messages. …
In this article, I’ll cover Client Streaming gRPC calls — implementing a client and server Go applications.
This is the second article of the series:
In a client streaming rpc call, the client sends a bunch of requests and once it is done streaming, the server will return a single message.