Welcome to my blog!

Meet the Author

Ut eleifend tortor aliquet, fringilla nunc non, consectetur magna. Suspendisse potenti.

Looking for something?

Subscribe to this blog!

Receive the latest posts by email. Just enter your email below if you want to subscribe!

Showing posts with label tech. Show all posts
Showing posts with label tech. Show all posts
Prelude:
Until the late 19th century, people produced their own power. They connected their horse, windmill or water wheel to run their own machines. However, in the late 19th century, power plants were invented to produce large amounts of power in a single unit and transmit to every home. Now, you no longer need to run your own power generator like in the picture above or move your muscles to grind stuff. You could just flick a switch.

Cloud computing is doing to computing what power plants did to power production 150 years ago. Just like the farmers above, we are still running big computers at our home - to store data, run software etc. Your PC is as powerful as the ones that sent a spaceship to the moon 45 years ago. Why do you need such a powerful computer at your home? What if you could move all these computers to some remote location and through a wire just access relevant data at the right time to your iPad or phone?

The revolution in electric power production changed the world. In the same way, this change in computing could produce a big change in the way thing work. 

What is cloud computing?

To start simply, think of cloud computing as using someone else's computer. For instance, if you are using Gmail, you are storing your mails on Google's cloud. Your emails are not in your local PC, but in Google's hard disc.  If you are storing files on Dropbox, you are keeping your files on Dropbox' cloud. Or think of what happens when you play a video on Youtube. All the movie files are in Google's computers while you are able to watch them 1000s of miles away from it.  In short, a cloud in this case refers to a group of connected machines with storage drives and processors that becomes an extension of your local computer.

Each of these companies have large data centers that look like factories with millions of computers kept in endless racks. Look at one of Google's data centers below [each blue light is a computer]. It could consume as much power as a small hydroelectric power station could produce. 

Millions and millions of such computers are kept in the data centers where your emails are stored and various processes run - like when you search for something on Google. Like Google, all major companies run their own data centers - Microsoft, Yahoo, Apple, Amazon all have their own stack of computers in such "factories".

Why is there a big talk of cloud?

Previously, companies and consumers just bought their own computers and maintained it. You will use your PC to store all your songs, videos, files etc. In the same way, your company will maintain its own servers for storing all the company's documents. 

This process is inefficient as maintaining computers is expensive. You need to do all the hardwork like periodically buy new computers, update the OS, secure the system and back data up periodically. 

Do you produce your own electricity or farm your own food? So, why do you need to buy your own computers, when all you need is information?

Just like a power plant takes care of all the machines to just help you final output - electric power - a cloud computing company takes care of all physical computers so that in the end I just need my information. This makes a huge improvement to businesses. In the startup I cofounded, I use 8 servers and none of them lived in my office. These were all in Amazon's datacenters and they just "rented" these computers on an hourly basis. I could store information and run all the processes, while they care about buying hardware and taking care of security.

This is fundamentally altering the way in which computing works. A range of new companies is coming to help companies manage their data without having to buy hardware for it. 

In what ways is a cloud relevant to you:

  1. Store information: Previously, we used to just save files on our local machine. However, if you had to share with other people, we had to do clunky things like zipping it & sending it via email. Now, we could just store these files in the "cloud" [aka the computers of Dropbox] and send the other person just the link. Even if your PC dies, you can always access the data from Dropbox. Enterprises generate massive amounts of data and now many of them are using the cloud as it reduces their need to buy massive servers.
  2. Access content: It helps you use content without storing anything on local computer. For instance, when you play a video on Youtube, your harddisk space is not affected at all as the video exist within one of Google's data centers above.
  3. Run processes: A computer is a machine that computes. For instance, at my startup Zingfin we had to collect millions of tweets a day and run mathematical calculations to find out which of the tweets were saying negative about a particular company. That software I wrote lived in a computer somewhere in Amazon's Virginia datacenter and kept running. All I had to do was pay Amazon per hour. 
  4. Access on demand: Here is the kicker. Does your power usage vary? Most likely yes. When you are out of home, you won't need much power compared to when you are having your AC, Vacuum, Fridge and Oven on. When our power consumption increases, the consumers don't need to spend buy a new power plant, but just pay for the increased usage at that time. The power utility intelligently manages the load. In the same way, with cloud computing organizations can get 100 computers on demand when they need it and pay for only usage. This is why cloud computing is getting so much attention nowadays.

Types of cloud

  1. If the cloud [aka a bunch of computers in a datacenter] is open to all public, then it is a public cloud. For instance, Gmail is open to almost anyone and your emails might be stored in the same harddisc in a Google's datacenter as mine. This is very efficient as Google could save as many emails as a hard disc could hold and then when it fills use the next hard disc. Because of the high level of resource utilization,  this is typically the cheapest kind of cloud access.
  2. Many companies are leery of having their data sit with other people's data on the same machine. If you are the CIA, you might not like your data files stored in the same hard disc as Russia's KGB. You might want dedicated computers that stores only your files, even if the hard disc is mostly empty. If the cloud is made for a specific company then it is termed a private cloud. Even if Google or other data providers gurantee security and privacy, it is not sufficient to big enterprises or hospitals. In a private cloud, all the connected machines in a unit are dedicated to one company and it is not open to anyone else.

Look at some pics of awesome datacenters:
Stunning Photos Of Google's Massive Data Centers 

Some of my posts on Cloud Computing: CloudTweaks.com
Balaji Viswanathan
Time to decode the Barcode!

Let's start from something which you would be already knowing. All Barcodes look similar - atleast when viewed from distance. They have the same alternating black and white lines (always). Plus there is one more similarity - there are exactly 95 lines of those. 

So let's build on from here. There are 95 columns evenly spaced. Some columns appear thicker when a group of columns are of same color, both black and white. See the top of the figure below




Next, when the laser light falls on these set of parallel lines, the white lines reflect most of the light while black lines don't. Now computers can understand only two numbers either zero or one. So it treats no light lines as ones and all light lines as zero - ya it is a bit less intuitive, but it is.

Time to go into more detail now.


(image source - Wikipedia )

The first line reflects none of the light (or very less light) - Hence assigned the digit 1. The next line reflects almost all light - hence assigned 0. In the same manner all columns are assigned the numbers. Total assignations  - 95. Note these numbers are different from the one actually put below. After this, these 95 numbers are grouped in 15 different sections. 12 of these sections are used for the actual visible numbers and rest 3 acts as guards - Left Guard, center guard and right guard. You can see that in each bar code the left, right and the center are similar.

The patterns for the left side code are shown below -



The pattern for the right side is similar except that it has even number of 1s. This helps the computer to figure out which side is left/right, in case the product has been turned upside down! There is one more check for this. All the codes for the left side begin with a 0 while for the right side they begin with 1, leaving the guards.




Each of the above 6 vacant spaces on either side represents the numbers you see on the bar code. 

Okay now we have got the numbers, what do they mean actually?

1. The very first number decides the type of product - Standard, weighted items, pharmacy, coupons etc.

2. The next 5 set of numbers tells who the manufacturer of the product is.

3. The next 5 set of numbers tells the product code.

4. Finally the final digit, is called Modulo check character. It is used for error checking. It is an important number and functioning is explained below.

To get the Modulo check character

Add all the digits at odd places. There are 11 digits (leaving the Modulo number)

So for the above figure it is 

0+6+0+2+1+5 = 14 : Multiply it by 3  to get 42

Now add the even digits: 3 +0+0+9+4 = 16

Add both: 42 + 16 = 58.

Now the modulo check number is got by subtracting this from the next higher multiple of 10. Here 60 - 58 = 2 --> The Modulo number.

This is how the scanner verifies whether the code is correct or not.

Now does barcodes have information on price?

Yes, but not directly. After scanning the barcodes, the scanner sends
the code to a central computer and from there it fetches up the price. By this the price of the product can be changed accordingly at the central Point of Sale computer.

Some interesting facts.

The bar codes were originated from the Morse code. By extending the dots and dashes vertically.

Before putting it on the packets, at one point of time, Barcodes were put inside the packet! After that it was found to be much easier to print it on it.

The first scanning of bar code took on Wrigleys' chewing gum.

There are over a hundred of different bar code types invented, however, only a half-dozen are used regularly.
Raj Arjit