CopyRight

If you feel that any content has violated the copy-Right law please be free to mail me.
I will take suitable action.
Thanks

Saturday 27 April 2013

Prime Numbers

PRIME NUMBERS Big Deal,Huh?


Prime Number is a natural number which has exactly two distinct natural number divisors1 and itself.

You can most probably figure out the first 10-15 primes by yourself manually. But then,here we are talking about Programming , writing code. So, the first thought that would have come into your mind  would be that of "Brute Force" approach !
Actually , you are right in thinking that checking every number till n [ n is our number till which we have to collect all primes] and dividing it by n-1 numbers to check weather it is divisible or not and so on. Brute Force as it's called.

But frankly speaking the complexity of this code/algorithm would be quite high and you don't want to that unless you don't understand the term  Complexity.

So, here comes the Savior The sieve of eratosthenes .
This algorithm is pretty straight forward and doesn't require nuclear science brains or any other brainstorming session for it's implementation.

Pseudo-code ! 
Input: an integer n > 1
 
Let A be an array of Boolean values, indexed by integers 2 to n,
initially all set to true.
 
for i = 2, 3, 4, ..., n :
  if A[i] is true:
    for j = i2, i2+i, i2+2i, ..., n:
      A[j] := false
  
Now all i such that A[i] is true are prime. 


The above Image very well illustrates the Algorithm. :)

Still have Doubts.?
This video may help I guess.


Hope your  fear of Prime Number has been conquered a little , but Believe me you are in the right direction of winning the battle.

For more such posts please comment or mail me the topics and I am happy to help. Don't orget to subscribe!  

Wednesday 10 April 2013

14 Interesting Facts About Google


14 Interesting Facts About Google

#1
The prime reason the Google home page is so bare is due to the fact that the founders didn’t know HTML and just wanted a quick interface. In fact it was noted that the submit button was a long time coming and hitting the RETURN key was the only way to burst Google into life.

#2
Due to the sparseness of the homepage, in early user tests they noted people just sitting looking at the screen. After a minute of nothingness, the tester intervened and asked ‘Whats up?’ to which they replied “We are waiting for the rest of it”. To solve that particular problem the Google Copyright message was inserted to act as a crude end of page marker.

#3
One of the biggest leap in search usage came about when they introduced their much improved spell checker giving birth to the “Did you mean…” feature. This instantly doubled their traffic, but they had some interesting discussions on how best to place that information, as most people simply tuned that out. But they discovered the placement at the bottom of the results was the most effective area.

#4
The infamous “I feel lucky” is nearly never used. However, in trials it was found that removing it would somehow reduce the Google experience. Users wanted it kept. It was a comfort button.

#5
Orkut is very popular in Brazil. Orkut was the brainchild of a very intelligent Google engineer who was pretty much given free reign to run with it, without having to go through the normal Google UI procedures, hence the reason it doesn’t look or feel like a Google application. They are looking at improving Orkut to cope with the loads it places on the system.

#6
Google makes changes small-and-often. They will sometimes trial a particular feature with a set of users from a given network subnet; for example Excite@Home users often get to see new features. They aren’t told of this, just presented with the new UI and observed how they use it.

#7
Google has the largest network of translators in the world

#8
They use the 20% / 5% rules. If at least 20% of people use a feature, then it will be included. At least 5% of people need to use a particular search preference before it will make it into the ‘Advanced Preferences’.

#9
They have found in user testing, that a small number of people are very typical of the larger user base. They run labs continually and always monitoring how people use a page of results.

#10
The name ‘Google’ was an accident. The original founders were going for 'Googol', but ended up with 'Google' due to a spelling mistake on a check that investors wrote to the founders.

#11
Gmail was used internally for nearly 2years prior to launch to the public. They discovered there was approximately 6 types of email users, and Gmail has been designed to accommodate these 6.

#12
They listen to feedback actively. Emailing Google isn’t emailing a blackhole.

#13
Employees are encouraged to use 20% of their time working on their own projects. Google News, Orkut are both examples of projects that grew from this working model.

#14
This wasn’t a technical talk so no information regarding any infrastructure was presented however they did note that they have a mantra of aiming to give back each page with in 500ms, rendered.

Source : 14 Interesting Facts About Google

The Google reCAPTCHA Project

The Google reCAPTCHA Project

The reCAPTCHA was originally created by Luis von Ahn, Ben Maurer, Colin McMillen, David Abraham and Manuel Blum and Google acquired it on September 16, 2009 for $27million.

We have all come across the ubiquitous captcha - the colourful images with distorted text - a reverse Turing test of sorts. These work because no algorithm at present can read distorted text as well as we humans do. However not all the distorted texts are unreadable by machines. About 200 million captchas are solved everyday, amounting to more than 150,000 hours of work each day. Considering the numbers involved, a safe captcha generation system was needed. Enter Google reCAPTCHA. To make a positive use of this immense human effort, the reCAPTCHA channels the effort spent solving captcha online into 'reading' books.

To archive human knowledge and to make information more accessible to the world, multiple projects are digitising physical books that were written before the computer age. The book pages are photographically scanned, and then transformed into text using "Optical Character Recognition" (OCR). The transformation into text is useful because scanning a book produces images, which are difficult to store on small devices, expensive to download, and cannot be searched. The problem is that OCR is not perfect.

reCAPTCHA improves the process of digitizing books by sending words that cannot be read by computers to the Web in the form of CAPTCHAs for humans to decipher. More specifically, each word that cannot be read correctly by OCR is placed on an image and used as a CAPTCHA. This is possible because most OCR programs alert you when a word cannot be read correctly and this also ensures that the image is unreadable by machines.
But if a computer can't read such a CAPTCHA, how does the system know the correct answer to the puzzle? Here's how: Each new word that cannot be read correctly by OCR is given to a user in conjunction with another word for which the answer is already known. The user is then asked to read both words. If they solve the one for which the answer is known, the system assumes their answer is correct for the new one. The system then gives the new image to a number of other people to determine, with higher confidence, whether the original answer was correct.

The system has been reported as displaying over 100 million CAPTCHAs every day, and among its subscribers are such popular sites as Facebook, TicketMaster, Twitter, Craigslist, and StumbleUpon. The Google reCAPTCHA project is astonishingly elegant and amazingly simple!

sources:
What is reCAPTCHA?
reCAPTCHA