Home

This is Not a Brain Surgery

Jan. 21st, 2008

02:24 pm - Google, Yahoo, Microsoft and MapReduce

1. MapReduce is a software framework invented by Google.
2. Hadoop is open source implementation of MapReduce, supported (in part) by Yahoo.
3. The most coherent description of MapReduce I read so far, could be found in the paper from Microsoft.

Nov. 3rd, 2005

03:28 pm - teaching kids to program

My daughter is 13 years old. Her science teacher recently told me that I should teach her some programming - it should help her to develop some reasoning and logic skills which would help her in her classes. Now, let me get straight to the point - should I teach her Scheme or Haskell?

Mar. 14th, 2005

02:52 pm - complexity of programming and Haskell

Terrence Brannon: "Haskell puts the complexity of programming in the right place".

Tags:

Sep. 23rd, 2004

08:28 pm - GLAT, 1st puzzle solution

In comments to my solution to previous Google challenge, somebody gave me a link to Google Labs Aptitude Test, which was recently published in some magazines.

Today I decided to tackle the first puzzle. It says:

Solve this cryptic equation, realizing of course that values for M and E could be interchanged. No leading zeroes are allowed:
WWWDOT - GOOGLE = DOTCOM

There are several ways to solve this:

1. Find solution on the internet (using Google)
2. Find a web application solving this kind of problems
3. Solve the problem manually
4. Write the code solving this class of the problems (even if it takes much longer than any of above)

For me, approach number 4 is the most natural. I immediately recognized this as another opportunity to exercise in Haskell programming.

The result is [('C',4),('D',5),('E',6),('G',1),('L',0),('M',3),('O',8),('T',9),('W',7)] and this time I decided to publish my source code (I am still learning Haskell, so it is far from perfect). I do not care about performance, I was more concerned with clarity of the code, so on my Powerbook G4 it takes around 22 second to find the answer. Also, it finds only first of possible solutions. It should trivial to modify the code to find all possible answers.

Current Mood: accomplished

Jul. 10th, 2004

10:32 pm - google challenge - part 2

After solving anonymous challenge yesterday, I've spend little more time on second puzzle and was able to solve it.

As I have suspected it was ploy by Google to find potential employees. Friend of mine told me that he thinks it is unethical to publish answers openly. I do not feel so. I posted first one because I was little disappointed to find second puzzle after solving the first one. But I am posting this one consciously, because it was open challenge (how more open you can get compared to posting billboard at the side of highway 101!). I worked hard to solve this, and do not see why I should hide results of my work.

I do not think that finding these answers on the net and using them to get to interview at Google will help anybody to get job there. There are other tricky questions they always can ask on the interview, and you will not be able to look them up. Even if you would somehow pass the interview without possessing skills Google thinks these challenges helps to identify, without them, you will not be able to do the job. If you will, that means that challenge is useless anyway, and it checks for skills which do not really matter (this is what I personally think by the way). Since I am personally not looking for job at the moment, I also do not care about competing with fellow engineers for position at Google.

I do not think the answer will be kept secret much longer. Today I was able to fine solution to 1st part posted on the net. I checked with google search yesterday, and it did not found it back then. Now it does. It is just matter of time until this, 2nd answer is posted.

So, the only reason to hide this answer is not to spoil the fun of solving it to other people. So if you do not want to know the answer for second (and final) puzzle, please do not read further.

SPOILER: Again, small Haskell program helped me to find missing number 5966290435, which like previous ones have sum of digits 49 and could be found in sequence of digits of 'e'.

12:05 am - first 10-digit prime found in consecutive digits of e

Recently riding my motorcycle on highway 101, south of San Francisco I've noticed big advertisement poster:

first 10-digit prime found in consecutive digits of e

(I stole the picture from some later post in spanish who also found the number. When I worked on this, google search did not find any results for this puzzle).

Out of curiosity I decided to find out what it is. Since I am still learning Haskell, I decided that that would be nice Haskell exercise. It was nice exercise indeed, in course of which I have learned more about Haskell and things like Rabin-Miller Probable Prime Test and Spigot Algorithm

Well, I did it and was able to find number. I went to the site, expecting something exiting, but it just says "Congratulations. You've made it to level 2" and offers next puzzle. Frankly, without knowing what it is about (I guess this is a new way to screen employees) I am not very inclined to spend more time solving their puzzles. Also, the next puzzle they offer is of kind I detest: trying to find next number in sequence. I hate when people ask something like this on interviews.

So, being dissapointed for being sent to wild goose chanse without any gratification, I decided to share the answer to their first problem. I hope search engines pick up this page soon and they will have more potential candidates knocking on the door of their second level.

The prime they were asking for is 7427466391.


I will apprecite if somebody who will get through all their puzzles will tell me what it was about.

UPDATE (September 2004): I would like to thank all of you who took their time to let me know that this is Google recruitment campaign. After solving second part of the puzzle I was able to see that for myself. So if you are looking for the answers: your got them right here. You are welcome to read the rest of my blog (or even subscribe to new posts with RSS).

Current Mood: accomplished