Saturday, October 31, 2015

Me and my OSes

Operating systems have changed over time to reflect what the end user wants out of them. Over the years I have changed the Operating Systems I have used and they in turn have changed my perception about operating systems. This is my attempt at chronicling them.

My first computer arrived in the house in the year 2002. It was a Compaq Presario preinstalled with Windows Millennium. Those were the days...sigh. The first day we switched on the computer, we could not manage to turn it off. Since it was a new machine we thought that turning off the main power was not really a good option. We had to call a family friend who lived near by to switch off the computer.

Windows ME


Windows ME was the last OS in the 9x series of Microsoft windows. It was a good OS as far as an 8 year old me was concerned. During that time, I had no notion of what a computer was. The entire machine was a black box. A graphical interface provided some confront, something I could work with. At school all the kids had Windows XP and powerful hardware while little old me was stuck with Win ME for whom support stopped in 2003. During those days all I did on a computer was play games. CDs were exchanged between classmates and games were played. Those were the days when I had no notion of the fact that games could be transferred between PCs without CDs. This computer had about 64 MB ram and an 80 GB hard disk. The memorable games played on this machine include Age of empires, Road rash and Rage.

Family members used it from time to time. My mother at one time got one of the family friends to put a BIOS power on password. I remember my sister and me playing detective to guess the password by laying out graphite powder to figure out what mom had typed.

Since I was restricted to just the boot procedure I noticed the flashing prompt to press F12 (or at least I think so) to enter BIOS. Somehow I got into that and reset the firmware to factory settings. I have no clear recollection of how I did that. Mom said, if I can break into it I can do it again so there is no point in the password anymore. The one thing about this OS I remember was that I used to think that frequent crashes were part of the system. They were meant to happen. Now I know they do not. For a child to be tinkering with a computer, ME was a fragile environment.

Windows XP

By about 2008 this machine was too slow to take on the new games in the market. The only purpose of the computer being gaming for me. It had served family members well and was now too slow for me. In 2008 we changed the CPU of the computer. The new machine was still behind the market, 512 MB ram, 250GB HDD and windows XP. This was still too good to be true. A jump from 64 to 512 had me running circles around my father. For a child who wanted the computer for the purpose of gaming, it was a gift in gold.

The first game on that machine was again AoE, though quickly replaced by Duke Nukem. We had shifted to Gurgaon then and I had a new purpose for a computer. Music. The medium of exchange was pen drives but I still only knew about floppy disks. Things changed quickly when Visual basic was introduced to us in class 8. It was VB6 and quiet an amazing thing. It was an entirely new world for me. The best part was that I had asked my teacher if I could do this stuff on my home computer and she had said yes.

Programming was so much fun. I designed a school bell for my school which was sadly never put into practice. I had the good fortune of learning about serial ports and what not. That along with the fact that I was playing warcraft and Runescape on the computer was awesome. things went from good to awesome. I could tinker as much as I wanted and had absolutely no problems.

Then came the big blow. I managed to infect the computer badly enough that it did not start. This led to my first experience in installing an operating system. I bought another XP cd from a local store and sat down to install. There was a lot of jargon and having no computer to browse the Internet on it took me a full 3 days to complete the procedure. Things moved along slowly from there on.

Windows 7


In 2010 along came a laptop in the house. Matter of fact I am still using this machine which was a blessed HP dv4 Pavillion laptop. It came preinstalled with a 32-bit windows 7 home edition. Now this was an experience to be had. For a kid who had grown up on blocky UI and slow computing, the fast i3 processor and nice glossy look of windows 7 will never be forgotten.

Things were awesome for about 2 years. I played Assassin's Creed 1, 2, Brotherhood on the same laptop. Games like counter strike and Call of Duty were a regular feature on this machine. All this despite no Graphic Card.

I had become adept at installing XP by now since I had plenty of practice on the desktop. Every time a trial version of Kaspersky expired, I simply reinstalled the OS. I was now exposed enough to know that there is something called Linux in this world. I began installing windows 7/ubuntu/ windows XP for fun in school computers. Windows 7 definitely was the stepping stone for putting me back in the game. I was up to speed.

Ubuntu 12

During college, I decided to try out Ubuntu. I downloaded the iso and began the installation procedure. This was my first time installing something other than XP. Sure, I messed up. I ended u pre-formatting the entire drive and only Ubuntu on my laptop to boot.

This mistake cost me dearly. I was left with no game to play and no helping hand of Windows. I resigned to my fate and began to learn about Ubuntu. The command line was a new thing and thankfully I took to it like a duck to water. Everything was straightforward and clean. I liked it. Though I still missed the games.

After a while my interest in games waned and I began to explore the wonderful world of Linux and all other open source things. Like an explorer entering the dark continent, I learnt of the rich UNIX history, of the text-editor wars.

I learnt that the World Wide Web was not the Internet, and that Internet Relay Chat was still alive. I learnt new languages. I learnt to like Perl, Java, C and Python. Ok, I fell in love with Python. I learnt that though C was old, it was still of consequence. I learnt of the Linux world.
I messed up my computer quiet a few times, since with great power comes great responsibility. Around this time I started tinkering with AI and so Ubuntu supported me with it's amazing community and support.

Linux Mint

With simplicity came elegance. After a while though Anurag recommended Mint. A cleaner version of Ubuntu in my view. While Ubuntu is great for the person new to the Linux world, it is a little too much on the helping side. It is like the overprotective mother. Mint on the other hand is just right in my opinion. A bit of class and not too helpful. Plus all the niceness of Ubuntu is just a few keystrokes away.

What I particularly liked was the color scheme and the defaults in Mint. It was simply put, easy on the eyes. Mint was where I spent a lot of my learning time. This is the OS that was running on the laptop when I discovered git, python3, virtualenv, irssi and many more such gems.

After a while though, this too felt cumbersome. My progress in the linux world had stopped. There was nothing new to do. There were no new experiences to be had and no new areas to explore.

Archlinux

Along came Archlinux. One day when I still had Mint, I was chatting away on IRC and someone recommended that I go through the rute book(found here) and also that I install Linux From Scratch. As a counter to that another said that Archlinux was good from that perspective too.

The next day I was downloading Archlinux and preparing to install on my computer. The installation took 3 weeks. Turns out that Ubuntu and Mint hide away the details of how a linux box works. There was simply too much I did not know. It took me three weeks to obtain the prerequisite knowledge required to install Archlinux and to practice on virtual machines.

That said, Arhclinux is the best I have come across till date. Simplicity is the highest sophistication.

Wrapup

One still does miss the motherly touch of Ubuntu, and the bumbling clumsiness of Windows; but those are in the past. Hopefully I will try out BOSS linux next and see what it has to offer. Fingers crossed.

Tuesday, September 22, 2015

Understanding Websites

Understanding Websites

This article makes some gross assumptions about the Internet simply in order to
allow a reader completely unversed in the technical literature to understand
what the Internet is. That is because we can only define what we do not know
with what we know

The Internet is a phenomenon. It is the single largest network of information
in the history of the world. Now, it is highly misunderstood as the World Wide
Web. You see the WWW is simply a part of the Internet. Let us get started then.

Our topic of discussion revolves around websites.

website
ˈwɛbsʌɪt/
noun
noun: website; plural noun: websites; noun: web-site; plural noun: web-sites

    A location connected to the Internet that maintains one or more web pages.


If computers are talking what language are they talking in? Binary is the base
language for all computer communication. Think of binary as alphabets. Grossly,
if you are speaking in English, Spanish, French etc. you are using the same
alphabet. That is what computers are doing. They exchange information in
binary.

If we think of binary as alphabets, it comes to mind that how is the language
structure defined? One can associate protocols as language structure.
Iklsdfnnf lsliisejf ljdsknnbb  sldf sjdiielfm sd f jsdfieflsfjd ssaopqrjefsdfn.
Lost me for a bit there? Exactly. If computers did not know what the other
computer was saying this network would be useless. Protocols tell us that
soheimtng is not a correct word and something is. They are convention to allow
computers to convey information to each other. There are lots of protocols
which function over the Internet. Protocols like IMAP and SMTP deal with email
while those like HTTP and HTTPS deal with websites. There are others like FTP
which deal with File transfers.

Websites are information exchanges happening over HTTP or HTTPS. That said,
whenever an exchange happens there are two computers involved. A sender and a
receiver. The method of finding one computer amongst the millions connected to
the Internet is defined in the Internet Protocol(IP). The version 4 of this
protocol (IPv4) tells us that each computer has an address of the form
`xxx.xxx.xxx.xxx` where xxx is a number from 0 to 255.

However when we visit a website we never type in this number which is crucial
to finding the right computer in this haystack. We type in a readable name. The
protocol which allows you to do this is called DNS. When you type in
`google.com` you computer asks it's local DNS server to translate `google.com`
into an IP address.

When setting up a website, this DNS service is crucial otherwise your users
will be stuck typing the IP address into the address bar. This part of the
website building process is buying the domain name. This does not set up the
website for you. All it does is gives you the ability to tell everyone in the
world that `google.com` is actually 173.194.117.64 (go ahead, type that into
your address bar in the browser and you will end up on google)

Buying a domain name gives you the ability to say that `desilingo.com` is
actually machine `xxx.xxx.xxx.xxx`. With that ability you can now take up the role of a server of a website. The server and client of a website are actually machines. There is not special hardware requirement. You could run a server off your laptop for all sane reasons. It is however not advised. Servers are machines which have to run nonstop for months on end(forever theoretically). They tend to be powerful machines requiring special care which the average Joe is not able to offer. Hence we go to a space hosting service.

A hosting service provides you with a computer with a set IP address. The
maintenance of the actual hardware is done by them. They offer things like ((%
uptime; meaning that out of 100 hours your website's computer will be available
99% of the time to everyone in the world. Do not be lured by someone who offers
100% uptime. They are lying. So if your website's computer is somewhere else in
the world how do you control your website? Other protocols are built for such
things. SSH is the most popular choice but others include good old HTTPS. You
control your website via a web interface. Just like you do with blogger.com or
wordpress.

So a website consists of a domain name and a computer to serve your website.
What you serve in a website is the famous Hyper Text Markup Language(HTML). The
most recent version at the time of writing this is HTML5. Writing an HTML
document is a trivial task once you now how to write one. In fact word
processors like Microsoft Word allow you to save documents as `html`. So how
does the world know which file to look for? If you visit the URL
`http://example.com/2015/5/15/diary_entry.html`. You are being served a file called
`diary_entry.html` in a folder called `15` which is in another folder called
`5` which is in turn within a folder called `2015`. These folders are on a
computer identified by the domain name `example.com`

Now comes the difference in static and dynamic websites. Every time you visit
`https://facebook.com` you do not see the same page. If you are not logged in
you see the registration page. If you are logged in you see the profile page.
If the URL is the same how come you are being served a different file every
time? Websites where the URL corresponds to a single file are called static
websites. Websites like Facebook are dynamic.

So in order to set up a website you need a domain name, a server, content to
serve. Some things one should look into are :




Tuesday, September 1, 2015

Ether and light

Dark ether, spread around
no light, yet dark found

some shy, some bright,
these twinklers put up a fight,
against your rage against light.

Woe on the fate of a star,
Their death not known,
for years after their war.

Along comes a demon so bright,
slaying your minions,
o ether against light.

You battle with all your might,
slowly killing this ogre of light,
fifteen days, ether vs light.

only to arise,
feeding on the pain,
of a multitude of starry demise.

This ogre shall rise,
for dark ether, spread around
there is light and so you're bound.