Basic Hystrix Circuit Breaker Implementation

Circuit Breakers are one of the best tools in our toolbox to use while creating a backend structure with dependent modules. In this post, I will try to set up a basic Hystrix Circuit Breaker example and demonstrate some different configurations.

For demonstrating this concept I’ve created two Spring Boot applications called producer and consumer. The producer returns an integer counter and increases the value after each request but when the counter is between 5 and 20 it will wait for 5000 ms before returning the counter.

Read More »Basic Hystrix Circuit Breaker Implementation

Run Android Apps In Sandbox For Privacy [With Island]

While Whatsappocalypse continues to grow at a rapid pace I’ve decided to take it to the next level and help you pay attention to a different aspect of mobile privacy. Many apps we’re using are collecting information about our devices and what’s in them. This might sound less creepy than WhatsApp spying on your chat but I can assure you it is not in the slightest way less important. I am talking about location, installed applications, device name, device model, etc. It might not feel very important but how would you feel if someone grabs your phone and views a list of installed applications, photos, downloaded files, and whatnot. But there is an option like Run Android Apps In Sandbox!

Read More »Run Android Apps In Sandbox For Privacy [With Island]

Debug C++ with Rider for Unreal Engine

Hello Everyone! I would like to share a trick that took me some time to figure out. I’ve started using Rider for Unreal Engine which is an IDE developed by JetBrains. As a full-time Backend Java developer, I use IntelliJ for development. So when I started my game development journey I was not too comfortable with the Visual Studio. You can guess the level of my excitement when I heard the news about an IDE for Unreal Engine developed by JetBrains. Needless to say, I’ve joined the test program as soon as it gets online and started to develop my games with the help of Rider. But the issue was, I didn’t know how to debug with Rider.

Read More »Debug C++ with Rider for Unreal Engine

Capture parameters with Mockito ArgumentCaptor

While creating test methods for a class, you might want to access some arguments passed to a specific method. Luckily, you can capture parameters with Mockito ArgumentCaptor. It is especially useful when you can’t access the argument from the outside of the method.

Let’s check it out on a basic example. Let’s say we have a class called Product and we create stock codes for these objects before saving them to the database. So we’ve created a method called generateProductCodeAndSave() which generates the code then passes the product to another method in order to insert it to the database.

Read More »Capture parameters with Mockito ArgumentCaptor

Why your Git repository is suprisingly large?

Git stores everything. It is a version control tool after all. What is once committed will always be available for anyone to checkout. But how does git stores all versions of your files? Does it copy every version? No. It just detects changes and takes note of them. After all, adding a new function to your class is just inserting some lines into a text file. But this doesn’t always help you to save repository space.

If you’ve added a file then deleted it in the next commit, it doesn’t go away. It has to be stored somewhere to allow you to access it in the future if you wish. These kinds of commits might cause your repository to grow and make it uncomfortably large for cloning. “There must be a way to clean this mess!” I hear you say and there is! But first, we have to figure out why your git repository is unnecessarily large.

Read More »Why your Git repository is suprisingly large?