HOW DOES THE INTERNET WORK?

Reading Time: 3 minutes

When you use the Internet, what happens?

Whether you go on-line with a friend, or send a mail, or buy a gift, check the score, or watch   a movie, or study about Tipu’s war!! same wire connects you to the desired destination all the time. So as billion people with billion connections all over the world.

How does that happen?

two-connected-laptops-21218169Consider that you have some information in your personal computer (PC) which you would like to share with your friend, so in order to do that first you should connect your PC to your friend’s PC, thus making connection with help of wires and softwares.
That’s called a “Network”

 

 

 

faster-internet-designed-computers-1374531023
Imagine that there are other Networks like yours within your vicinity which they want to share their information with yours. So by connecting all these Networks, a link between each and every computer is created, so called “Intra-Network” or “Local Network”.
By connecting  large number of Local Networks a large hub is created where every  PC is linked with other PC, known as “INTER-NETWORK” popularly known as “INTERNET”.

Internet works with protocols (how to send and receive data). Protocols which should be followed by each and every one, failing which doesn’t serve the purpose of the individual. As long as each and everyone agree with the protocols, we can keep adding the individuals in the Internet until the whole world is connected. That’s what the Internet is, the Network of Networks that share each other their information.

Every device on the Internet has a unique address. Anything you sent in the Internet is just information that is sent from one device to another, thus unique address will be allotted to all the devices which we use, thus clearing mass confusion of accurate reception.

Messages or Information sent will be divided into small packets of data which will be obviously in the binary form (wake up its digital world), where these packets contain the information along with the details of the sender and receiver, this make the packet to reach the destination accurately
This way your one message which divided into several packets can travel through the Internet in any path (here path is wiring network by which PCs are connected) without the fear of getting lost (remember these have addresses on their back). so our packet takes diversion or deviation or choose different path if the conventional path is congested or overcrowded with other’s data.
Then by following the protocols the receiving device puts the data all together making it understandable to the end user.

So as to reduce cost and traffic of data Internet Exchanges (IE) are provided. These IE’s are connected to different platforms of service providers such as end user (this is what now a days users use), social networking, banking, shopping, academic, financial etc. and this type of connectivity from everyone is known as Peering. Even making peer to peer connections (end user to end user) possible.

internet-exchange

 

 

The Internet is open, decentralized and totally neutral. No single organisation controls it and works well as long as it does.

 

 

 

 

 

Image credits:

http://blog.adsbrook.com/wp-content/uploads/2013/08/internet-pic.jpg
http://www.dreamstime.com/royalty-free-stock-images-two-connected-laptops-image21218169
http://technostories.wordpress.com/category/mind-mapping/

Developing Your Own Chat Box

Reading Time: 2 minutes

In this modern  world of internet , reaching to your loved one is just a click away.In the olden days what took least two days to convey  your message takes now just two sec.. So is there something  special about this electronic postmaster..?? Yeah  it’s speed  is almost close to light , it has its own organized codes and at last it saves paper thereby is eco friendly!!!!

You must be wondering there must be a web of codes  in chat application , but surprisingly it’s is not that complicated. With a just few line of codes you can dive in your own chat room.

To make you believe that let me take a example for you , I use a PYTHON language to make a simple chat room.

Python is similar  to  other languages that we use , but with some ups and down!! This is a sample code for your first chat server

*Import socket //  header file

*a=socket.socket(socket.AF_INET, // socket.SOCK_STREAM)

*a.bind(“0.0.0.0” ,8000) // bind the socket to all IP use  port 8000

*a.listen(2) //allow 2 user at a time

*(Client ,(ip ,port))=a.accept() // ready to chat and return ip and port no. of connected message

*client.send(“hi”)  // sending message

The above 6 line of code can make a simple chat server. AF_INET and SOCK_STREAM are the protocol which internet uses. Google some of these things to  have in depth knowledge. After “accept” command it will wait for the machine to connect. For connection – open your terminal window and type  netcat  “ip address of the machine” 8000. It will get connected!!!

 

If you have a doubt leave comment and next time let’s see you in your own chat room .. See you there 😛  

Optimization in Computer Algorithms

Reading Time: 4 minutes

In simple words, an algorithm is a step-by-step procedure of doing a given task. The goal of an algorithm is to perform that task in an efficient manner so that the consumption of resources is minimum.

In context of computer engineering, the resources are time and memory. So, the goal of a computer algorithm is to perform the task as quickly as possible and using as less memory as possible. Usually, there is a trade-off between these two resources(memory and time); as in today’s era we have abundance of space, we mainly focus on reducing the time consumed while developing a computer algorithm.

After the designing process is completed, a computer algorithm is the implemented in a computer programming language such a C/C++, Java, Python etc.

To demonstrate how choosing a computer algorithm intelligently may affect the outcome of program/software lets see an example problem. The problem is : We have an integer array called ‘nums’ which has n integers (As array indexing in C/C++ starts with 0, the first integer will be stored at nums[0] and the last on will be stored at nums[n-1]). Next, we are given a number, and we have to tell if that number is present in the array or not. And, we are given MANY such queries ( that is, we need to check the presence of many numbers in the array).

One very simple approach that comes in mind is that, for each query, start searching the array from the beginning and keep searching until, either the integer required is found or the end of array is encountered (i.e. the integer is not found). In the form of C code, the implementation of this algorithm will look something like this:

/*let the integer that we need to find be ‘tofind’*/

int i=0;
while(i<n)
{
  if(nums[i]==tofind)
    break;
  i++;
}
if(i==n)
  printf(“Number not found”);
else
  printf(“Number found”);

This approach is called LINEAR SEARCH and is very straight-forward and easy to understand and implement. But an obvious drawback of this approach is that we exhaustively search the entire array for each query. This is not a most efficient way of doing this task. Lets analyze this algorithm from real world perspective. In most softwares we deal with a large amount of data. So, if there are 10^5 array integers and 10^5 queries, that would mean that the body of the while loop is executed 10^10 times. Now, for a standard 4GB RAM, 2.5 GHz machine, 10^8 iterations take about 1-2 second, 10^9 iterations take about 10 seconds and 10^10 iterations is bound to take a lot of time. Time that we cannot afford to lose!

Now, let’s study an alternate approach. This approach is called ‘Binary Search’ and is used widely for this kind of problems.

The first step of this algorithm is to sort the array. At first look, it may seem that sorting itself will consume a lot of time and will contribute to overhead. But, remember that we have to run MANY queries on the array. This means that sorting once will give advantage for EACH of the many queries. So, ultimately the overhead contributed by sorting is much MUCH less than the advantage it gives.

Now, when we start searching, the required integer can be present anywhere in the sorted array. We take a look at the middle integer. If this middle integer is greater that our target integer, then we can say that our target integer is obviously present somewhere in the first half of the array (this is because the array is sorted). And if the middle integer is less than our target integer, then our target integer is present somewhere in the second half of the array.

The potential space ( i.e. the space where the required integer can be present) is, therefore, reduced to half.

We repeat this process until the size of the potential space becomes 1. And if we still have not yet found the integer, we can conclude that it is not present in the array.

In form of C code, this algorithm will look something like:

int start=0, end=n-1, mid;
int foundflag=0;
while(start<end)
{
  mid=(start+end)/2;
  if(nums[mid]==tofind) // if the middle element is the required number, then search terminates
  {
    foundflag=1;
    break;
  }
  else if(nums[mid]>tofind)
    end=mid-1; // restrict search to first half
  else if(nums[mid]<tofind)
    start=mid+1; // restrict search to second half
}
if(foundflag==1)
  printf(“Number found”);
else
  printf(“Number not found”);

 

 

This algorithm halves the potential space in every iteration. So, it takes a maximum of log2(n) iterations to complete the search of one element, as opposed to n iterations per search of the previous algorithm.

During the CEV Talk, I demonstrated the effects of this algorithm on the execution time. I took some sample arrays and sample queries, and I ran both algorithms on the test data. The first approach took over 1 minute in completing the queries, whereas the second approach took less than 0.5 second. The effects were clearly visible!

Note that if there is only a few number of queries, then the overhead produced by sorting will be greater than the advantage it gives. So, BINARY SEARCH is desirable only when there are a lot of queries. Otherwise, simple LINEAR SEARCH would work fine.

Extra Edgy Things For All Engineers

Reading Time: 3 minutes
World Class Education Websites :- 

1.) edX.org

2.) coursera.org

3.) NPTEL.ac.in (watch at 1.5 x speed )

 

Internship and Workshop : Companies

 

1.) I3 Indiya

2.) Wegilant( Speacilized in Cyber Security)

3.) Robosapiens

4.) Technophilia

5.) Thinkware (Good for Matlab)

6.) Thinklabs

7.) Waayoo

8.) Learnics.in

9.) Logicbrigade.com

10.) STP.mbsgroup.in-(Also Has Course on F1 Car Design and Development)

 

To-Do Projects :-

 

Electronics Engineering

1.) SMPS

2.) POV

3.) LED CUBE

4.) FM Receiver

5.) Line Follower

6.) Temperature Controlled Fan

7.) Phone Jammer

8.) 555 Timer Projects

9.) Raspberry Pi

 

Mechanical Engineering

1.) Robotic Arm

2.) RC Plane

3.) Hovercraft

4.) Wall Climbing Robot

5.) Rope Climbing Robot

6.) Pole Climbing Robot

7.)Tricopter/Quadcopter

8.) Hydraulic Lift Arm

 

Chemical

1.) Batteries: Batteries of Your Own, like

  • Galvanic Cell
  • Zinc Air Battery
  • Al Air Battery
  • Al CU Battery

2.) Propulsion System: Car using

  • Vinegar+ Baking Soda
  • Decomposition of H2O2

3.) Search On MFC-Microbial Fuel Cell

4.) Research Alternate Source of Energy like Jatropha Seeds

 

 

 

 (continue on right column…..)

Electrical Engineering

1.) Power Generation from Moving Vehicles

2.) Power Theft Protection

3.) Booster Circuit

4.) Inverter Circuit

 

Civil Engineering

1.) Cardboard Model Building

2.) Designing On Softwares

3) Some Famous Civil Engineering Projects – Bridges, Tunnels and Dams

 

Computer Engineering

1.)Read: A Complete Reference to Java by Herbert Schildt

2.) Make Applets

3.) Android App Development

4.) Game Development

5.) AI-Artificial Intelligence: – Course on edX

6.) Read HTML: – HTML-5 for Web Development

7.) PHP

8.) Hacking

9.) Android- Learn to Root, Flash

10.) Google about Crack Paid Software using Decompiler and Disassembler!!!

11) Read  “C Programming Language” written by the creator of C – Dennis Ritchie

 

 

Extra-Edge Software

 

Civil

1.) Revit

2.) AutoCad

 

Computer Engineering

1.) Android App Development-IDE:-Eclipse

2.) Game Development Softwares

3.) Hacking-Backtrack OS

 

Chemical Engineering

1.) Aspen

2.) Super Pro Designer

3.) Open Foam

4.) Chemsketch

 

Mechanical Engineering

1.) Autodesk- AutoCad

2.)  Inventor

3.) Pro-e

4.) Google Sketch-Up

 

Electrical Engineering

1.) E-tap

2.) Matlab

3.) LabView

4.) PSCAD

5.) Simulink

6.) Lapack-Numerical Linear Algebra

 

Electronics

1.) MultiSim

2.) Proteus: Ckt and AVR MCU Simulation

3.) Eagle: PCB Designing

4.) Matlab: Mother of all things-

       Image Processing,Computer Vision,Control System Simulation, Digital Signal Processing

5.) NI’s LabView

 

Magazines

1.) ECE  – EFY

2.) Mech- Top Gear, Overdrive, AutoCar

3.) Chem- Chemical Engineering, World,Chemical Industry Digest

4.) Comps- Digit, Chip

5.) Electrical- Industrial Automation (IED Communications),IET(generation transmission and distribution)

 

Tech Fests

Even Semester

1.) IIT Bombay -Techfest Jan first week

2.) IIT Madras -Shaastra   Jan first week

3.) IIT Kharagpur -Kshitij Feb first week

4.) NIT Trichi-Pragyan-Feb End

5.) IIT Kanpur -TechKriti   March Mid

6.)BITS Pilani -Apogee   March Mid

7.) IIIT Hyderabad -Felicity

8.) IIT Roorkee -Cognizance

 

Odd Sem

1.) NIT Surathkal-Engineer – October End

2.) NIT Warangal-Technozion-   September End

 

God Father Sites

 

1.) http://www.howstuffworks.com/(Discovery’s Site-More of general Science)

2.) http://www.engineersgarage.com/

3.) http://www.extremeelectronics.com

4.) http://www.circuitstoday.com/

5.) www.societyofrobots.com (The best according to me)

6.) http://www.electronics-tutorials.ws/

7.) http://www.ece101.com/

8.) http://narobo.com/

9.) http://www.pyroelectro.com/

10.) http://students.iitk.ac.in/roboclub/tutorials.php

 

Electrical Engineering

1.) controleng.com

2.) control.com

3.) electric.net

4.) controlglobal.com

 

Mechanical Engineering

1.) pirate4x4.com

2.) carbibles.com

3.) SudhaCars.com

 

 (Continue on right column ……)

Computer Engineering

1.) code.org

2.) codechef.com

3.) spoj.com

4.) Java Applets-http://walter-fendt.de/ph14e/

 

Others

1.) internshala.com

2.) knowafest.com

3.) twenty19.com

 

 

Sites to buy robotics stuff

In India:

1.) http://nex-robotics.com/

2.) http://www.robokits.co.in/

3.) http://www.vegarobokit.com/

4.) http://www.rcbazaar.com/default.aspx

5.) http://www.rcdhamaka.com/

 

World best online robotics store:

1.) Jameco

2.) Solarbotics

3.) Digi-key

4.) Radioshack.com

 

Movies

1.) Gravity

2.) October Sky

3.) Iron Man-1, 2, 3

4.) Wall-E

5.) Batman

6.) G I Joe-1, 2

7.) Transformers-1, 2, 3

8.) The Social Network

9.) Avatar

10.) Real Steel

11.) Pirates of Silicon Valley

12.) Blade Runner

13.) 2002: A Space Odyssey

TELEVISION SHOWS

 

Discovery, Discovery Science, Discovery Turbo

1.) How Tech Works

2.) Dark matters

3.) Extreme Engineering

4.) Deconstructed

 

History TV

1.) Modern Marvels

 

NatGeo TV

1.) Big, Bigger, Biggest

2.) MegaStructures

3.) MegaFactories

4.) I Didn’t Know That

5.) Ultimate Factories

6.) Mega Factories

 

 

CEV - Handout