Sunday, October 03, 2010

Developers Out There - API 101

 Developers out there:

  • are building their own companies to make money
  • are writing open source software, because they enjoy the respect they get from the community and can make money later by consulting or writing books about their software
  • are making iphone & android apps because people pay for them
  • are making facebook apps, because they get this huge user base of 500 million users. If successful their app can bring huge amount of money from adds, or if they are making games then from virtual goods.
It was and it is about the money honey.

Zynga for all practical purposes is a developer for facebook. If Zynga makes a billion dollars out of virtual goods using facebook, they do bring 300 millions to facebook. Facebook gets a huge screen real estate they can use for advertisements which is exclusively created by Zynga.  May be facebook makes more money from Zynga than what Zynga makes from facebook.  This is called partnership.

The most stupid thing companies do after opening up their API's is to wait for developers to build applications and give no meaningful monetization model to developers. That leaves no other choice except advertisements for developers. Companies like twitter are even worse, who copy the innovation of their API developers and kill them. 

Developers are out their to make money.

1) First figure out how you will make money.
2) Second figure out how you will make money if developers use your API. 
3) Third share your profits with the developers based on how much business developer brings to you.

Let developers make the choice if they want $10 per booking vs $0.001 per add view and how do they optimize their app for their choice.  Developers are not super excited by Facebook, Iphone, Android or Google. They are excited by the opportunity to make it big. 500 million * $ 0. 001 is a big number. But so is $10 * 50K or $100 * 5K or $1K * 500 or $10K * 50.

Ayn Rand

I liked Ayn Rand when I first read her in 1999 but something about her writing kept disturbing me for a long time.  Their was something inhuman about the characters.  

I believe Ayn Rand characters are automata, finite state machines. They don't wonder, or get surprised,  or grow or evolve. Every decision they need to take in their life is decidable without an iota of doubt. They are able to model every situation, are dead sure about their model and can find their optimal response.

This, I believe is not quite true for humans.

Friday, October 01, 2010

The Idiot Religion

  • All follower of this religion are idiots.
  • They are open, acceptable and proud of the fact that they are idiots
  • Every one who doesn't follows the idiot religion is intelligent and hence all idiots are expected to be very respectful to everyone who is not an idiot.
  • Idiots don't have any God of their own and they don't care about who started the world or what will happen after they die.
  • Idiots value human life and everything created, invented, believed by humans including all possible Gods, languages, roads, buildings, property, schools, etc.  
  • Idiots forgive. As idiots they are expected to make mistakes.
  • Idiots always question their own beliefs. They are idiots and hence could be wrong all the time.
  • Idiots understand that world is neither fair not perfect because it is run by idiots. Hence for their own goodwill and for the goodwill of the world, it is important for them to always try to improve their understanding of the world and use it to create a better world. 
  • Idiots use consensus or probabilistic voting to take collective decisions. As idiots their decisions are anyway idiotic which is by definition acceptable behavior. They can always revise their decisions if they don't work as expected.   

Tuesday, September 28, 2010

Writing High Performance Software

After working for five years on http proxy, caching, high speed file logging, distributed quota, I believe the following summarizes the results of my experience.

1) Make sure you use all the CPU
2) Reduce your CPU usage

As innocent as they look, they are by no means simple to achieve.  Locks, system calls, network settings, kernel, number of threads, contention, context switches, memory allocation, etc will make it difficult to saturate the CPU.  Reducing your CPU usage is comparatively easy, just use the profiler. This itself is a bit tricky because some profilers will use global locks when collecting data points and we get a perfect example of Heisenberg Uncertainty Principle in action. 


I think of software in three dimensions. Speed, Simplicity and Power. 
Speed       - How fast it runs 
Simplicity - How simple is it to use / maintain 
Power      - The range of problems that can be solved using it 


Think iphone. Think SQL. Memcache has speed and simplicity, but not powerful enough. 


Writing high performance software is fun, but don't forget the simplicity and power aspects of it. If it is not simple and not powerful, most likely no one will care about how fast it runs. If you make it simple and speedy, your target customer set becomes small. Not everyone is solving the exact same problem. Make it speedy and powerful and customers will have tough time using it. They will probably claim it is not powerful, because that power is hidden, not simple enough to use. Make it simple and powerful and not speedy,  customers will compare it with some other product which has high TPS and won't buy. Not that they need the speed, but only to future proof their investment. Every customer feels they will grow and need more and more. 


Overdoing speed, simplicity or power will have some impact on the rest two. Make sure to choose the right combination. 

Sunday, September 26, 2010

Apples and Oranges

Rs 12 is more than Rs 10.
20% growth is better than 18%.
140bhp is more than 120bhp.

It is easy to compare apples to apples. Any one who went to school can understand it. Doing something better than something you have already done is of course  easy to figure out. Study harder and get more marks. Put in more hours and try to get another feature in the release.  Hire more people to get the work done faster. This is natural usage of high school math.

Science or Arts, Medical or Non-Medical, MBA or MS, Job or Business, India or US, stocks or cash. Most questions of life which are worth their salt will force you to compare apples to oranges. Some people tend to be believe they can compare anything using their monitory value.  Well ask them to choose between accelerator, brake and steering.

1  +  1 =  2

1 electron   + 1 proton    = 1 neutron
1 cannibal  + 1 cannibal = 1 cannibal

1 manager  + 2 developers = some work done
2 managers + 1 developer  = don't know
0 manager + 1000's of developers = linux kernel

Math abstracts. It makes us blind to details.  It is good to be blind to details and then it is also bad to be blind to details.  May be you are not dealing with all apples. May be you have few oranges and bananas.
Prerequisite to comparing apples to oranges is realizing you are dealing with not just apples.