If you have been working with APIs, chances are that you might have heard some of your peers throw around the word “Idempotence”, leaving you to wonder what they really mean by that word anyway.
In this article we’ll look at a detailed answer; so we could learn what this fancy word “Idempotence” actually means in a REST API context.
After reading this article, the next time when your peer says that you need to make an endpoint idempotent, you will know exactly what they are talking about. So let’s get started:
The word “Idempotent” has its roots in Mathematics…
In the modern web, APIs are like the nervous system. They transmit data to and from one endpoint to another and without them, the web, IoT and everything else that’s awesome about tech would not be so amazing.
When something is this crucial, it attracts a lot of attention and requires a lot of thoughts to be put in, while building one. For someone with malicious intent, unauthorized tapping on this nervous system of the web is all it takes to know what is going on within the system and worse, bring down the whole system.
Strategy design pattern is a behavioural design pattern. It is a tried and tested way of code design that can be used in scenarios where we need to pick up a specific approach (algorithm) from a pool of available related approaches during runtime to achieve something.
This design pattern is also sometimes referred to as the policy pattern.
In this article, let’s look at a practical scenario to utilize this design pattern and let’s write some code in Java to get a hands-on exposure.
Let’s assume that we have our fictional application that contains some awesome articles and their corresponding…
Did you ever find yourself in a situation where you had a directory full of images and might have potential duplicates? To look through each image and mark duplicates will be a waste of your time, and so, you wanted to automate it with a script. But then, a few hours into it, you are reading some OpenCV documentation and articles and you didn’t know how you ended up there and worse, you realize, the rabbit hole is endless.
If the above situation sounds familiar, then this article is essential for you. If not, you will learn a neat trick…
In this article, let’s shift our focus towards looking at a way of creating memory-optimized instances…
We will first explore what immutability is and why it is important. Then we will look at a code snippet in which we convert a normal object into an immutable one using the freeze method.
Finally, we will conclude by looking at the limitation of
freeze()and also look at a quick approach to deep-freeze nested objects.
So, let’s get started.
In the programming context, it means that the state (properties and methods) in an object are unchangeable…
Hello fellow human, this will be one of those, once in a while article, where I don’t write about tech or programming but rather focus on something else that is equally, if not more important. Yeah, life it is.
So, recently I turned 30, and like every other millennial who turned 30, I spent a few moments on retrospection. After which, like most others, I decided to blog about it shamelessly. Yeah so predictable , I know ☺.
But what is in it for you, in this article? well, some learning and experiences. Some mistakes and lessons learnt and a…
In this article let’s look at some square root approximation algorithms and techniques. We will start with a basic brute force approach and gradually improve its efficiency and sophistication.
In the real world we will never need to write an algorithm to calculate the square root of a number, as it is handled by the basic math package / module of almost all predominant programming languages.
Then why would we need to know it?, one might ask. Well, knowing this will deepen our understanding of how computers work with numbers in general and fractions in particular. …
Recursion is a fundamental concept in programming yet it trips up many programmers, sometimes even the experienced ones. But once you have understood the concept of recursion you might have also figured out that it is inefficient in terms of memory usage and performance.
In this blog, let’s look at what recursion is, its downsides, and also understand a remedy to the problems through a technique called “Tail Recursion”.
Chances are high that you’ve come across the funny phrase, “To understand recursion, you need to first understand recursion”.
We can think of recursion as the programming…
Unlike my usual posts, this will be a rather brief, step-by-step DIY solution, to fix a common Bluetooth audio issue, caused by upgrading the phone’s OS to Android 10 on Nokia devices.
Recently, I upgraded my Nokia 3.1 plus phone’s OS to the latest stable Android version (Android 10) and noticed that all of my Bluetooth audio devices stopped working. They did not output audio, even after several reconnects.
One more peculiar case was observed with the JBL “Wind” model Bluetooth speaker, where it produced a static-like noise on connecting to the phone and did not produce the…
A software engineer by profession. Tinkers with electronics as a hobby. Loves literature and music. Likes to write and build things from scratch.