Photo by Matteo Fusco on Unsplash

Hello there ! Prem here. I completed bachelors in Information & Technology from one of the Tier-3 colleges in the first half of this year. Currently, I am doing Job in IT company as Software Engineer and have industrial experience of 16 months. This is all about me.

First of all, I take you to the time when i got my phone. After completing my exams of 12th science (aka 10 + 2 / Junior College), I got my phone (I-phone 6- Space grey- 16GB) from my father ( on 10th April 2016, Sunday I guess). This was my first…

Photo by Chris Liverani on Unsplash

This problem is little bit tricky and easy if you are good at MATH.

Suppose you are given a random binary number 11010 and you need to calculate what is the largest power of 2 to divide this binary number.

11010 in decimal is 26 and this number is divisible by 2⁰, 2¹. So answer is 2¹ means 1.

You can use brute force approach. In which, firstly convert binary to decimal.

Now let us take another solution, Binary number is made of 2^n; where 0 ≤ n ≤ Infinity.

Let us take decimal 10 which is denoted as…

Photo by Alexander Sinn on Unsplash

You are given a positive integer number, output is its complement number.

Complement number means inverse of the binary representation of that number.

Binary representation is in the form of 1’s and 0’s. We will inverse 0 with 1 and vice versa.

Let us take example :

Suppose one number 11 (In decimal) and its binary representation is “1011”. The complement number of 11 is “0100” (In binary) equals to 4 (In decimal).

We are using XOR, It can revert bit if we do XOR with bit 1.

First of all, Happy Engineer’s Day to all Engineers.

Photo by NESA by Makers on Unsplash

I just got mail from LinkedIn and want to inform you that linked learning is giving expert led most popular courses FREE 🎉 for 16 Days.

While working from home 🏠, You want to learn new things but tired of surfing on google and don’t get proper resource. Linked Learning provides some courses for free until September 30, 2020.

List of Popular Courses for Engineers

  1. Programming Foundations : Algorithms, this course is for Beginner and explains some of the most popular and useful algorithms for searching, sorting with Time-Space complexity(Performance Evaluation), technique likes recursion, and common Data-Structure…

The author of node.js is Ryan Dahl. Usually JavaScript is used to make interactive websites (front-end) but nodejs is used to make backend API services.

Nodejs is single threaded and used for non-blocking / low CPU intensive tasks. For frontend development, there is V8 engine for chrome which is used to run javascript code. It is same for backend as well, here in backend V8 engine is appended and JS code runs there.

In frontend, we use window object and In Node we use global object. We don’t use DOM in backend so in node we don’t have “document” object…

As a human being require water to survive, Java Developers must require to understand collection for surviving in a cut-throat IT industry.

Photo by Simon Daoudi on Unsplash

The only thing that absolutely have to know is, the location of the Library.

- Albert Einstein

Collection is the combination of interfaces and classes, which is use to store and process data efficiently. We can say that if you know collection, how to use collection, and when & where, which collection is used then you are “Programmer”.

Set, List, Queue, Map are the interfaces in collection.


  • List is ordered collection which means it is in sequence, you…

Let Photo by Alexandre Boucher on Unsplash

Let us understand term Callback by an real-world example: Suppose, you are calling to your Girlfriend (If you have) and she is busy in another call then she send message to you : “I am busy right now, Call back you later.!!”. After completing her work, she calls you back and this is what call back in JavaScript as well.

In JavaScript, When a function is executing (Girlfriend is talking with someone) then after function execution is completed another function is started for execution this is call back function.

Now you are thinking that its depend upon when, where you…

Before diving into closures, first of all we need to know what is closures?

Closures can be defined as inner / nested function preserving all variables and arguments of its outer functions.

Let us take some simple example of closure:

show() inner-function has access of “sirName” and “name” which is closures. Here below, i attached output of console.dir(show) and you can see that in [[Scopes]] of that function has key Closure which contains value of “name” and “sirName”.

If you are coding in JavaScript you must aware of how JavaScript works under the hood.

JavaScript is a single threaded programming language even if it can execute program asynchronously.

How !????

First of all, you need to know the difference between Synchronous and Asynchronous.

Synchronous code execute in sequence - each statement waits for the previous statement to finish before executing.

Here is the JavaScript Code snippet of Synchronous program execution:

Asynchronous code doesn’t wait for previous line to execute and it is used to make site responsive and user friendly.

Prem Parmar

Software Engineer

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