Categories
Uncategorized

Computers and The Internet Magic

Back when I started learning how to program, I had a nagging feeling that I was missing something. There is a lot to computer science and I wished I could just download all the knowledge directly into my brain, The Matrix style. Mind you, if possible, I would download as much knowledge as was available into my brain that way.

You see, I never had to study computers, so to me the internet was a magical place more akin to Plato’s world of ideas than anything physical. It wasn’t until I joined a workshop by the Django Girls that I started to understand what it was about. Sadly, the “how internet works” part of the Django Girls Tutorial completely lost me half way. I was left adrift with more questions than answers. I ended up looking at Khan Academy for an easy explanation.

What you’re about to read is what I ended up with after trying to make sense of it all using the resources available to me.


In the Beginning, There was Binary

software-557612_1920

One thing all tutorials seem to agree on is that the internet is much like a postal service. Since I grew up in a country where going to the post office equals getting robbed and where all the goods sent over post are stolen by the post office staff, I did not fully understand the analogy. I understood the gist of it: you give a letter to the post office, then the post office brings it to the place it needs to go. But who was the post office? What kind of letters were sent? How?

So what does binary have to do with all of that? Well, the information that is sent over the internet uses the binary system to make it easier for the computer to understand the data. So the letter you want to send is a bunch of binary data. See, the binary system is easy for a computer to use because it only needs two levels of information: on and off. It makes designing circuits easier.

There are other systems other than binary:

  • Decimal (base 10)
  • Octal (base 8)
  • Hexadecimal (base 16)

 

The problem with these systems is that they are difficult to represent in the physical world and therefore difficult to build. On top of that, we use the octal and hexadecimal systems to represent binary (think about computer color palletes).

Representing things as a yes or a no, on or off, one or zero makes things easier, but it is also a limitation on the type of algorithms you want to use. There’s no way of representing “maybe”. That’s where quantum computers shine. Quantum computers use “switches” that can reliably hold more than two posible states. If you want more information about this, I recommend this video. For now, let’s go back to binaries.

Binary information is sent in the forms of bits: a pair of opposites (1,0). Eight bits are one byte. A thousand bytes are one kilo byte and so on. The way we physically convey this information is for example using switches, or light that can only be on or off. Khan Academy has a really nice video about how information is passed using tangible examples (a timer and a light bulb).


Then The Computers Talked and They Saw That It Was Good

00aa

If you’re anything like me, you probably wondered how your computer is able to connect to a computer at the other end of the world. I mean, I knew there were cables that connected computers together like one big happy LAN party, but I wondered about the ocean. Are there cables in the ocean? Yes, yes, there are. Here’s the proof.

So in the end, the internet is not necessarily what connects your computer to all the rest, that’s what you did when you plugged in the internet cable. The internet is actually the framework that organizes the way your computer interacts with all the other computers. In the words of the people from Khan Academy: it’s “a design philosophy and an architecture expressed in a set of protocols”. In other words, a set of rules of how to communicate.

The first thing you’d need to communicate is an address (which ties in with the idea of sending mail by post). This role is fulfilled by the IP address: your computer’s name (according to geeks and other computers on the network).

There are computers who specialize in serving information to other computers –so your own computer doesn’t have to. Could you imagine if you needed to have your computer on at all times so other people could look at your website? Those computers are called servers (because they “serve” information to other computers).

What it boils down to is that once you give your computer a website address, it uses it to find the IP address of the computer that contains the file you want to look at.