banner image showing a laptop with an open terminal, a coffee cup to the left of the laptop and a notepad to the right.
banner image showing a laptop with an open terminal, a coffee cup to the left of the laptop and a notepad to the right.
Illustration from https://illlustrations.co/

Idem-what now?

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:

Mathematics to The Rescue :

The word “Idempotent” has its roots in Mathematics…

Image for post
Image for post
Photo by Clint Patterson on Unsplash

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.

In this article, let’s…

Image for post
Image for post
Class Diagram

What is Strategy Design Pattern?

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.

The Scenario:

Let’s assume that we have our fictional application that contains some awesome articles and their corresponding…

Image for post
Image for post
Image comparison

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…

Image for post
Image for post
Memory-optimized Javascript Object Instances

If you have been using JavaScript for a while, you would have come across the term “Constructor functions”, which are a fancy way to call a function that will be used as a blueprint to create object instances.

In a classical object-oriented language like Java, these blueprints will be classes. ( Even though we have the class keyword in JavaScript, it is not quite the same as their classical object-oriented counterpart. But let’s look at that in a different article at a later time).

In this article, let’s shift our focus towards looking at a way of creating memory-optimized instances…

Image for post
Image for post
Immutable Objects in JS

In this article, let’s look at a way to make objects in JavaScript immutable using the freeze method available on the Object prototype.

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.

What Is Immutability?

In the programming context, it means that the state (properties and methods) in an object are unchangeable…

Image for post
Image for post
Image Credit: undraw.co

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…

Image for post
Image for post
Square Root Approximation Techniques

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. …

Image for post
Image for post
A conceptual depiction of a tail recursion

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”.

What Is Recursion?

Recursion in a nutshell

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…

Hello folks!

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.

The Problem:

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…

Parthipan Natkunam

A software engineer by profession. Tinkers with electronics as a hobby. Loves literature and music. Likes to write and build things from scratch.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store