How each of the Network Protocol layers work behind the scene

When we type in our browser, we see the google home page. We are unaware of the back scene about how the each layer of the protocol works. In this post i will describe, how each of the protocol layer works.

First of all let’s see what are the layers involved in OSI and TCP/IP protocols.

Continue reading “How each of the Network Protocol layers work behind the scene”

A Silly way to comment in your Code

During my beginners year of writing code, i used to comment unnecessarily. I realised this after i saw the code written by senior developers. The main purpose of the comment is to make your code understood by other developers who are working together in the same project or for other contributors.

Let us take an example of the silly code:

Continue reading “A Silly way to comment in your Code”

How to set up basic PHP Project structure with Composer

Most of the time beginners learning PHP are unaware of Composer, if you are among them, Composer is a dependency management tool for PHP.

Let’s take a simple example, rather than using include command in each of the PHP file, composer makes it easy by specifying that file as a dependency. Another example would be if you use some library then it makes easier to use and update it with a single command.

Continue reading “How to set up basic PHP Project structure with Composer”

Learn Kotlin – Class

Although Kotlin is statically typed language, it supports object-oriented programming like Java. Before explaining further let us dive into the basic syntax of the Kotlin class.

class Vehicle { // class definition
	// class body

So, defining a basic class is as simple as this and similar to Java.

Before diving further into the class syntax let us first discuss about the four access modifier available in Kotlin.

Continue reading “Learn Kotlin – Class”