Showing posts with label book excerpts. Show all posts
Showing posts with label book excerpts. Show all posts

Friday, May 24, 2013

The simple rule to winning dogfights




Below is an excerpt from Jeff Atwood's Effective Programming: More than Writing Code. This book is basically a collection of his blog posts on Coding Horror. If you are lazy like me this book is a one-stop shop for the best programming advice culled from his blog. In short, gold mine for all programmers.

In this excerpt, he drills the value of iterating faster and speed of execution (this is a universal law, in nearly every field - software development or otherwise):

Boyd's Law of Iteration: Speed of iteration beats the quality of iteration

Boyd decided that the primary determinant to winning dogfights was not observing, orienting, planning or acting better. The primary determinant to winning dogfights was observing, orienting, planning and acting faster. In other words, how quickly one could iterate.  

Speed of iteration, Boyd suggested, beats the quality of iteration.

Speed of iteration - the Google Chrome project has it.

1.0 Dec 11,2008
2.0 May 24, 2009
3.0 Oct 12, 2009 
4.0 Jan 25, 2010
5.0 May 25, 2010
6.0, Sep 2, 2010

Chrome was a completely respectable browser in V1 and V2. The entire project has moved forward so fast that it now is, at least in my humble opinion, the best browser on the planet. Google went from nothing, no web browser at all, to best of breed in under two years. Meanwhile Internet Explorer took longer than the entire development period of Chrome to go from version 7 to version 8. And by the time IE 9 ships, it will be completely outclassed by both Firefox and Chrome.

....
....

So until further notice, we will be following the same strategy as the Android and Chrome teams: We are going to go that way, really fast. And if something gets in our way, we will turn.

Larry Page responds on high correlation between speed and good decisions:
"There are good fast decisions but no good slow decisions"

Cheers to that!

Thursday, July 05, 2012

The art of letting go..



..is a lost art in adults. A known fact that as we morph from a child to an adult we severely restrict our ability to let go and imagine the unimagined. We ridicule and fear any invention. We like to be in our comfort zone and not step onto other's feet. We continuously train ourselves to live within constraints, lest we embarrass ourselves in public.

In a true adult fashion, I started to think analytically about how I can revive or atleast let a part of me go uninhibited. It's this resistance of the brain, refusing to let go. How can I free myself from the fear of making myself a fool? I don't have an answer to this.

Perhaps I must keep reading this excerpt from the book Imagine to inspire me every day, on days when I feel I could have done something - only if I let myself wander, if I let go...

World renowned American cellist Yo-Yo Ma echoes this idea.

"When people ask me how they should approach performance, I always ask them that the professional musician should aspire to the state of the beginner," Ma says. "In order to become a professional, you need to go through years of training. You get criticized by all your teachers, and you worry about all the critics. You are constantly being judged. But if you get onstage and all you think about is what the critics are going to say, if all you are doing is worrying, they you will play terribly. You will be tight and it will be a bad concert. Instead one needs to constantly remind oneself to play with the abandon of the child who is just learning the cello.

Because why is that kid playing? He is playing for pleasure. He is playing because making this sound, expressing this melody, makes him happy. That is still the only good reason to play"


Tuesday, June 12, 2012

When in doubt, trust a computer algorithm (aka The Myth of Intuition)



Call it karmic interference. I have been reading this book and a myriad of articles in the last few days that gave examples on debunking the myth of intuition. Yes, intuition is not universally applicable.

Consider this example I read in today's New Yorker article by Jonah Lehrer on why smart people are stupid:


In a lake, there is a patch of lily pads. Every day, the patch doubles in size. If it takes 48 days for the patch to cover the entire lake, how long would it take for the patch to cover half of the lake
?

Your immediate response is 24 days. Now if you were like me, you would think that was too quick an answer. Then slowly Geometric Series strikes you. And if you were still like me, you would think that writing a formal equation to solve this is simply too complex. There must be an easier way of reasoning this out. 

So you just take a smaller example. Say it takes 2 days to cover the lake, what would your answer be then? 1 day. Similarly for 48 days, it must just be the day before. So the answer is actually 47 days.

Whew. That took some thinking. But wonder why your brain seeks out a shorter route each time?

Daniel Kahneman in his book Thinking fast and slow discusses such an innate weakness of the human brain that is wrongly dubbed as "intuition". Slow deliberating thinking is hard work whereas quick impulsive thinking is lazy. In fact, there is sufficient evidence that procedural way of thinking can be superior to human reasoning when it comes to predictions. And so in his book, he says: When in doubt it is better to trust a computer algorithm. Atleast they can't perform worser than intuitive judgements made by humans in such cases.

Also makes me wonder aloud about the power of Geometric Series in general. An amusing story I came across in this book on micro lending is just the perfect example to demonstrate the power of Geometric Series and our lack of misgivings while making a judgement in such cases:

The story goes like this: a prisoner who was condemned to death was brought before the king and was asked to make a last wish. The prisoner pointed to the chessboard which was to the right of the king’s throne, and he said, ‘I wish only for a single grain of rice on one square of the chess-board, and that you double it for each succeeding square.

‘Granted,’ said the king, not realizing the power of geometrical progression. For soon the prisoner had the entire kingdom. 


So if you really get down to solving the geometric series the prisoner gains 2^64 -1 which is 1.8 x 10^19 grains. And this is (to give you a scale of comparison) more than the total number of grains of sand on Earth! (which is 7.5 x 10^18)

That brings me to the lily pads example above as well. After 48 days, you have about 2^48 lily pads (even if each pad is about 10 cm in diameter, so about 75 sq. cm in area) that covers about 75 * 2 ^ 48 sq cm area which is about 2 million sq. km.  That is one big ass lake! (largest lake is about 371 sq km only, the Caspian Sea)

Moral of the story: Obvious is too obvious. Think stupid to break out of the bias :-)


Sunday, March 11, 2012

Burying the lead



Burying the lead often occurs in journalism. This is a problem of how journalists stray away from reporting the most important point of a story. However this is a phenomenon that occurs in our everyday non-journalist lives as well. We often miss the core of an idea, message, work etc. that we are involved in.

I found the following book excerpt from Made to Stick (a book everyone must read) to be a profound illustration of this concept, that it instantly stuck with me. I am tempted to share it here:

Nora Ephron is a screenwriter whose scripts for Silkwood, When Harry Met Sally and Sleepless in Seattle have all been nominated for Academy Awards. Ephron started her career as a journalist for the New York Post and Esquire. She became a journalist because of her high school journalism teacher.

Ephron still remembers the first day of her journalism class. Although the students had no journalism experience, they walked into their first class with a sense of what a journalist does: A journalist gets the facts and reports them. To get the facts, you track down the five Ws - who, what, where, when, and why.

As students sat in front of their manual typewriters, Ephron's teacher announced the first assignment. They would write the lead of a newspaper story. The teacher reeled off the facts:

"Kenneth L. Peters, the principal of Beverly Hills High School, announced today that the entire high school faculty will travel to Sacremento next Thursday for a colloquium in new teaching methods. Among the speakers will be anthropologist Margaret Mead, college president Dr. Robert Maynard Hutchins, and California governor Edmund 'Pat' Brown."

The budding journalists sat at their typewriters and pecked away at the first lead of their careers. According to Ephron, she and most of the other students produced leads that reordered the facts and condensed them into a single sentence:

"Governor Pat Brown, Margeret Mead, and Robert Maynard Hutchins will address the Beverly Hills High School faculty Thursday in Sacramento...."

The teacher collected the leads and scanned them rapidly. Then he laid them aside and paused for a moment.

Finally he said, "The lead of the story is 'There will be no school next Thursday.'"

"It was breathtaking moment", Ephron recalls. "In that instant I realized that journalism was not just about regurgitating the facts but about figuring out the point. It wasn't enough about to know the who, what, when, and where; you had to understand what it meant. And why it mattered."

Wednesday, February 22, 2012

The Curse of Knowledge



Yes, sometimes I get deeply thoughtful about stuff like that. Not kidding.

So currently I am reading Made to Stick and this is an excerpt from the brilliant book on the curse of knowledge (it is easy to follow, I promise;-) And also since I am in the mood to throw this stuff at you, you got no choice.):

In 1990, Elizabeth Newton earned a PhD in psychology at Stanford by studying a simple game in which she assigned people to one of two roles: "tappers" or "listeners". Tappers received a list of 25 well-known songs such as "Happy Birthday to You" and "The Star Spangled Banner." Each tapper was asked to pick a song and tap out the rhythm to a listener (by knocking on a table). The listener's job was to guess the song, based on the rhythm being tapped. (By the way, this experiment is fun to try at home if there's a good "listener" candidate nearby)

The listener's job in this game is quite difficult. Over the course of Newton's experiment, 120 songs were tapped out. Listeners guessed only 2.5% of the songs: 3 out of 120.

But here's what made the result worthy of a dissertation in psychology. Before the listeners guessed the name of the song, Newton asked the tappers to predict the odds that the listeners would guess correctly. They predicted that the odds were 50%.

The tappers got their message across 1 time in 40, but they thought they were getting their message across 1 time in 2. Why?

When a tapper taps, she is hearing the song in her head. Go ahead and try it yourself - tap out "The Star Spangled Banner". It's impossible to avoid hearing the tune in your head. Meanwhile, the listeners can't hear the tune - all they can hear is a bunch of disconnected taps, like a kind of bizarre Morse Code.

In the experiment, tappers are flabbergasted at how hard the listeners seem to be working to pick up the tune. Isn't the song obvious? The tappers' expressions, when a listener guesses "Happy Birthday to You" for "The Star Spangled Banner," are priceless. How could you be so stupid?

It's hard to be a tapper. The problem is that tappers have been given knowledge (the song title) that makes it impossible for them to imagine what it's like to lack that knowledge. When they're tapping they can't imagine what it's like for the listeners to hear isolated taps rather than a song.

This is the Curse of Knowledge. Once we know something, we find it hard to imagine what it is like not to know it.