Monday, August 20, 2012

Monday, August 06, 2012

For SUV

Actually it makes sense for high ground clearance vehicles.

Because some speed breakers break more than just speed. 

Wednesday, July 04, 2012

Half life of money


 Every time someone makes a payment of  Rs 100 using credit or debit card, depending upon his bank, the vendor will be charged somewhere between 2% to 4%. As people do transactions the amount of money available in the market decreases because part of that money is kept by the bank. The plot below shows the number of transaction it takes to reduce "public" money from Rs 100 to Rs 50 at different transaction charges or think of it as time it takes bank to make half the public money its own.













At 2% it takes about 35 transactions and at 4% it takes around 16.  At 10% it only takes 6 transactions to reduce it to Rs 50. The cashless economy taxes its users and that tax is payable to the bank. Good thing is at least in India RBI has now reduced this to maximum of 1% but for online transactions only. 


Making money on loans takes time, 10% over one year. But when transactions are taxed, the amount of money made by the banks is not dependent on time, it is just based on how fast the money moves around in the market. Fast moving money is probably a sign of good economy, but because of the tax, the faster it moves, faster it dries up. The half life of money could be few months to few years. I don't know the numbers, but it seems plausible that banks can make much more than 10% a year, if number of such transactions is say greater than 4 for 3% rate.  

Tuesday, July 03, 2012

Communicating discounts

10% off is 9/10 of the price.
20% off is 4/5 of the price.

50% off is 1/2 of the price.
66% off is 1/3 of the price.
75% off is 1/4 of the price.
80% off is 1/5 of the price.
90% off is 1/10 of the price.
95% off is 1/20 of the price.

It makes sense to switch to 1/n mode if offering more than 50% off.

Friday, June 29, 2012

On Simplicity and Complexity

Simplicity is highly abused term. It is now synonymous with good and consequently complexity now stands for bad.  Making such a statement is usually complex. It needs time, understanding of the subject.  But often, it is very easy to judge simplicity and complexity. If you understood it is simple, if you don't it is complex. The relative frame becomes the "person" not the problem/solution space. What takes real thinking is judging if something is "appropriate".  It comes only after you understand the problem and the solution so well that you can judge if the solution is appropriate. 

What makes something simple or complex?

Lets talk physics for a while. Earth is the center of the universe and sun revolves around the earth. That is simple. Every child thinks that unless told by teachers or parents. Problem is, simplicity doesn't helps when you are sailing oceans or launching a satellite. Consider motion. Classical mechanics is simple. It is still heavily used.  Relativity is a bit complex, just add the observer and how he observes to the equation. That is necessary if you are dealing with small particles, moving close to speed of light. There is nothing wrong with classical mechanics, it is simple and appropriate for lot of things. 

Solutions are simple or complex, depending upon the levels of abstraction used in understanding the problems. We won't be able to build any building if we start at atomic level. Recipes at atomic level will be useless. The unified theory of everything is obviously simple in terms of its constructs but becomes very complex to deal with high level problems. So in some sense complexity arises from simplicity - simplicity of abstractions. It can come from complexity of abstractions too, but that is obvious. Take a look at nginx module architecture. It is simple. Call all modules to find  if someone will handle this request and then let it handle it. Problem is writing the handler.  Nginix modules need to do everything themselves and cannot uses code from other modules because the architecture encourages isolation. So we have chunked encoding implemented in basic http module, file upload module, the upstream module, etc. I guess the same needs to be done for compression, caching, etc. Simple architecture, complex modules.

The opposite is also true. Complexity also leads to simplicity. Understanding complexity needs lots of thinking. Finding out how things are working, why are things the way they are. What are the assumptions. This knowledge is at the heart of seeing simple way of doing the same things. Good needs bad to differentiate. Simplicity doesn't occurs in isolation. It needs complexity as a yard stick.

When Einstein said "Everything should be made as simple as possible", he also added, "but not simpler".  The question is not simple solution vs complex solution, but appropriate level of simplicity or appropriate level of complexity or put appropriately - finding the appropriate solution. 

Wednesday, June 27, 2012

Of Money and Banks

Looking back, I seem to have too much to say about these topics.
In chronological order..

This one talks about how money is an abstraction for human interdependence and how it has properties that are different from properties of human interdependence. 
http://chakpak.blogspot.in/2010/03/reinventing-money.html

It is a mixed bag about unethical banking practices like loan switching charges and floating rate of interest (as if fixed one was better) and how we should move away from loans and only allow investments.
http://chakpak.blogspot.in/2010/08/home-loan-switching-charges-floating.html

http://chakpak.blogspot.in/2010/08/interest.html

Read this one. What if money expired ? Is choice enough in capitalism?
http://chakpak.blogspot.in/2010/09/if-money-expired-people-had-choice.html

Banks should be open to failures for their own good.
http://chakpak.blogspot.in/2010/10/banks-can-only-collapse.html

http://chakpak.blogspot.in/2011/04/price-retailer-margin.html

If you are employed, you will love this one. 
http://chakpak.blogspot.in/2012/01/loan-or-subscription.html

More detailed analysis of frequency of choice - the missing piece in capitalism. 

Tuesday, June 19, 2012

Be Original

Cut: Copy-Paste

UPDATE: May be this is not so clear after all. The idea was the use the sentence which is completely opposite of "being original" which is "cut-copy-paste" and use the same words to convey its opposite. If I was to code, this would appear as

Cut (Copy-Paste)

Essentially cut (stop) doing copy-paste if you want to be original.

Wednesday, June 13, 2012

Where is money?

It is not in the banks.
Not in your wallet.
Definitely not in the stock markets.

Take out the piece of paper you call money from your wallet and you will find this written.
"I promise to pay the bearer the sum of X rupees" - Governor RBI.

If money was money, you already have it and then why is Governor of RBI promising you to "pay it"? Well it turns out what it means is that in normal circumstances people will trust these pieces of paper, but even if they don't, I promise I will pay you something of value worth these pieces of paper.

Money is the promise we make to each other and the only species which honors promises is humans. You are money. Your wife, your kids, your parents, your neighbors, people in your office, people on the road, the shopkeepers, the drivers, the plumber ...

EVERYONE is money and NOT EVERYTHING.

Things don't have value, people see value in things. This is simple stuff, one less indirection. The billions of dollars/rupees (pick your currency) is paper in the hands of few individuals or corporations, is nothing if the rest of world doesn't honors their promise to be of value to those who have this paper with them. I have no idea what RBI Governor will give to such a guy whose money no one accepts.

It is people who produce something valuable and it is other people who appreciate that value and pay for it. Money is not what you have in the bank, wallet or in stocks, the value of that piece of paper is in the people around you and their willingness to do something of value for you for that piece of paper. The value of money is in the people. Anything that stops other people from producing value, is decreasing the value of that paper you hold so dear. And many times what is stopping people is that they don't have that paper with them. Richest companies in the world are mostly monopolies (Oil and Gas, Infrastructure, Public Sector). The next richest are banks. Somehow capitalism fails to bring efficiency in banking even with private sector. Everyone of them seems to be making money. Give 5% interest for deposits and charge 15% for giving loans. Stupid regulations.

People seem to trust money more than they trust in people and paradoxically, trust in money is nothing but trust in people.  

Tuesday, June 12, 2012

Sanitary Napkin


What could be more honest than "It Sucks". 
"Periodically Yours" also sounds alright.

Monday, May 14, 2012

Alternative Implementation of Call Center

Most call centers needs sophisticated call management software to distribute calls among the call center workers. Asterix and openpbx are few open source alternatives.  Basically the core design in based on proxy/middleware architecture. I am sure this is expensive.

An alternative way to implement the same functionality would be to use say smartphone based apps. Instead of putting your switching logic on the server, the same can be accomplished via the client. The idea is instead of pushing logic into the IVR or call proxy, use the internet connection and the computing power of the smart phone and your normal webserver (in your favorite langauge) handle the logic aspect of the call and then just make the app call the right number for the job. The approach has multiple benefits.
  • Use phone to store the answers to most stupid questions asked like name of the customer, address of the customer, even phone number of the customer, his choice of language and customer specific ids like account number or customer identification number or may be the receipt number etc. No need to waste time. 
  • Even if the stored information is insufficient, you could let the customer enter it on his mobile device instead of doing it over the IVR.
  • Customer can talk to the same guy he talked to earlier and save time. This helps the customer by skipping the context and generates faster response time.
  • No need to buy a special number. Just expose a web API which tells the phone app which number to call based on the information stored in the phone. Put whatever logic you need to put into that web API like .... if customer has called 5 times and the issue is not yet resolved, automatically route the call to the manager. The numbers could be regular mobile numbers or desk phone numbers of the employees. 
  • Very easy for the customer to give feedback. You have complete power of the webapp at your disposal. 
  • Very easy to implement say a work queue....customer simply presses a button and says call me back. Why wait.
Most "customers" already have smartphones and the ones that don't have are going to have them in next few years. By using the internet connection on phones and their computing power, it is possible to build much better customer management solution at fraction of the cost by offloading the "logic" to the app and webapi and use usual phone number to do the actual talking. Somehow we are still stuck in pushing logic into the phone line. 

Thursday, May 03, 2012

Life doesn't teaches us much

Contrary to popular beliefs, I think that life doesn't teaches us much. If it was true, we would have become very much like each other. We are, but then we are not.

I think after a point life simply reinforces what we already know.  

Sunday, April 15, 2012

Patents - Necessary Evil

The deal with patents is fairly simple. Innovate, file patent, get exclusive rights for some period of time on your invention and make money from your invention. Now the problems.

  • Too many patents being filed
  • Too many generic patents 
  • Patent Troll
  • Defensive patents 
In simple terms the problem is uncertainty. I have developed this cool technology and I have no clue if someone already has a patent on it. File stupid patents, because if you don't someone else will and that is a threat. Oops someone sued me, how much do I need to pay to settle this apart from the lawyer fees. Patents add huge variance to predicting costs/profits in business. 

The fix is simple enough - bring certainty and sanity to the patent ecosystem. 

Time is money

The exclusive rights to use your invention is nothing but a way to make money. And the simplest way to fix this is to base exclusiveness on money and not on time. What this means is that at the time of filing patents, you need to put a monetary value on it which tells the worth of the patent. The cost of filing patent would be based on this monetary value (call it patent tax).  This has two important repercussions.
  • Patent Troll is controlled because a finite value is attached to patent. Irrespective of how patents are "sold" to others for use, total payout cannot exceed the declared value of the patent. 
  • Stupid patents are avoided because you need to attach monetary value which will be taxed. Unless you are sure that patent is worth that value, you probably don't want to waste money on it.
I guess what I am talking about is making patents a market where patents can be purchased/used to  make life  better on planet by figuring out a way to attach monetary value to patents instead of finding it out through expensive court battles. This makes the process efficient and reduces uncertainty and provide value to both the inventor and the user of the technology. The idea as I understood was always to reward the inventor and never to prevent others from using it. Preventing other from using it is just a way to reward the inventor, but not the only way.  If we can find alternative ways for ensuring the same, we can perhaps bring some sanity to the system so that both the inventor and society as a whole can benefit from the invention at reasonable costs, predictably. 

Friday, April 13, 2012

Ford Mantra

I have been driving Ford for eight years now. I like the car, but spare parts are stupidly expensive. I wanted to get the windscreen changed, but thought against it when I was told the price. Rs 9000. Compare that to windscreen cost of Skoda Rapid - Rs 3600. Now that is hell lot of difference.

What does that tells us about Ford Business Model? Sell cheap cars. Make money on spare parts and services. Which again brings me to the old dilemma of choice in capitalism - namely you don't have a choice after you make a choice.

I think some rule like cost of all parts put together in the car cannot be more than the price of car would probably help bringing some sanity to the system. If everyone needs to go through this experience to learn it then Ford surely has a very bright future. I think the statement, "You can fool some of the people some of the time, all people some of the time, some people all the time but not all people all the time" is missing a crucial component. The component is people have finite life times. Then the game starts all over again. If new generations don't listen to the old generation, the cycling of fooling can run indefinitely because people continue to be replaced by new people.  

Fundamentally this is all about frequency of choice.

Sunday, April 08, 2012

Two Favorite Patterns in C

The first one is for error handling.


#define IfTrue(x, level, format, ... )          \
if (!(x)) {                                    \
   LOG(level, format, ##__VA_ARGS__)          \
     goto OnError;                              \
 }


This is the simplest way of simulating try/catch in c. Yeah it uses goto and is a bad programming practice and what not, but it makes c code beautiful and understandable. Take a look at the code below for creating a server connection below. These code samples are from cacheismo.

connection_t  connectionServerCreate(u_int16_t port, char* ipAddress, connectionHandler_t* handler) {
connectionImpl_t* pC = ALLOCATE_1(connectionImpl_t);
IfTrue(pC, ERR, "Error allocating memory");
pC->fd = socket(AF_INET, SOCK_STREAM, 0);
IfTrue(pC->fd > 0, ERR, "Error creating new socket");
{
         int flags = fcntl(pC->fd, F_GETFL, 0);
         IfTrue(fcntl(pC->fd, F_SETFL, flags | O_NONBLOCK) == 0,
    ERR, "Error setting non blocking");
}
memset((char*) &pC->address, 0, sizeof(pC->address));
pC->address.sin_family        = AF_INET;
pC->address.sin_addr.s_addr   = INADDR_ANY;
pC->address.sin_port          = htons(port);
if (ipAddress) {
pC->address.sin_addr.s_addr  = inet_addr(ipAddress);
}
IfTrue(bind(pC->fd, (struct sockaddr *) &pC->address,sizeof(pC->address)) == 0,  ERR, "Error binding");
IfTrue(listen(pC->fd, DEFAULT_BACKLOG) == 0,  ERR, "Error listening");
pC->isServer = 1;
pC->CH = handler;
goto OnSuccess;
OnError:
if (pC) {
connectionClose(pC);
pC = 0;
}
OnSuccess:
return pC;
}

It is a linear code. This avoids multiple exist points and repetitive error handling code. Less nesting of "if" blocks makes it easy to follow the code. Error handling/cleanup happens in the end and is common for all possible errors in the function, which also means less code.

The second pattern I use often is opaque objects.

typedef void* chunkpool_t;


chunkpool_t  chunkpoolCreate(u_int32_t maxSizeInPages);
void         chunkpoolDelete(chunkpool_t chunkpool);
void*        chunkpoolMalloc(chunkpool_t chunkpool, u_int32_t size);
void         chunkpoolFree(chunkpool_t  chunkpool, void* pointer);

Almost every type is opaque. What does it accomplishes? Freedom. Freedom to change the implementation of the objects because rest of the code only uses functions to access the object and doesn't knows how object is actually implemented.  This also forces me to think hard about what should be the minimal interface for accessing this object because it is painful to keep writing new methods.  I use this for almost all objects except objects whose only job is to be containers of data and no functionality.

I do use function pointers when they make sense, but that would be a topic for another post. Writing high performance software is fun, but making sure it is easy to code and easy to change makes the journey pleasant.

Friday, April 06, 2012

The Debt Of Humanity

We are all in debt. I don't mean the financial debt, your home loan and stuff like that. I mean the debt of humanity.  What were our chances of surviving if we were born million years ago. Death during labor, infections, lack of food, shelter. Instead of fighting with each other, we choose to live together and developed a language to talk. Rest is history. We have taken the concept of being together from few families to villages, towns, cities, nations and now we are almost at the edge of time when all of humanity is considered one big family. And the reason is simple - nations also fight and don't know how to live together.
No matter how much we feel for our country, the truth is that vaccines that saved us were invented by someone else, the languages that we speak and which runs multi billion dollar BPO industry is not ours. Bangalore is silicon valley of India but computers and programming languages and the OS we use etc were not invented here.
We are so much deeply connected today than we were yesterday but our ability to see these connections has diminished over time. I am not talking about facebook friends, but those who work at facebook to make it possible. Those who work at google to make search simpler, democratize the mobile OS. I am talking about the people who make our cars and those who make sure you get the petrol/diesel at the station. The ones who run the refineries and the ones who dig oil out of wells and the ones who build the pipelines. The ones who build the roads and those who build the equipment to build the roads. The ones who invest their lifetimes researching life saving drugs, the ones who ensure we have electricity at our homes. The list is endless.
Everyone on the planet is in some ways making life easier for the rest of us. They realize it or not is debatable. We realize it or not is also debatable. But I do feel that we would have never been here without the rest of us. 

The Best

We know what is the best (product/service/decision/policy/whatever). Actually we knew the best all our lives. Sony makes best TV's. Ferrari is the fastest car, iphone is the best phone, land and gold are the best investments, and so on.

At some point in the past, the best TV was theater, their was no fastest car,  but fastest horses, their was no phone. People with more gold were probably robbed and people with more land ended by killing each other to get more land.


Beware of the future. Best is yet to come.

Saturday, March 17, 2012

Frequency of Choice

I have talked about this earlier also, but the topic is so close to my heart that I wanted to have a dedicated post.

As far as I understand it, the crux of capitalism is choice. In economics the word choice is substituted by market. What is market? Market is where consumers exercise choice. If consumers don't have a choice it is not a market. The assumption is capitalism thrives on competition.  Competition creates choice. Consumers will choose the best products at lowest prices forcing companies to innovate and reduce prices. The best will survive.

This is all true and then not quite true. Two main problems:

  • Most people don't like to think. Even  if they can, the complexity of world is sufficiently high that figuring out what is best for them is close to impossible. Eventually it is either brands or price because they make the decision simple. 
  • Frequency of choice. Since this is all I want to talk about, I will use the next paragraph.
We are good at stuff we do often, the old practice makes the man perfect thing. We buy petrol, vegetables, groceries, etc almost every day. Prices changes are felt, drop in quality is noticed. But then their are things that we don't do often. Things like joining new job, getting married, buying car or home, taking a loan, choosing college, getting home painted, buying TV or refrigerator or AC, casting our vote, choosing a laptop or OS, choosing email client, signing up on a social network, etc.  Many of these choices are irreversible or if not irreversible then choosing the alter our choice is very expensive.  This is where capitalism fails miserably because it is no longer about choosing from alternatives but the choice of altering our choice. For products with short life spans like vegetables or toothpaste altering a choice is not expensive. Vegetables will last few days, toothpaste few weeks and you can choose better product next time, but with products that last years or decades or in some cases lifetimes, it is the altering of choice which is required not choice among products. 

Specifics:
 
Consider home loan business in India. Floating rates have been around for long time now.  What do they float on is unknown and once you take the loan you realize that the "unknown" is whim of the Bank. Usually your floating home loan interest rate will increase by 20%-40% within few months of taking the loan and now their is no choice.  Well their is a choice to switch to other home loan, but only if you pay 2%-4% of your home loan value as switching charges.  This is as monopolistic as it gets and we call it capitalism, the mecca of markets and choice.  Even banks don't know if they are giving a good/bad interest rate to the customer, then how can customer decide if he is getting a good deal and that deal is good enough for the next 20 years. No one can. The only way I can know if I getting a good deal is if I can switch my home loan any moment I desire to switch. That is what will make it a market.

The same happens when switching a job (notice period), casting a vote (5 years gap), buying a car (10% value drop when it get out of the showroom) and at many other places. In computers, the advent of SAAS based companies have started filling this gap by providing monthly choice to the customers to continue to use them which once was a difficult choice of finding the best product. Amazon EC2 gives choice to use machines by hour and OS by hour. I think governments which call themselves followers of capitalism have missed a point.  It is not the choice alone that matters, it is the frequency of the choice that is at the core of efficient markets.  

Tuesday, March 06, 2012

Threadpool and the task queue

Every architecture makes way for threadpool and a task queue.  Multiple thread wait on the queue always ready to pick up the next task and execute them. Once implemented, the next task is tuning it. How many threads? What is the size of the queue? Blocking queue or throws error on full? Retry handler?

Before you start worrying about this ask a simple question. How much time does it takes to execute the task? If it is not at least couple of orders of magnitude greater than time it takes to do context switch, don't bother about the threadpool/queue, just execute it right there, on your current thread.

Here is why?
  • Task queue has a lock. More threads and more often it is accessed, more contention, more time to submit the task. Extra context switch just to acquire the lock. Basically you are doing serialization before getting to parallelism here. More threads + more tasks => more time per insert. Think of it like talking to a customer care executive(CCE). You do lots of IO using IVR and finally reach the CCE and the guy instead of answering your questions connects you to another guy and you need to explain the problem once again. That is pretty much how context switch works. If you need to talk for 10-20 minutes, it might be worth it, but if all it takes is few seconds of conversation, it just wastes time.   
  • Once the task is submitted, it need to wakeup some thread. That is context switch, costs time.
  • By the time this new thread wakes up because of lock and time elapsed most of the variable it needs are out of cache...more time. Read lock semantics for JVM. 
  • How do you do error handling from the task? Extra code, extra states.
You can avoid all this by executing the task inline....normal function call. It will run faster.  It is easy to write/debug. The assumption here is that the task really takes short time to execute and it mostly cpu intensive. Webserver using threadpool is understandable. Single request might need to do file IO, access some locked resources, possibly make multiple database queries. These are kind of things that make sense in threadpool...things that are complex enough to be simplified by using  a new/dedicated "thread of execution".  For other things, function call is the most efficient.  

Monday, March 05, 2012

Out of select

Some non-blocking architectures use separate threads for IO and others as worker threads. One problem with this design is extra latency because even though the worker is done with its work, the IO thread is blocked on select/epoll. One simple way to wake up selector under such conditions is to open a pipe per selector thread. The read end is made part of selector fd set and the write end is used by the worker thread to write one byte on the pipe which wakes up the selector. This ensures that whenever new fd needs to be registered with select, it wakes up as soon as possible instead of timing out on read timeout.

Wednesday, February 08, 2012

Adsense for TV adds

TV adds is $64 billion industry in USA alone.  And it works on the TRP rating systems which are nothing but statistical formulas applied on TV viewing timings of few thousand homes per country.  The simplest way to disrupt this market is by controlling the remote control. A wifi-enabled Android/iOS running remote can give real time information about who is watching which channel at what point in time.  And once you have it, you already have Adsense for TV.

And that is what I think Apple and Google are going to fight for over the next few years.

What is the mystery “entertainment device” Google is testing?

Apple patents new touchscreen remote control for a future Apple TV

IntoNow, the ipad app purchased by yahoo was a nice step in this direction using the audio matching technology. I guess this whole set of social TV apps is mostly about finding who is watching what at any point in time.

The same objective can be fulfilled by making TV's more intelligent (Samsung TV apps) and also by network connected setup boxes.  But I feel universal remove is a much cleaner and simpler way to go about doing this. If google were to crack this, they will not only be the entry point to anything we do on the browser but also entry point to all devices we use in our houses.  When we switch on/off lights, how many times does microwave is used, how much TV we watch, etc.

It will be interesting to see how they market this and at what price points.
 

Thursday, February 02, 2012

Cacheismo learnings

I already knew lua, memory management, writing servers and other technical bits. I did learned the automake stuff to make sure people can compile it.

But the best part was something else. Marketing. I guess I failed miserably at that one. I don't know if anyone has downloaded cacheismo code and tried to compile it or is anyone using it. I think it is one of my best works and it is free and I don't know what more do I need to do to convince people that it is better that memcached.

I tried the following:

  • I wrote a mail on memcached group explaining cacheismo.
  • I wrote to author of highscalability.com blog. He was kind enough to include a link. 
  • I created cacheismo google group. Only my friends joined. (Thanks!). No questions so far.
  • I tried to answer some of the questions on stackoverflow about memcached. I looked at problems which people face but can't solve with memcached. Tried answering the questions to best of my knowledge and also provided information about how it can solved using cacheismo. Someone removed all my posts :( from stackoverflow. 

So I guess even if their exist people who might find cacheismo useful, it is kind of impossible for them to find it, unless of-course they magically search for cacheismo on google.  So the question is what is the plan? And the answer is nothing much. I am not actively working on cacheismo. I will be more than happy to help anyone who wants to use it.  I need to solve the discovery problem and the plan there is to keep posting to stackoverflow...until the person who deletes my posts gets tired of it. Quora is another option. And may be some videos on youtube.  

May be caching is not such a big problem for people and memcached is good enough. Well in that case I will write some more servers. Http Proxy something like haproxy but configurable in lua might be fun. Or may be websocket server for HTML 5 applications.  

Wednesday, January 11, 2012

Loan or Subscription

Some things are expensive. If sold only at their price points, they would have a very small addressable market. Even if they are useful, even if they would provide move value over time than what they cost, making a choice to buy them is fairly hard.

The first solution to this problem was delayed payments. Companies will allow customer to settle bills later, helping them in maintaining cash flows. The second solution was loan from banks and the latest one is credit cards.  All these mechanisms allow customers to have something of value now and pay for it later (hopefully realizing the value of the thing they purchased). But the risk of not being able to realize the value stays as the purchase is not reversible.

In my opinion the best solution to this problem is service model, pay as you use. Many of the severs used in companies have vanished. The email server, the content management system, the svn repository, etc. We have gmail for email, google docs for content, github for svn and all of these are on services model. 

I guess subscription helps in figuring out the "price" of something. Figuring out lifetime value delivered by a product is hard. By forcing ourselves to think about value of something in a month, we have better chances of falling in range that is acceptable to the customers. The second benefit is frequency of choice. We give our customers every month a chance to stop using us and selecting someone else. This has two benefits. One it makes decision making simple for the customer and second it brings focus to the company because we need to keep "selling" ourselves, keep delighting the customer, to be in business.

Software is not the only thing that can be sold as a service. Almost everything can fit in this scheme of things. If you are selling something expensive that provides its value over time, subscription is your best answer to "barrier to buy".  Product/Service is a superficial packaging over the value you provide. Package your value the way it makes sense for your customers.

Tuesday, January 10, 2012

Life is not a game

In a game either you win or your opponent. In life, you may both win and you may both loose or the usual gaming rule apply.

Relational DB and Objects


Strange observation.

DB's mature over time and adapt to new requirements much easier than code. Code breaks from release to release and after some time needs major changes to keep in shape.

Relational DBs are more Zen compatible - A is A and A is not A. Code is usually not so flexible. More strangely, relational db's are less flexible (schema, everything is table) and ends up being more flexible whereas code is flexible (extend, copy-paste, interfaces, override) and ends up being inflexible.

Wonder, if we could associate code (C, Java, PHP) with tables/columns or joins and write our web applications in SQL.  Immediately all the hashmaps and arrays become moot. No for/while loops just select/where.  It becomes so much easier to create as many views as you like which are consistent by writing new SQL queries.  If queries can be named, they can be used as first level objects for creating higher level queries.  Empty tables that only have code associated with them but no data, can be used for providing all the decoration or access control or mappings.

I haven't seen something like this, but I do think that it is very much possible to build. With all the ORM tools and frameworks we are almost at the point where talking to DB is almost automated. I guess all I want to say is that SQL is probably a good framework for not just managing data, but also code. Lets give it a shot.

Friday, January 06, 2012

The Ambulance Lane

Hardly a day passes by when I don't see an ambulance screaming on the road while coming back from office.  In spite of all the good intentions of the frustrated drivers, most of the time ambulance is stuck with rest of the traffic.

I think one way to make things a little better would be fix say the left most or the right most lane as the virtual Ambulance Lane. The idea is to align the good intentions of people so that instead of randomly deciding how to give way to ambulance, it is pre-decided for them. How does it help? Lets say we decide right most lane to be Ambulance Lane. If you hear Ambulance and you are in the rightmost lane, move to left and make the right lane free.  If you are not on the right lane, make space for vehicles on the right. If you are in the rightmost lane and you can't move to left, honk, put on your parking lights and jump the red light. That is it.

As long as people follow this one rule, I am sure we could help more Ambulances reach hospitals on time.