What should you know about SQL indexes as a Java developer?
The majority of developers don’t know a lot about SQL performance tuning. I find this topic very interesting and I…
Composite pattern with the real-world example
In this tutorial, we will solve a real-world problem and solve it with the composite pattern. The Real-world business problem that I…
Bridge pattern with real-world example
In this tutorial, we will show the real-world problem and solve it with a bridge pattern. Real-world business problem that I had…
Template pattern with real-world example
In this tutorial, we will solve the a real-world problem and solve it with the template pattern. The real-world business…
Why do we use private mutex?
You may see something like this: And you start wondering: “Hey, why do we use synchronized (mutex), can’t we just use synchronized…
How to make a major mistake with improper publication of the object
First, we need to define an improper publication. If in thread A you create the object X and in the…
How many problems can you spot in this simple code?
Let’s try to create a program that runs ten threads and every thread adds a thousand numbers to the list….
Memento pattern explained
In this post I will show you a memento pattern on one very simple example. I will not use a…
Visitor, memento and state patterns combined
In this article, we will solve the problem that requires applying all of those three patterns. Before you continue to…
State pattern with a real-world example
Overview of the pattern The core idea of the state pattern is that an object change behavior based on it’s state….