Gopi Gorantala

Gopi Gorantala

Gopi has been a Full Stack(Java+React) since 2016. He worked in Europe, and India, from startups to tech giants. He has a strong engineering professional with a Bachelor's in Satellite Communications.

A Complete Guide To JavaScript localStorage

localStorage is a property of the window object in JavaScript that allows you to store key/value pairs in a web browser. The data stored in localStorage persist even after the browser is closed, making it a useful tool for saving user data on the client side.

Is Java "pass-by-reference" or "pass-by-value"?

Java uses pass-by-value for all parameters, including both primitive data types and objects, which affects how methods behave and how they should be written.

Bitwise OR, Computations, and Examples

A Bitwise OR is a binary operator that takes two-bit patterns of equal length and performs the logical inclusive OR operation on each corresponding bits pair. The result in each position is 0 if both bits are 0. Otherwise, the result is 1.

Number Of Flips Required To Make a|b Equal to c

We need to write a program with minimum flips to make the two bits’ OR operation equal a number. If you understand the OR operations clearly, this problem will be a good challenge for your skills.

Introduction to NOT

The Bitwise NOT operator evaluates the binary representation of the value of a single input. If the bit contains 1, the output will be 0 for that bit location. If the bit contains 0, the output will be 1.

Bitwise NOT, Computations, and Examples

Bitwise NOT, takes the input number, considers its binary representation, and inverts every bit, which means the 0 bit becomes 1, and the 1 bit becomes 0.

Introduction to OR Operator

OR operator compares each bit of the first operand to the second operand’s corresponding bit. If both bits are 0, the corresponding result bit is set to 0. Otherwise, the corresponding result bit is set to 1

Power of 2

We solve by making use of the & operator in computers. There are many ways to solve this, of which two approaches are simple, and one is a more complex but better solution.

SOLID: Open-Closed Principle (OCP)

The idea behind OCP is to create flexible and adaptable software to changing requirements. This is achieved by separating the implementation of a module from the interface it presents to the rest of the system, allowing the implementation to be extended without affecting the module's users.

SOLID: Single Responsibility Principle (SRP)

The Single Responsibility Principle (SRP) states that every class should have only one reason to change, meaning that a class should have only one job. This principle promotes the separation of concerns and helps to keep the code maintainable and scalable.