Showing posts with label Technical. Show all posts
Showing posts with label Technical. Show all posts

Thursday, September 23, 2010

Retype Your Password : Why should I ?

I have created countless accounts online, needless to say that i use only a small fraction of them in reality. In the process of creating these accounts i would have filled hundred if not thousands of forms which say Type your password in one row and Retype you password in the succeeding row. But I had never ever seriously analyzed  as to what I gain and what I loose by Retyping my password.

Recently I created an account and happily filled the Type your password and Retype your password fields in the form. I browsed the site that day. Few days later I tried to login to the website. "The username and passwords don't match" the server scowled at me. Bingo!! I tried few combinations, but all in vain. Rather than trying to recover my password, I set about to understand what had actually conspired against me.

And here goes my story : (Read this paragraph at the end)
What had actually happened was that I had mistyped my password. That's fair enough as all of us make mistakes. But what saddens me is that i had mistyped while retyping the password. Thats also acceptable though rare. But what interests me is that in both the cases my typos were same. So the poor system assumed that, what I typed was the actual password. And there I was blissfully ignorant of the my blunder. It would have been a tedious process to regain my password, if I had tried. But I didn't as I was busy analyzing what had happened and I was content with what I was doing.

Now lets analyse all the scenarios that arise in this context and see whether the extra effort we put in retyping the password is worth  it. There are four scenarios.
Password[P] Correct Password[P] Wrong
Retype Password[RP] Correct Case I
(P = RP)
Case II
(P != RP)
Retype Password[RP] WrongCase III

(P != RP)
Case IV 

(P = RP)  OR (P !=RP)
   V                   VI



Step 1 : Enter your Password
Step 2 : Retype your password

After completing Step 2, we can't differentiate between case I and V. After step 2 we also can't differentiate between Case II, Case III and case VI


Case I : Both Password and Retype password are correct - OK Scenario
Step 1 : The password is correct. So there is no need of Step 2, but since we don't know that password is correct we go to Step 2. That is where are trying to eliminate Case II here. But in the process we are creating chances for Case III, which is an unfavorable one.
Step 2 : Retype your password is also correct.  Hence we ended up in case, but we could as well have ended up in Case III.

Case II : Password is wrong and Retype password is correct - Ideal scenario
Step 1 : The password is incorrect. So in the absence of Step 2, your account would have been created with wrong password.
Step 2 : Retype your password is correct and hence you catch hold of the error in Step 1. But we could have as well ended up in Case IV

Case III : Password is correct but Retype password is wrong - A bad scenario
Step 1 : The password is correct. But at this step since we don't know that, we proceed to Step 2
Step 2 : The Retype password is wrong. Oooops though the password in Step 1 was correct we ended up in Case III and we will have to create our login again.

Case IV : Password is wrong but Retype password is wrong - A good/dangerous scenario
Step 1 : The password is wrong. Good that we have step 2
Step 2 : The Retype password is also wrong. Shit how could we mistype in second attempt also.

Now this is where this particular case gets interesting, if the typos in step1 and step 2 are different then we are saved and we have good scenario. It the typos in step 1 and step 2 happen to be the same then we are in for a toss. That's dangerous situation. Because we end up in what we tried to avoid. We will be erring with more confidence that we are right, which i think is more dangerous.

This is just the common sense analysis, the mathematical analysis with the use of probability shall follow ...




Tuesday, September 21, 2010

Google instant : Change the way you search

The google instant was an instant hit. The proof was instantisation of google maps, youtube,bing so on and so forth. So now we have moved from instant coffee and  instant chats to instant search. Googling has easily become one of the things a internet buff does on a regular basis. Whether you are looking out for a location in a google map, searching for a nice hotel on burp.com or searching for an instant video on youtube what you are doing basically is search. So making google(read as search) instant definitely goes a long way in saving a lot of time.

But what baffles me is with bigwigs like google, microsoft and yahoo fighting for monopoly over search(as it is the gateway to the world of lucrative business namely internet), what took them so long to instantise search. The only reason that comes to my mind is lack of resources. In place of one hit/query on the server, the current instant google will hit the server more than 5 times for an average query. So that's like saying that the google servers must be five times bigger in capacity or five times efficient in handling the search queries. That might seem to be  asking for too much but still that seems to me like a lame excuse these bigwigs can give.

The unusual spin off of google instant is that Japanese addresses are showing more quickly on google instant maps than its counter-part western addresses. Let's find out the reasons but first lets understand the japanese addressing systems. Japanese addresses reflect the primacy of the group in Japan. They proceed from the general (the prefecture, or Japan itself for mail to Japan) to the particular (the addressee). So the general address looks like this


107 Tokyo-to, Minato-ku,
Akasaka 1-chome, 
10-ban, 5-go, 
Watanabe Kazuo


It starts from the generic address Tokyo and moves to the specific addressee name Watanabe Kazuo in the order. Japanese got lucky as their addresses work the same way as google instant does.

Google instant is a Progressively Refining Search(A term i have come out with). Put in simple terms, with each keyword enter your search gets refined. So you can see your search getting refined with every typing letter. There are two ways you can build your search query now.

  1. Start with the most specific term and then move to the generic term.
  2. Start with the most generic term and then move to the specific term.
The first method is the traditional way we use to search. An ex : The famous hotels in bangalore,India
This is how our search queries used to be till now. Lets analise this under the current google instant search. The moment you type good google is confused as to what get for you as there are many things which are good. then when you say hotels it tries  get you hotels from all over the world, whereas hotel in bangalore was what you were looking for. :( 

The second method is the query suited to google instant. Since google instant is a Progressively Refining Search, starting with the most generic term and then moving to the specific term goes with the flow and you can see the search results getting better as you type. So now our search query will be India bangalore hotels famous. So when you type india google will fetch results only from india, and as you type bangalore the results will be refined for banglaore, and when you type hotels it gets you the list of hotels in banglaore. So as you keep typing your query the search keeps getting refined. ("Hotels, India bangalore good" may be a more efficient query)

So the next time you are googling my name remember the query has to be India,Karnataka,Bangalore,Mindtree Gokul

Caveat : There are exceptions to this rule. Comment on this post if you want to discuss. But remember that it still holds good if you are looking out for a geographical location.




Tuesday, April 6, 2010

A macro in Office Outlook to export mails

There’s no honour in working hard inefficiently. Only disgrace.

I read this somewhere on net. So I thought, why not make my daily chores like sorting and clearing my inbox more automated and less time consuming. Hence I wrote a code snippet that saved me a lot of time and effort. And moreover it made me happy everytime i ran the script. ;)

What the script does : It send all the mails in the folder "Nice" under "Inbox" to an email id of your choice and then deletes them from the folder "Nice".



Steps to set up this in your Outlook
1.) Goto Tools->Macros->Macros or Alt+F8
2.)Type Macro name as ExportToGmail and click on Create
3.)Microsoft Visual Basic Editor will open up.
4.)Copy paste the below code in the appopriate place for the Sub ExportToGmail()

==============================================

Sub ExportToGmail()


Dim objOutlook As New Outlook.Application
Dim objNameSpace As Outlook.NameSpace
Dim objInbox As MAPIFolder
Dim objConvHist As MAPIFolder
Dim objMail As MailItem
Dim myFolder As MAPIFolder


'Get the MAPI reference
Set objNameSpace = objOutlook.GetNamespace("MAPI")


'Pick up the Inbox
Set objInbox = objNameSpace.GetDefaultFolder(olFolderInbox)
Set myFolder = objInbox.Folders("Nice")


For Each Item In myFolder.Items
Set mailToSend = objInbox.Items.Add


With mailToSend
.Subject = Item.Subject
.Body = Item.Body
.To = "ABC@XYZ.com"
.Send
End With


Item.Delete
Next Item


MsgBox "Your mails from folder NICE are exported to Gmail", vbInformation, Oops
End Sub

===============================================
5. Change the (.To =) from ABC@XYZ.com to your mail id. and save the code. (Mail Id should be in double quotes)
6. Create folder called "Nice" below inbox in your outlook. If you want to change the name of the folder, change the entry in the code respectively.
7. Move all the emails that you want to export to the folder "Nice" .
8. Now go to Goto Tools->Macros->Macros or press Alt+F8
9. Click on the ExportToGmail() Macro in the list and click Run

If you want to use this macro regularly just let me know. I will explain how to create an icon on Outlook for the same. So that you can export all the mails in the folder just by a click of the mouse.

Wednesday, February 24, 2010

What did the Diode say to me...? (Electronics and Life - Part II)


1.) In diodes current is directly proportional to the Voltage applied.

It says the output is directly proportional to the input. If Current is the results you get and Voltage is the efforts you put, it says Results that you achieve are directly proportional to the efforts you put.

Success is directly proportional to the efforts you invest.

2.) In diodes the current is not linearly related to voltage, like in a resistor.

In life the outputs are not linearly proportional to the input. And the type of non-linearity varies from one to another.
You cannot expect to get 50% of the results when you put 50% of the required efforts.

Success is not linearly proportional to  the efforts you put in.

3.) The combination of Property1 and Property 2.

The combination of Property1 and Property 2 is an important lesson to be learnt in life. If we know these two properties in separate and their impact when put together, we can lead a contented, successful life.


Success is directly proportional to the efforts you invest. But it(success) is not linearly related to the efforts you put in.

4.) When the applied voltage is less the cut-in voltage, no current flows through the conductor.

When you set out do something, don't expect the results right from the beginning. There is a time till which you have to just keep putting in your efforts, without looking at the results. Analising  your return-on-investments before that will only lead to you to develop a pessimistic outlook towards life.

For every assignment or enterprise, there is cut-in efforts value, below which you cannot expect any results.

5.) Once the applied voltage crosses the cut-in voltage, current flow through the diode becomes exponential.

Once the amount of efforts you have put crosses the cut-in efforts value, the results become exponential with respect to the efforts input. Though in real life the results may not become exponential, they are bound to increase drastically. This point is generally known an tipping point.

Beyond the tipping point, the Return-On-Investments increases substantially.