Saturday, January 5, 2013

Life, Universe and Everything...


Today a question popped in my head after watching a video on youtube. A question which is very common and almost every human on this planet should have thought about it once in a while.

"What is the purpose of universe and everything that exists around us?" "Why its there in being? A big fat WHY?"


Credits: Google search


I asked this very question to few of my friends and i received various set of replies. Some of them are like:

1. 
Frnd1: "Why should I care? I am concerned by what happens to myself."
   
Me: "Dont you feel grateful for universe to create you using stardust generated billions of years back? Dont you have curiosity to know about it and what it is upto?"
   
Frnd1: "how will that affect the universe? I cannot make a difference in the being of universe but I can make a difference in my being so better I think about myself rather than wasting my time in thinking about universe."
   
Me: "But how will you make a difference even in your life without setting a goal? And that goal should be something logical. Finally that is also a gift given to you by universe."
   
Frnd1: "I am a very tiny object in universe and there is a probability of having several other Earths and galaxy where someone is doing something"
   
Me: "Take an example of this scooty. Its a solid. It has atoms vibrating at a particular frequncy and maintaining the equilibrium of this body and hence it is stable and it exists. Likewise you are a tiny atom in this universe and you will have to contribute your part in its being. Else equilibrium will break and your existence is in danger."
   
   ... some random discussion over probability rules and mathematics.
   
2. 
Frnd2: "This Universe is created by God. There is a divine power governing the laws of nature and that driving force decides our and Universe's fate"
   
Me: "I respect your views but what about the cosmic history and all the past evidences?"
   
Frnd2: "We cannot possibly know this or else we would have been great sages"
   
   
So before having this discussion I had a point of view. Here goes my understanding:

- Humans came into existence 16 million years back, Earth came 46 billion years back and Universe came 100s of billions of years back. This time period is called cosmic history. So how much part of cosmic history belongs to humans? Its 0.000001%. [Its like we go for a movie and watched just 2 seconds of it yet. We do not know what happened and what's gonna happen]. So before us there were several creatures that existed and got extinct. Several species formed and got destroyed. Asteroids hit, rainfall, ice age, etc. So why this is happening? What's the final product?


Let's look at it as a chemical reaction. Each chemical has a starting product -> an intermediate unstable product -> final product

So the intermediate unstable product obviously doesn't live long enough and soon gets converted to another more stable form. So in case of universe and Earth, many intermediate unstable products formed, destroyed, converted. If we look at our percentage of living we also did not live long enough to be called a stable product yet. So are we a by-product of Universe reaction? How long this intermediate result gonna last? What's there next? If we are the final stable product, didn't it take too long to form it? Is Universe so inefficient? If we are just an unstable state then how should we contribute to be a good final product? What's the purpose of human life and hence What's the purpose and motif of Universe?

Its said that our (Indian) vedas were written by highly learned sages who knew everything. Still they were humans and they found out what happened before in the "so-called movie". They found out and they wrote stories based on accumulated wisdom of ages. I think what our aim can be is to understand the knowledge accumulated till now through vedas, etc and try to contribute to it further.


Credits: Google search


This question is still lingering and its answer is  unknown, hidden in the womb of future.

Tuesday, February 7, 2012

Javascript Cache or Piggy-backing your browser?

This article demonstrates how any particular set of data can be preserved across various screens without creating heavy server objects like session or request. So basically it does not need a server for preserving form values, xhr response, global variables which may be needed across pages.

So how do we achieve the above described functionality without a server? We definitely need a temporary store which doesn’t get destroyed on page refresh. What does not gets destroyed even on refreshing the page and remains on client? Yeah! It’s the client itself. Here, by saying the client we mean the Browser.

Browser window remains even on page refresh and so remains the ‘window’ object. The window object, which is considered as the grand-father of all DOM elements in the beautiful world of JavaScript. So, here we use the window object to attach our key value pairs with it and hence preserving it across the screens since it’s a part of window object now. 

We will point out a bad javascript practice here. Since we are using a property of window object which is currently not used by the page, on actual use of this property our values can be destroyed or over-ridden or they can overload the browser and crash it unexpectedly (too dangerous!). So instead of storing those values in a persistent object, we are piggy-backing the browser memory.


                                win.name = value


But how do we make the data transferrable from one screen to other as raw types? Answer lies in the golden works of Sir Douglas Crockford.
Say it! Its JSON.


                                                   JSON.stringify(win.name) 


We can use our key-value pair to be stored as name attached to window object and on page unload, we can save the values by strigify-ing the json data. After setting this value we can get it anywhere till the session is cleared, hence creating temporary cache storage on client side.

Here is an attached zip file containing a small demo to store values on one page and displaying on other. All JavaScript files are present inside the project. Feel free to use or modify according to your requirement.

 Download the demo project from HERE! 


Inspire:Learn:Contribute

Saturday, October 8, 2011

Tribute to a great leader

Till later part of my adolescence, I was unaware of most visionary figures of the world and several great people who impacted the thinking of human being. During the process of familiarizing myself with technology and computers I came to know about various types of products, current trends, legacies and people behind them.

One of those flawless personalities whom I started admiring was the co-founder of Apple Inc., Steve Jobs. I cannot say anything that the world already doesn’t know about him. But I can certainly count him as an inspiring figure in my career and eventual behaviour development. I see him as a person who binds beauty and divinity with technology. A glorious man to be looked-upon, striving throughout his life to provide classy and complete products.

I was very happy the day when I got selected in my first job interview and my employer gifted me a brand-new Apple iPod as a token of appreciation. I admire the beauty of products that Jobs has made us accessible to.

It’s a great loss to the world but Jobs will always be remembered because of his extremely creative ideas, his humour, his quotes and his motif from life.

Stay Hungry, Stay Foolish!

Sunday, July 24, 2011

@Ascendant

{First things first}. A very commonly used phrase to decide the priorities. So what about your first job? Your first girlfriend? Your first success? Your first failure? Your first countable decision? And so on...

Now lets come to the current context. A day starting with a nice fresh sunny morning, followed by hour long rush of Chennai traffic, and reaching the destination hoping to have a wonderful optimistic start. A group of 15 freshers entering a huge building with almost similar thoughts. A group of people with nearly similar exposure to industry. All of 'em curious to know the next part of the story. All of 'em ready to try new tools provided by the new alma mater.

So here we are at the starting point of a new journey.

{Curtain rises...}
{Welcome speeches and intros...}

So we finally feel at home now with few confusions and differences . We are hired to ascend :P. Though english doesn't seem to be a very common language, communication is over-rated.

Work seems to be fun now with highly caring sprecialists. The crew of strangers became friends.
Seniors will be seniors and will be respected. New sports introduced as a relief to work. And the day starts now with a cup of coffee, ends with a friendly game of table-tennis.

That's it for now!

Inspire:Learn:Contribute

Saturday, February 19, 2011

Finally...Found how to make Win-XP bootable USB

Why would anyone want to install Windows XP from a pen drive??
  1. May be their CD drive isn’t working properly like mine, or
  2. They don’t want to waste money on a CD

More over installation from a flash drive is faster compared to a CD.
Before we go on with the tutorial here’s what you’ll need

  1. 1 USB flash drive, 1GB or larger
  2. 1 Windows XP installation disc
  3. Assorted files that I’ll describe as we go along.
  4. Note: Your BIOS should support usb boot, some older computers may not support USB boot.

Preparing the flash drive
First up, we need to prepare the flash drive.

  1. Download and unzip this file, which should contain 2 folders: 1 titled Bootsect, and the other USB_prep8.
  2. Navigate to the USB_prep8 folder and click on usb_prep8.cmd. This will bring up a Windows console window.
  1. Press any key to continue and a PeToUSB window will open.

  2. Make sure your flash drive is selected, and click start to format your flash drive.
  3. When the format is complete, click OK, but do not close the PeToUSB window or the Windows Console.
  4. Open a new console window by typing “cmd” into the run box in the Windows Start Menu.


  5. Find your Bootsect folder (if you’re not used to DOS commands, you can type “dir” to list directories and files, type “cd foldername” to navigate to a folder name – called foldername in this example, and if there’s a long folder name you can save time by typing the “cd” and just the first few letters and then hitting the Tab key to fill in the rest of the name).

  1. Once you’re in the Bootsect folder, type “bootsect.exe /nt52 g:” if “g” is the letter assigned to your flash drive. If it’s E, then change the letter to e. If it’s Z, make it z. Get it?
  2. When this is done, you should see a message letting you know that the bootcode was updated, and you can close this console window (but not the other console window).
  3. Close the PeToUSb Window, but make sure not to close the remaining console window yet
  4. You should now see a list of 8 options in the console.
  5. Select one and find the drive with your Windows installation disc.

  1. Select 2 and pick a random drive letter (but not one that’s already on your PC, since this will be a virtual drive used for copying your files).
  2. Select 3 and enter the drive letter for your USB flash drive.
  3. Select 4 and follow the rest of the on-screen directions and you should be all set.

The process should take about 15-20 minutes. When it’s done, you should have a bootable USB stick that you can use to install Windows XP the same way you would if you had a CD/DVD drive.
A few notes here. First of all, there’s a chance you may get down to step 15 and the program will tell you that it can’t create the virtual drive. This may happen if you’ve already gone through the whole process and are trying to do it again to fix problems. The solution seems to be rebooting your computer and trying again. Or at least that’s what worked for me.
Second, if you use NLite to shrink/slipstream/otherwise modify your Windows XP installation file, make sure you do not remove “manual installation files,” or your USB stick will be pretty much useless.

Once your usb drive is ready, go to your bios and set USB to first position in boot order. Now plug the usb and restart.

Make sure you back up your important documents and files, firefox bookmarks, and drivers if you lost your drivers cd.