Rohit Karlupia's Blog - Moved to https://znvy.substack.com
Wednesday, September 01, 2010
Using if
If is very powerful construct of programming languages. Most bug fixes involve adding another "if" or handling the else part properly. Many bug fixes would need adding "ifs" at multiple places. I think of "ifs" as design problem. If essentially means doing something different based on some criteria. If multiple functions needs to check for the same criteria and do something (same or different), then what we are really doing is "adding some functionality" which perhaps belongs to a separate object, to all the places we are adding "ifs". May be what we need is a new object/function to abstract that functionality or perhaps declaring a new interface and adding multiple implementations. Ifs allow us to live with design problem by having special cases, whereas the whole point of design is not to have special cases, just simplicity.
Languages
Hindi forces us to think about everything in terms of male and female. TV चल रहा है या TV चल रही है. Kannada and English don't have sounds. ख, त्त , थ. Punjabi doesn't have very strong notions of half letters. As we keep adding new words to the languages, it would be nice to add new sounds/letters also. Languages we use were invented long, long time ago. May be we should invented new languages which are keyboard friendly, capture enough sounds, have simple grammar, is easier to learn even for adults, stops forcing us to think in terms of male/female, is computer understandable (avoid NLP) and perhaps easy to work with Text-2-Speech & Speech-2-Text converters.
Tuesday, August 31, 2010
Virality
Publishing a feed to all your friends is not viral, it is spam. If publishing a feed results is all your friends also publishing the feed, then that is viral. To make something viral is not about publishing your feed as many times as possible, to make something viral is about causing the receiver of the feed to want to republish it.
Monday, August 30, 2010
Interest
If everybody in the world has enough money to keep in bank such that they can easily survive on interest alone, who will do the work? This will not work for obvious reasons, but this is what everyone dreams to achieve.
May be money should have a half life.
May be money should have a half life.
Jammu Airport
Few things happened at Jammu Airport which defies all economics:
1) Taxi service is controlled by a union guy. I wanted a taxi for a day without specifying how much kilometer I will travel. The guy simply refused to give me a per km rate as his commission depends on total value of the travel charges. With per KM model he doesn't knows beforehand what is his commission and hence the refusal to act on this stupid per KM model.
2) The taxis are assigned in round robin fashion. As the number of taxis increase without any increase in tourist traffic (less demand and more supply) the taxi charges will be increased to compensate the decrease in per taxi profit.
1) Taxi service is controlled by a union guy. I wanted a taxi for a day without specifying how much kilometer I will travel. The guy simply refused to give me a per km rate as his commission depends on total value of the travel charges. With per KM model he doesn't knows beforehand what is his commission and hence the refusal to act on this stupid per KM model.
2) The taxis are assigned in round robin fashion. As the number of taxis increase without any increase in tourist traffic (less demand and more supply) the taxi charges will be increased to compensate the decrease in per taxi profit.
Subscribe to:
Posts (Atom)