Port, Port …Socket!!!

When listening to  Computer Networks class today I got the following interesting doubts which I got clarified by my professor


Q) what is doubt:- when every browser is allocated a port number 80 then how can multiple tabs of chrome or any browser can talk through that when only when process can be listened through one port ?
Ans:– servers listen through port-80 for browsers but not on client side..on client side your  OS uses port numbers >5000 so every new tab(as for google it is a process..read the below) uses a unique port number —i.e one process one port

Continue reading


dpkg vs apt and usage of grep

dpkg , apt , synaptic , aptitude —all these belong to debian flavour of linux


apart from dpkg and apt-get we have

aptitude:-  it is like a graphical user interface for managing with packages which uses apt-get libraries .It is a package manager with GUI

synaptic:-similar to aptitude. you can look at it’s features here Synaptic.

Continue reading

What is Hard Link and Soft Link ? why we require them ?

Hard Link and Soft Link are the two words which will be heard when you are using Linux (any of it’s distro’s).

what is a hard link?

before that you need to know what is inode.(pronounced as  “I node”)  a concept of unix-like OS’s

In simple terms inode is a data structure which stores file attributes and disk block locations (simply details about a file object like metadata and permissions etc..,)

Continue reading

Hoisting JS

oh well I was quite surprised to know this feature of javascript called Hoisting and I am sure not many knew this

so what is javascript hoisting ?

x = 5; // Assign 5 to x

elem = document.getElementById("demo"); // Find an element
elem.innerHTML = x;                     // Display x in the element

var x; // Declare x

so what is wrong with above code ? wait !!

In JavaScript, a variable can be declared after it has been used.

In other words; a variable can be used before it has been declared.

Continue reading