Tuesday, January 27, 2009
Friday, July 18, 2008
Wednesday, February 20, 2008
Climbing Mount Hamilton
Thursday, February 14, 2008
Reputation and DUI
I love reputation based systems like eBay and wikipedia. It's a good way to build trust and fight spam. I personally wish there was an easy way for people to have a publicly visible reputation that was influenced by anyone. Imagine a world where people could easily point their cell phone at you and give you a plus or a minus vote. If you let someone merge in, the other driver can give you a small star. If you stop and help someone with a flat tire, you might get lots of stars. If you cut people off or cheat on the carpool lane, you get bad karma. That's similar to PageRank. We all look at reviews for movies, restaurants, books, hotels, etc. And we look at the star rating on youtube, netflix, etc. Why not have it for people? There are now web sites that do this for professors and classes at universities. An open reputation based system is so much more effective than the usual student reviews for university faculty. Now imagine we did that in the office for everyone.
Why not have a rating on this very blog post?
Friday, November 09, 2007
Brazil and a Blog Post
In other news, I'm going to Brazil in a week. I'm really looking forward it to. And it looks like I'm going to get a chance to watch a football game at the Maracana (largest stadium in the world)!
Wednesday, October 31, 2007
Busy week at work
- My 20% Farsi keyboard launched on Monday. It's now listed in the Gadget directory. I've also embedded the gadget below.
- We finished up a project that made some backend changes to Gmail. Nothing user visible, but some invisible things are now better.
- OpenSocial is finally announced. It's launching on Thursday!
Monday, October 29, 2007
Searching Google in Farsi
Monday, October 15, 2007
Do you have a racial bias?
Wednesday, October 03, 2007
Further Reading
Google Talk Servers - CS 212
Google Search - CS 211
- PageRank
- Original paper by Larry & Sergey
- PigeonRank
Links to papers on some of our distributed systems infrastructure:
Links for info about resumes and interviews - SHPE Talk
More videos from other Googlers.
Lessons in building scalable systems
Since launching Google Talk in the summer of 2005, we have integrated the service with two large existing products: Gmail and orkut. Each of these integrations provided unique scalability challenges as we had to handle a sudden big increase in the number of users. Today, Google Talk supports millions of users and handles billions of packets per day. I will discuss several practical lessons and key insights from our experience that can be used for any project. These lessons will cover both engineering and operational areas.
Reza Behforooz is a Senior Staff Engineer at Google and is currently the technical lead for the Google Talk servers. He's passionate about building large systems and working on communication products in an attempt to make the world a smaller place. While at Google, he has primarily worked on Google Talk, Gmail, orkut, Google Groups, and shared infrastructure used by several Google applications. Reza holds a BS from Cornell and a MS from Stanford in Computer Science. Prior to Google, he held various engineering and management positions at Microsoft and two startups, Zaplet and Epiphany.
Monday, June 18, 2007
Monday, June 11, 2007
Square Cake Puzzle
Friday, May 18, 2007
Saturday, March 10, 2007
Science Fridays and rapper at Google
His blogs also describe a cool tradition in our NY office: Science Fridays. It looks like a lot of fun. I love the microwave experiment. It also reminds me of antigravity experiments done by a friend (and fellow Googler) JJ Furman.
Wednesday, February 28, 2007
Working together
Wikipedia is the open source software model applied to a writing a collaborative encyclopedia. It works well.
The Oxford English Dictionary had a similar start. From 1857 to 1928, thousands of people sent examples of word usage not in their dictionaries. A few editors complied this into a dictionary. Sounds pretty similar to wikipedia to me, but with more primitive tools.
Was this the first example of this model? Do you know of other examples? Why is it that we don't see this in more artistic fields, i.e. composing music?
Monday, February 19, 2007
Great Book
Sunday, February 11, 2007
Funny book review
http://neopoleon.com/blog/posts/13725.aspx
Monday, February 05, 2007
A fun puzzle
For any random distribution of cars, if someone looks at the road from above they will see different pockets of cars going together. For example, assume the cars are going in order: 5 (back), 3, 1, 7, 8, 10, 4, 2, 6, 9 (front). We have 4 pockets. 5, 3, 1 travel at 10mph. 7, 8, 10, 4, 2 travel at 20mph. 6 travels at 60mph and 9 is speeding ahead of everyone at 90mph.
Now, assume we have N cars and consider all random distributions.
Question 1) On average, how many pockets are formed?
Question 2) What's the average size of pocket?
In the example above, it's (3 + 5 + 1 + 1)/4 = 2.5
I'll reply with possible answers and also a funny story about this puzzle.
Sunday, January 28, 2007
Beautiful mountains
Wednesday, January 24, 2007
Stop, and think of a better way
Example 1
Let's look at sorting. Most people know how to sort cards they receive when playing cards. Most people use "insertion sort": starting with nothing, they pick (or insert) one card at a time in its right place. It works well when you have 10 cards to sort. But it really doesn't work when you have a hundred or so. One of the things that we learn a lot in CS is how to quantitatively evaluate and compare different ways of solving a problem. In insertion sort, at each step, one has to compare the new card with all the cards currently being held. For example, the last card is compared with every single card that was previously picked. The math is a little tedious (or obvious depending on your background), but given n cards you end up with n x n or n^2 comparisons. So sorting 100 cards this way requires 10,000 comparisons. And sorting 1,000 cards takes 1,000,000 comparisons. Wow, that grows quickly.
Now, most people don't actually compare the card with all the cards they are holding. At each step, they quickly find the spot for the new card by guessing where it should be and adjusting a little. We all do this when we look up something in Yellow Pages or a dictionary. If we're looking for an attorney in the Yellow Pages, we open up the front. And we quickly adjust our guess by guessing again. A more general version of this is called binary search where you cut the problem in half in every step. Binary search is must faster than linear scan. Again, the math is hard or obvious depending on your background, but binary search takes about log(n). So looking through 1000 sorted things for an item only requires only 10 comparisons (because you reduce the problem to 500 items, and then 250, then 125, 63, 32, 16, 8, 4, 2, and finally 1 -- that's 10 steps), as compared to 1000 for a linear scan. Extending the insertion idea above to use binary search instead of linear scan reduces the complexity from n x n to n log (n). For 1,000 cards, we go down from 1,000,000 to 10,000 comparisons. So these are two different and correct ways of doing the same thing. But one is a lot faster. What's needed is having a way to quickly compare different ways of solving the problem.
Example 2
Here is another problem that shows framing. I like this puzzle. Imagine two trains, 100 miles apart, moving towards each other on the same train track. One is traveling 10mph and the other is going at 15mph. Eventually, the trains will crash. There is a super bee traveling at 20mph going back and forth between the trains trying to get the attention of the train drivers. Let's ignore the time it takes for the bee to turn and speed up again. How many miles does the bee travel in its futile attempt to save the trains? A bad way to frame this problem is start adding up all the distances the bee travels. It's hard to count because the trains are moving and the distance the bee travels keeping getting smaller. I'll let you try to do this on your own time. An easy way to frame the problem is to compute how long it takes the trains to crash: 100/(15+10) = 4 hours. Since we know the bee is moving at 20mph, it's easy to figure out that the bee will need to travel 80 miles in 4 hours.
Example 3
Here is my favorite example. Let's say you're on a boat in a river. You are traveling 20mph up stream. The river itself is moving 5mph. Let's say your hat falls in the river at noon and you only realize that this happened at 12:15. How far is your hat and how long will it take you to go back and fetch it? Your hat is now further up stream than where you dropped it since it's been moving at 5mph. [Stop reading here if you want to solve this.] Again, there is a hard way and an easy way. The hard way is pretty tedious since the river is moving. Knock yourself out if you want to do the arithmetic. The easy way is to change your point of reference. Does it really matter that the river is moving in respect to the trees and the land? The only things that matter here is that the boat is moving 20mph away from the hat for 15 minutes. So the answer is obvious. The speed of the river does not matter at all. Thank you Einstein for relativity.
Now, here is a version of the same problem that's easier for people to understand. Let's say you drop your hat on an escalator while you're walking up the escalator. Assume you drop your hat, climb 5 steps, and realize you need to go back to get your hat. It's easy to see that the hat is only 5 steps below. For some reason, we can abstract away the relative moving of the escalator. It doesn't matter how fast the escalator is going or that it's even moving at all. This is easier for people to understand than the previous problem.
Ok, enough examples! Now get to the point
These examples show a few things. First, it's important to frame the problem correctly, to ask the right question, to look at the minimum amount of facts needed to solve a problem. Second, it's important to be able to quickly compare different ways of solving a problem with each other. It's good to experiment and see what works. If you ever have to make 100 peanut butter sandwiches, it's good to take some time and think of a good way. It can save you a lot of time.
Most importantly, I don't understand how people can repeatedly try a brute force approach at solving a problem. When one is stuck or when things are not working as smoothly as expected, it's important to stop and think about a different way instead of trying the old way. Often, trying random new things is better than persistence and banging your head on the wall. In fact, there is a whole field of Randomized Algorithms based on this idea.
I think in the past couple of decades, businesses understood the importance of these things and that's why we started seeing people with PhDs in science and math in board rooms and on trading floors. Maybe in the next few decades, we'll see a similar trend and emphasis in more social disciplines that so far have focused on the soft skills.
Monday, January 15, 2007
Climbing Walls
The big chase scene in 007 is based on an actual discipline called Parkour. It makes skateboarding look like a sissy sport.
Read more
More videos
Wednesday, November 08, 2006
Getting people to talk
We just launched orkut + Google Talk. I wrote up about it on the Google Blog and the Google Talk Blog. It was a fun project.
Here is a personal story about orkut. I grew up in four different countries so it was usually hard for me to keep in touch with childhood friends. A couple of years ago I found an orkut community for my elementry school and found an old friend from 3rd grade!
My name is Reza and I approve this blog post.
Thursday, October 26, 2006
Thursday, October 19, 2006
Monday, October 09, 2006
Fun puzzle
http://www.nzmaths.co.nz/BrightSparks/frogs.asp?applet
For the geeks, why did applets lose to flash? Is it just the ability to create pretty UI? I couldn't find a flash version of this game.
Wednesday, September 27, 2006
Random nerdy news
- White paper on how computers waste power, technologies that Google built, and how we are working with the industry to make this an open standard. 100 million computers running for 8 hours a day waste about $5B of electricity over 3 years!!
Thursday, September 21, 2006
Six F words
I think it's a good way to frame things. Once you know what you want, it's easy to pick a career or a lifestyle. But if you're not honest, life will seem like a square room with a rectangular rug. It will never feel right.
Another good advice is to do something at the intersection of what you enjoy, what you're good at, and what's useful in the world. Otherwise, you will hate your work, suck at it, or not find a job. People who want to be artists always struggle with this. The world needs very few of them. So most of them struggle with the last two.
Monday, September 18, 2006
Walking Tree in the Amazon Forest
We saw a lot of amazing thing in the Amazon. But the walking tree was one of my favorite. It moves about 10cm per year in search of a better spot. Its roots don't really go inside the ground. And you can see which direction it's moving if you look at the roots: the roots on one side are dying while it's growing new roots on the other side. There was another related tree called the balancing tree. This tree doesn't move, but it can change its angle. I love seeing what evolution does.
Welcome to Random Travellers
Sunday, September 17, 2006
Funny movie: Little Miss Sunshine
Wednesday, September 13, 2006
Saturday, August 19, 2006
DNA and Assembly Language
I think this is a little like comparing the differences between Microsoft Office and vi and expecting the pattern in their assembly language instructions to be very different. Office is a lot bigger and more complicated than vi. But at the end of the day, all programs have the same general structure in machine instructions. Data is loaded and stored, values in the registers change, basic logic and arithmetic operations are performed, and the program counter is manipulated in different ways to simulate function calls, recursion, or exception handling. This pattern is the same for all programs. At the end of the day, the same CPU can execute all programs. And the CPU only understands opcodes and operands. So it's not surprising that the patterns must be the same.
Based on the analogy, it's the same for living organisms. The actual organism is analogous to the software. The DNA is analogous to the assembly language instructions. Protein is analogous to transistors. And the biochemistry between the organic molecules is analogous to the physics that control the components of a CPU. Complexities in one abstraction layer are isolated from the other layers.
Instead of comparing to software, another analogy is that the brick laying patterns for a small house and a castle are basically the same. But I like the other analogy more.
Friday, July 28, 2006
New version of Google Talk
We're rolling out to everyone soon. But you can get it from here if you cannot wait.
Sunday, July 23, 2006
Google behind the screen
Friday, July 21, 2006
Design vs Evolution in Technology
In grad school, I had a friend who was working on using genetic algorithms for chip design. Some of the chips were able to do all the logic of a simple ALU, but nobody was able to understand their internals. There were extra transistors whose output were not even used. But without them the system would not work. So the working theory was that the system was somehow dependent on the temperature increase caused by the seemingly useless transistors.
For those who don't know, the author Steven Jurvetson is one of the geekiest VC's.
Monday, July 10, 2006
Finally... Forza Azzurri penalty kicks to football heaven
It was a great world cup. It was nice to have it in Germany. Italy didn't have any big stars this time. 10 players scored their 13 goals (that's amazing distribution for football). And more importantly, they didn't give up any goals during actual play. Zidane scored on a PK and they managed to have an own-goal against the US. All the Italian players also play for Italian clubs, not true for any other country! I guess Italians are really happy with their tough, defense oriented Serie A league. The scandals about the players and the Italian clubs helped the team just like 82 when they previously won when facing a similar situation. I think the entire team will be pardoned again.
When the game went to OT, I could vividly remember 90 when they lost the semifinals to Argentina on PKs in Naples, 94 when they lost the finals to Brazil on PKs, 98 when they lost the quarterfinals to France on PKs, and 02 when lost the round of 16 to South Korea in the last minute of overtime (after one of their own goals was incorrectly not counted). But this time, history didn't repeat itself.
Back in 1990 I was given an Azzurri jersey as a gift which I wore during all the games listed above. I really didn't know if I should bring it out this year. But the unlucky jersey was finally lucky. The jersey is now retired. For fun, I should send it to the FIGC and ask them to give me an honory number (I'll take 7 or 8 please) and a new official jersey (stitched letters please) WITH MY NAME ON THE BACK! If anyone has contacts there, please let me know. I think they'll like the 3 o's in my last name.
Thank you Azzurri! Now, let's get one more and tie Brazil. That's what really matters.
The unbelievable Zidane drama deserves a few links:
- Materazzi who was knocked down is quite the personality (amazing video of pain)
- What did he say to Zidane? I find it impossible that they can read his lips over the video. But I do love this quote from Materazzri in his own defense: I’m ignorant. I don’t even know what the word means.
- But thanks you Zidane for missing the easy header in OT. The ideal end for me would have been to watch him get subed out late after an Italy blow out in order to let the fans cheer for him. But life is not perfect. And he showed that he's only human.
- Zidane's must-see greatest moments: easily the best player of the past 20 years (compare him with Ronaldinho)
Sunday, June 18, 2006
Analyze This
But this kind of cause and effect pattern actually does occurs. For example, there is a correlation between criminal activity and the mothers of the eventual criminal smoking during pregnancy. Now, it's possible that smoking during pregnancy somehow damages the brain of the child in a way that helps the child grow into a criminal. But it's also plausible that the kids turn into criminals for the same reasons that pushed their mothers to start smoking.
In general, alarms go off in my ahead when I read correlation as the justification for cause and effect. This is why I had a really hard time with social sciences. These sciences simply conduct experiments to find correlation between different variables, and simply assume that one variable causes the other.
Thursday, June 15, 2006
World Cup in ASCII art
Visit http://ascii-wm.net/ or even better just telnet ascii-wm.net 2006 during a game.
The quality is amazing for the technology. You can even make out the numbers.
You can also watch star wars in ascii art.
Picasa Web Albums and Spreadsheet
Here are my pictures (mostly from Spain, but I'll post more later).
In other news, Google also launched online spreadsheets. It makes it so much easier to share a spreadsheet and make multiple people work on it at the same time.
Tuesday, June 06, 2006
Joga Bonita!
The first world cup that I really followed was back in 1986 when I was in fifth grade. It turns out that the 86 world cup was really the best world cup since 1970. Only 24 teams (instead of the current 32) were in the tournament. So the overall quality was better. Even the final match was very exciting -- with 3 goals in the last 16 minutes. What drama!
1990 and 1994 left me really sad as the Azzurri lost in the semis and then in the finals on penalty kicks. Things were so bad that I couldn't really get into France 98 (where Italy lost again on penalty kicks in the quarter finals!). 2002 was a lot of fun at the start until Italy lost in last minute of the extra time to South Korea (at least no penalty kicks). I wish I was a little older to remember the glorious 1982!
I'm not sure who will win this time. But it will be very exciting. I do wish that Team Melli had not peaked last year with their all-time high FIFA world ranking of 15. And a better draw would have helped them. Joga Bonita!
Sunday, June 04, 2006
An Inconvenient Truth
And with over $1T of oil left in the world, energy companies don't want to see the adaptation of better energy sources. About 50% of media references to global warming somehow question the level of fear that scientists are showing. But no scientific jounral in the past 30 years has questioned the facts. Countless studies have shown that the current trend is simply too dangerous.
Some sad facts:
- 10 of the hottest years ever on earth have been the past 14. Increase in temperature raises sea levels, increases winds (2005 had the highest number of hurricanes and tornadoes worldwide), changes the gulf streams, and drys land (partly causing the famine in Africa)
- A 20 feet increase in sea levels means that most of SF and the peninsula will be under water. There goes the Noe, Palo Alto, Googleplex, and Stanford. Most of Shanghai, Beijing, and Calcutta will also go under water. That's over 100M people!
- US has lower standards for gas emissions than Europe and China! This is a disgrace.
- California passed a law to increase the gas emission standard by 2010 to match today's standard in China. But our friends in Michigan are suing the state for trying to take the lead!
- I was surprised to meet a few people this week who didn't know that the imports of Japanese hybrids in the US are restricted to protect our friends in Michigan. GM and Ford are so doomed in my opinion because their cars are simply crappy compared to their European and Japanese peers. I hate lobbyists -- government should be "by the people and for the people" and not "for the corporations". I don't think this policy will protect American jobs in the long-term.
- Despite the US never signing the Kyoto Protocol, 10 states and 187 cities in the US are following the protocol. I love it!
- This is so evil: Philip A. Cooney, the former White House staff member who repeatedly revised government scientific reports on global warming, will go to work for Exxon Mobil this fall. (NY times article)
I have a couple of personal take aways from the movie. But on a funny note, I will never order beer that's in bottle again. By ordering beer from tap, one can save the environment one bottle at a time. Imagine if everyone did that! But seriously, go watch the movie.
Saturday, May 27, 2006
Attending the Turing Awards
The was also an award for humanitarian contributions given to the leaders of the Nakuru Local Urban Observatory project in Kenya. I really love how technology is starting to help developing nations. I can't wait for PCs to cost less than $100 for even greater impact.
It was so humbling to be around such amazingly smart and hard working individuals.
Thursday, May 11, 2006
A flashlight into our culture
So I was really excited when Google Trends launched on labs last week. The UI is nice and it lets you see the data over time and also over cities/regions/languages. Here are some examples: tea vs coffee or sushi vs steak. Or guess where they love JLo the most. You can have a lot of fun with this and learn a lot about what people around the world like. Please leave a comment with any good examples you find.
Tuesday, May 09, 2006
Best Job in America: Software Engineer
In reality, there are two types of software engineers. The first group studied it in college because of the bright job prospects. The second group fell in love with it long before going to college, taught themselves programming, and continue to be involved because they love it. For them it's more of an art.
While interning at Microsoft a long time ago, Paul Leach gave me one of the best reasons why programming is so addictive. He said writing software is probably the only creative job in the world where one can always feel some progress. You fix a compile error. Progress! You step through the code and fix a bug. Progress! You refactor some old code. Progress! You figure out a clever way to do something complicated in a simple way and save weeks off a schedule. Progress! The project, even the company, can be in deep trouble. But the engineers who write code are often very happy when they are in the zone. We're not talking about a daily sense of satisfaction. We're literally talking about getting that job every minute or two.
There are a few other attributes I really like about being an programmer: working on a team, building something that millions of people use, and most importantly building things that actually improves the world. If a blogger in a developing country can earn a decent living from ads by writing some good content instead of working in a factory, we've leveled the playing field for the good.
Tuesday, April 25, 2006
Retiring from Hanayama Puzzles
The Cast News is also fun. But you either get it quickly or you don't. I got lucky with it.
The Cast Chain was very tedious.
Fun with commas
Luckily, another friend beat me to it. Read the numbers above carefully. In America, a comma is used between every three digits to make it easier to read and a period is used as the "decimal point". Well, in some other countries, it's the other way around. So the ratio is really "one and two tenth" (as most of us guessed correctly).
Tuesday, April 18, 2006
Funny quotes or sad reality?
In Japan, the weather person says "Luckily the hurricane missed Tokyo and is heading to Hokkaido". It's funny in a sad way. It even sounds like a mistake. Regional issues within a country is even worse in some ways. I've never understood why. And the more you zoom, it's more of the same. Even within a city or even a school, cliques and stereotypes are quickly formed.
I guess it's just human nature. We generally like to be around people who make similar decisions and trade-offs in life. Is there a way around this? Or are we simply not evolved enough?
Saturday, April 08, 2006
Low Hanging Fruits
Granted, practicalities of project management might not allow this to happen all the time in a work setting. But I really believe that this attitude also helps in a work setting. It's sometimes tempting to go after low hanging problems. But it's often best to leave them for someone new or with less experience in order to give them the experience and the confidence to reach higher next time. Sadly, in many organizations, people run after the low hanging fruits as it provides the shortest path to getting rewarded. This sadly fits in well with the super short-term view of most corporations as everyone scrambles to optimize the quarterly EPS number.
Friday, April 07, 2006
Puzzle: 50 coins
Tuesday, April 04, 2006
Fire!
After having a good chelo kabab for dinner and getting tea in Palo Alto with a good friend, I went to my hotel. Around 12:30, the fire alarms went off. Luckily, I decided to go for a walk until the issue was resolved. There was an actual fire in the hotel! Luckily nobody got hurt as the fire was in the laundry room. We were permitted to return to our now smoky room much later. It was funny to see others random people blog about this too from the hotel's business center (the hotel is comprised of several disconnected buildings).
It seems like I have bad luck with hotels in Palo Alto. Last time I was here, they gave me the keys to a room that was not vacant and I walked into someone else's room. Luckily, nobody was there! On another previous occasion, a stranger starts loudly knocking on my door around 4am. Another reason to miss home!
Sunday, April 02, 2006
Tapas in Spain
In Spain, Tapas are not for dinner or lunch. They are only consumed in the afternoon before and after siesta (a wonderful ritual of closing business in the afternoons and sleeping). So Tapas were designed more for an afternoon snack than a meal. So nobody leaves hungry. I loved many of the Tapas plates there. But my favorite was probably
Jamon Serrano -- think of it as Prosciutto++ (Scusi to all Italians). Here are some pictures to wet your appetite! Another good place, recommended by a Googler, was a swedish-argentinean restaurant called Olsen. Sadly, they had no giant swedish meatball, which is the first thing that came into my mind when I heard of this interesting mix.
Monday, March 27, 2006
Fun time in España
But what was equally amazing was to see the coast of Greenland from the plane. I've never seen such a clear sky on a trans-atlantic flight (more pictures)
Monday, March 13, 2006
Cast Enigma Puzzle
Sunday, March 12, 2006
Watching Real Madrid
Our seats will be on the 8th row from the pitch. So it should be amazing.
I can't wait for this summer's World Cup. Too bad that I can't go to Germany. But I need to shift my work hours like usual. At least the time difference should be better than the last World Cup in Asia.
Friday, March 03, 2006
Brazilian Samba in Seattle
Music groups, like anything, can hit a point where they are better than their popularity. Vamola has certainly hit this point. If you live here, I recommend checking them out.
Thursday, March 02, 2006
Get GMail and Google Talk for your own domain
https://www.google.com/hosted says it all.
Thursday, February 23, 2006
Countries that I've visited
(create your own!)
A Paradox? Puzzle #6
Professor's argument
* If I win, my student must pay, by the court's decision
* If he wins, the student must pay, by our agreement
* Either way, he must pay me
Student's argument
* If I win, I need not pay, by the court's decision
* If my professor wins, I need not pay, by our agreement
* Either way, he must pay me
Who is wrong?
Wednesday, February 22, 2006
Pictures of my work
It's really made of cheese
Monday, February 20, 2006
Puzzle #5
How could it be? The surgeon was not lying or mistaken. No time travel, adopted child, etc.
(This puzzle comes from here)
Saturday, February 18, 2006
My friend published a novel
I was looking for a book for the long flight to Spain. So it just works out.
We're proud of you Kathia and hope this is just the beginning!
Thursday, February 16, 2006
An easy puzzle for the long weekend
You have three baskets. One only contains apples. One only contains oranges. And the last one is an even mix of apples and oranges. The three boxes are labeled. But all labels are placed incorrectly. Your job is to fix the three labels. You can reach in any basket, take one fruit out, examine it, and put it back. There is no other way to examine or look at the baskets. You want to minimize the number of fruits that you take out to examine. What do you do?
The answer posted for Puzzle #3 is correct. But that's based on algebra and that's not fun. I like this proof more as it's philosophical. Two real numbers are different if and only if there exists another real number between them. There is nothing between .99999... and 1. QED.
Wednesday, February 15, 2006
Fun math puzzle
Is .999999... = 1? If so prove it. This has a few proofs, and some are simple enough to show someone in junior high.
Most software companies are bad at innovating
The actual engineer building the product had little control in the overall direction of the company, but had flexibility to decide which technologies to use. Often the technology decision was also influenced by marketing as industry buzz words like ASP, J2EE, AOP, SOA, etc can help sell a product for reasons not yet clear to me. At times, management would throw bodies at the problem to speed up a schedule despite engineers calling it a futile attempt.
For execs, it's scary to give up control. After all, their careers often depend on the success of the venture. It's scary to trust a bunch of engineers to build something amazing. However, it's this actual fear that causes many companies to fail. Wisdom of the Crowds shows many examples where a group can make a better decision than even the smartest person in the group (and that assumes that the execs are the smartest folks in the group). So why do CEOs or VPs often try to force their opinions? Why not foster a more democratic approach where good ideas can come from anyone in the organization and somehow these ideas can get aggregated. Why not give everyone a chance to contribute? Why not empower the people building the product with the necessary freedom to do something amazing? A company's culture facilitates the mechanisms for innovating. And in the world of software, innovation is everything. There are hardly any barriers to entry and little capital is needed.
I'm so happy that my current employer is different.
Tuesday, February 14, 2006
Answer to the puzzle and the next one
Puzzle #2:
Divide a circle into 12 congruent pieces, with equal size and same shape, such that all pieces never meet. It's ok for pieces to be next to each other. But all of them cannot meet at the same point. So you cannot cut the circle in 12 pizza slices as they all meet at the center. This is more visual. Have fun. I first tried doing this with paper. But I was able to get it very quickly after deciding to close my eyes.
BTW, we have posted a very small collection of tech talks given here at Google on, you guessed it, Google Video.
Sunday, February 12, 2006
Favorite puzzles
Puzzle 1:
Let's say you have a cup of cream and a cup of coffee (same volume). You take a spoon full of cream and mix it in with the coffee. Now, you take a spoon full of the mixed coffee/cream and and mix it with the cream. Is there more coffee in the cream cup or is there more cream in the coffee cup?
Tuesday, February 07, 2006
Amazing co-workers
This past weekend, I saw him again in the ski trip! It's such an honor and so humbling to work with such gifted individuals.
Sunday, February 05, 2006
Thoughts on early retirement
In fact, a good way to live life is to imagine you have enough money to retire but only have a few years left to live.
Make sure you read Greenspun's entertaining notes.
Trip to south of Spain and my ski trip in Tahoe
I was in Tahoe this weekend for our ski trip. It was a lot of fun. I tried snowboarding for the first time, but the parties at night were really the highlight. A funny part of the trip was the shuttle ride from the Reno airport to Squaw. Our shuttle's door was not working, so the driver used duck tape to shut the door. But he was smart enough to not allow any of us to take a picture. Personally, I was happy that we were on our way. I never mind a little excitement; at least this wasn't as bad as putting a car in reverse while going 50mph.
Tuesday, January 24, 2006
Amazing Lectures
Speaking of great speakers, I also had a chance to watch a lecture from Noam Chomsky. It's amazing that he can be an expert in so many fields.
So much other news and so little time.
Wednesday, January 18, 2006
Open IM Federation
But the same is not true of IM. As a result users suffer and are forced to use multiple providers or not IM all their friends. Today, we took another step in fixing this by launching open federation. Now you can IM users on other networks. No official partnerships are needed with long meetings full of buzdev folks, lawyers, and paperwork. Just like email, set an SRV record in DNS pointing everyone to your XMPP server. Exchanging email between companies never required partnerships. Even most countries at war allow telephone calls to be made between them. Why should IM be different?
Using open standards has other advantages as demonstrated by the new Blackberry client for Google Talk.
In the meantime, for those of you who know me personally and know my google.com email address, feel free to add me as a Friend in Google Talk (just add my email address as a friend).
And if you don't know me but play backgammon and live in Seattle, I like to meet you!
Monday, January 16, 2006
Thursday, January 12, 2006
Wednesday, January 04, 2006
Answers to the puzzle
In this sentence the number of occurrences of 0 is 1, of 1 is 7, of 2 is 3, of 3 is 2, of 4 is 1, of 5 is 1, of 6 is 1, of 7 is 2, of 8 is 1, and of 9 is 1.
In this sentence the number of occurrences of 0 is 1, of 1 is 11, of 2 is 2, of 3 is 1, of 4 is 1, of 5 is 1, of 6 is 1, of 7 is 1, of 8 is 1, and of 9 is 1.
Happy 2006! I'm very busy at work these days. In fact, I had to cancel my trip to Las Vegas for the CES.
Friday, December 16, 2005
Self-Referential Beauties
In this sentence the number of occurrences of 0 is ____, of 1 is ____, of 2 is ____, of 3 is ____, of 4 is ____, of 5 is ____, of 6 is ____, of 7 is ____, of 8 is ____ and of 9 is ____.
The goal is to fill out the blanks with digits that make the sentence correct. There are two answers -- one is reasonably challenging and one is super clever (I'll post answers in a few days).
But recently, I came across this amazing text. Like a beautiful Escher painting, the following self-referential text is an absolute beauty:
in a palindromic sequence whose second half runs thus
::
suht snur flah dnoces esohw ecneuqes cimordnilap a ni
,s"` ytxis dna s'" ytxis s',` thgie-ytfif ,s'-` xis-ytnewt ,s'*` ruof ,s':` ruof ,s'y` owt-ytriht ,s'x` neetruof ,s'w` neethgie ,s'W` ruof ,s'v` ruof ,s'u` thgie-ytnewt ,s't` xis ytneves ,s's` ruof-ythgie ,s'r` owt-ytrof ,s'q` ruof ,s'p` ruof ,s'o` ruof-ytrof ,s'n` owt-ytriht ,s'm` ruof ,s'l` xis ,s'i` thgie-ytrof ,s'h` ytriht ,s'g` neetxis ,s'f` thgie-ytriht ,s'e` owt-ytfif ,s'd` net ,s'c` thgie ,s'a` net nwod etirW *
This is simply amazing! I wonder if it's possible to construct such a sentence in other languages too. I guess I really sound like a geek.
Thursday, December 15, 2005
A Great Book
To find out what I really think about Blinks, read this funny blog.
Monday, December 12, 2005
Wednesday, November 30, 2005
OMG! I can't believe my eyes
Millions of Americans, most of them supporters of the Republican party, believe that the world was created only a few thousand years ago as per the account in Genesis and the dinosaurs can only date from then, so the Tyrannosaurus Rex romped around with Adam and Eve.
...
But evangelical Christians, operating inside the Republican party ... are campaigning, for instance, to tell visitors to the Grand Canyon that this wondrous sight is not millions of years old, which it is.
I've heard such nonsense before. And that's why we left and moved here. Isn't it ironic?
Sunday, November 27, 2005
Too much work, but still having fun
There are thrree errors in thiss sentence.
Do you see the third error? I also really liked the chapters on Lisp. For those of you who haven't seen GED, take a look at the figure on this page.
Monday, October 03, 2005
Zip Code boundaries on Maps
Sunday, October 02, 2005
LOL at the Comedy Show
I also really like one of the guys who opened up for him. Being half Indian and half Japanese, people tell him "oh, I guess that means you're half Asian".
Despite sitting in the front row, sadly, none of them picked on us.
Wednesday, September 28, 2005
The big Google and NASA announcement
Now, I might just get my chance to work with them again on solving some interesting problems. Read the press release for details (see related news and blogs).
Most people thought we were kidding with the idea of opening the LunarPlex. But with Vint Cerf now at Google (he's the co-inventor of TCP/IP, the Internet, and the spec on *interplanetary* TCP/IP), I think we're going to take NASA's offer for a Journey into Space. I just love working here. For now, you can checkout Google Moon.
Center of Tech World?
I also spent a couple of nights at Hotel Avante. What I really like about this place is that they leave a puzzle on your bed as part of the nightly turn-down service. However, this time I noticed that the puzzle was very similar to something that I ask interview candidates! I guess it's time to expire that question.
Finally, Sacca summarizes what I hate about voice mail: Voicemail is so broken. Until someone can really make it easy for me to extract a number from a voicemail, file the message away for later, label it, quickly find it again, search over it, forward it, reply at my convenience, etc etc, I am going to stick to email. It takes some time to get used to the blinking red light on my phone. But anything is better than going through those painful menus.
Wednesday, September 14, 2005
A child in povery dies every three seconds
Tuesday, September 13, 2005
Yahoo Music Engine vs iTunes
Pros:
- $60/year for unlimited access to 1M songs.
- Better than expected selection (lots of latin/trance, but so so on the international side)
- Netflix-like collaborative filtering lets you quickly find similar artists, create playlists, etc. You can also have your suggestions be influenced by friends.
- .79 a song for MP3s (iTunes is .99)
- iPod does not play WMA -- enough said!
- Buggy Client
- I had several crashes today
- Sometimes it forgets that I'm a paid customer and only plays 30s
- It does not automatically retry failed downloads
- I really wish they had a Google-like 'do you mean ...?' when I mispell. Please don't make me spell correctly.
- Bad search UI. It forces me to do query-by-example searches (i.e. by artist, title, etc) instead of flexible keyword searches. And it would be killer to have lyrics search.
- No client for my Powerbook
- iTunes is a sexier app
Wednesday, August 31, 2005
Google Talk and Federation
We love being open, but we decided to be Googley and ship what we have to get feedback from users and the community. Rest assured that we are working hard on this and other things. Keep the feedback coming.
Sunday, August 28, 2005
Source for Inspiration
He also started another foundation called Ashager. It's aimed at addressing the third-world healthcare crisis starting in Ethiopia where 1 doctor has to care for over 70,000 patients in rural areas. The nurse situation is only slightly better, 1 nurse takes care of about 30,000 patients. So Michael and two of his friends studied this problem and realized that they can help. So they've started this foundation that seeks to address these issues by diffusing resources from US Medical Schools to these Hospitals and Clinics, hopefully expanding to other countries when this is firmly established.
When I was in school, I knew freshmen who were always partying, drunk, etc. I also knew people who were the paranoid pre-med or pre-* who were really focused on grades and being a president of a club in order to build the perfect application or resume. And the rest were usually somewhere in between. I think what Michael has started doing is very inspiring.
Tuesday, August 23, 2005
Google Talk is Live
It's also based on an open standard called XMPP so it already works with iChat, Trillian, Gaim, etc. We're also committed to federation with other networks. IM should be open like Email and the Web where users have a choice of provider, operating system, and browser/client.
It's also been a lot of fun to work on something that impacts me personally given all the international phones calls that I make. :)
Your can read more by going to Google News.
Saturday, August 13, 2005
Sweatshop Factories
Housing Bubble
However, some recent stats indicate that we’re in a bubble. The ratio of house price to rent (the most similar metric to a stock’s PE ratio) has increased significantly. People are literally using their house as an ATM machine to take out loans. On average, people in the Bay Area only own about 8% of their houses. New mortgage instruments allow buyers to only pay the interest on the loan and buy houses not commensurate with their salaries. The old rules of 20% down and total house payments being between a quarter to a third of income are completely ignored.
Has crashes happened before? Yes. Look at Japan. Prices there now are below what they were in the early 90’s. This has also happened in LA after the cold war ended where some people literally drove to the bank to return the keys to their house since the remaining mortgage payment was significantly more than the value of the house. It took 8 years for the market in LA to recover. Bubbles always burst for a reason. What will be the needle this time?
My prediction is based on the interaction between national and regional economies. At some point, the US economy as a whole will start to grow and enter an inflationary cycle. At that time, the interest rates (which are tied to the national economy) will rise. The regions behind the national growth will see a disaster as their local unemployment rates, salaries, and GDP growth do not warrant the nation-wide higher interest rates. So buying a house today is taking a bet that your city will do better than the nation in next few years. And this is why I’m scared about the rapid price increase in areas that are dependent on the ‘old’ economy.
There is another alternative. As people prosper from the current boom, enough money can be pumped back to the economy to improve things enough to justify the boom. It’s an interesting phenomenon. I read an article recently that the improvements in the job market in Seattle for the past year have primarily been because of the booming housing market. But I am going to continue to enjoy the no-hassle life of renting. When a light bulb dies in my place, I send an email and it’s taken care of. I love it.