Online market in India

It sucks! Ya that’s right, it sucks. Try find a site to buy something really common place like a good desktop, may be a technical book or may be a cell phone. Does anyone know if there is something like Amazon or eBay in India. There is eBay (formerly known as bazee) but try finding things that you need out there. There is barely 20-30% chance of finding it there. Why? Because there is hardly anyone selling it there. Consider this scenario, I have never been in India before, I land here and need to get a computer for myself. It could be a desktop or a laptop. Where should I go? I do not know anyone here, although I have internet in my house. The most sensible thing to do would be to get out of the house, ask some sane looking person about the whereabouts of such a store. If lucky, there might be one close by, if not get back to your room.

Next, may be try Google maps to locate an electronic store near your current location. As far as my experience goes, you would end up with nothing really useful. Businesses here are not really harnessing the power of Google. The stationery store near by apartment can be found in the map but a bank adjacent to that store is nowhere to be seen on the map. The main reason is people still heavily rely on “word of mouth” information rather than looking for it online. That is the main reason why there is nothing like Amazon here. I myself used to visit the Amazon website at least once a day to check out the recommendations of books and other stuff. Well, its true that a website becomes famous when it is useful to her users in the region. India does not have that internet savvy population as it is in the US, but I firmly believe that the percentage of the population getting interested in owning a nice flat screen TV, a sleek laptop or may be a gaming console is increasing at a rapid rate. It certainly makes sense for a customer to closely look at the item or even touch it before buying it, a well organized and well thought website arouses her interests to go for a product. Right now this interest building activity is loyally performed by the TV and friends. I am no comScore analyst, but the difference between the online transactions for home usage products in US is huge compared to that in India. And that is why we need something like Amazon for India. I do not know how it would look, for sure it would require a shift in minds of the retailers and buyers. Retailers should somehow be interested in the online business which would eventually drive the interests of the buyers. Let me tell you there are a large number of buyers out here who don’t mind spending lakhs of rupees on a TV.

I gave some thought on what the website should have to make it a success in a an upcoming economy like India.

  • Really easy and intuitive interface for the users. (may be something like ).
  • Multilingual, the site should be able to change the culture to English, Hindi and other major languages.
  • Powerful search functionality. Since people are so “Googlelized” these days, everything they need to find is searched on Google and things move on after that.
  • A recommendation system that works, like that of Amazon or Netflix. People would just love stuff being recommended to them which they might be interested in.
  • Flexible payment options. India is predominantly still a “Cash based” market. People mostly buy all kinds of stuff, from an orange to a house, just by paying hard cash/check. Online options need to be there, but there must be a system in place for the customer to pay cash on delivery or something on that lines.
  • Free or nominal delivery charge.

These are the major features which the site must have to capture the Indian public interests. I hope there is something in the making like this, since there certainly are several other folks out in the wild thinking about getting a customer friendly experience on the internet.


Happy Programming!

An iPhone app that knows your mood!

While getting my hands dirty with Microsoft technologies all day in the office, I though of doing some more of that cool thing called iPhone development. I had built a RSS reader which I use to follow blogs on my iPhone. Well, I thought of creating something more useful and fun to use. I think creativity comes out of a need. I needed an application which

  • would be with me all the time ( so on my phone)
  • would know where the hell I am.
  • would suggest some nice places nearby my current location. Although it should be smart enough to know that if it is 750 degrees where I am, I am really not in a mood to get in a spa or may be have a hot cup of soup.
  • Also if necessary I should be able to change the settings which would affect the search results, like if I change my mood to say mischievous, the app include search items like an adult store or a strip club. Awweeeeeeerightttt!!!!!! (Not sure how practical this is in India, but would certainly give lots of results anywhere in US).

May be there are apps already created with such intentions, but nothing is more fun than using your own app to do day to day things. So I am in the process of designing the screens and collecting information considering the requirements of the app. Following are my companions during this development process -:

  • Use the iPhone Core Location framework.
  • Use Google Ajax API
  • Use Google Weather webservice

I hope to get this done as soon as possible, kind of having a tight schedule at my office these days. Here are a couple of screenshots which might just scrap the surface of what I have in mind, although these screens might change as I dig deep in my thoughts.

Picture 1 Picture 2

Happy programming!

Broadband in India

After living in US for a while, returning back to your home is something that can only be experienced rather than talked about. But things do change after living away. Before moving to US I was ok with a mediocre Internet connection which had a speed of, I don’t know may be 10 Kbps. But after using Comcast High speed internet with  6Mbps lightning speed, Yeh Dil Mange More!! So I planned to switch to broadband connection here in Pune. Pardon me for my language because I am pretty frustrated how things work here.

Options available – TATA Indicom, Reliance, BSNL. (There is Airtel too but I thought they were a little expensive so I never called them, and others like Hathway and Sify, they are just there to suck blood).

They share one verb in common. They all suck, right from getting the connection to using it. I intend to use internet as much as possible so I needed an unlimited data plan. Now if anyone is new to this broadband connection mania in India, let me tell  you what are the typical steps the service provider would follow before you get your damn connection.

  • First call the service center in your city and ask for a connection.
  • The person would ask your address details etc and put a request to check for fucking feasibility of providing the service at your address.
  • For the next 2-3 days there would be some damn feasibility check to verify the service can be given. I was called by Tata  times to verify where exactly my building was, I mean exactly where respective to a landmark may be.
  • If that goes well, you need to select a plan. Overall I have seen that for home usage, 256 Kbps seems to be the most widely used speed here. Unlimited plan with 256 Kbps speed costs from about 750 – 1000 Rs/month.
  • Once the plan is conveyed in the next 2-3 days you might have your connection if everything goes well.

Now honestly speaking for someone who has spent quite some time abroad may be the price of broadband would seem cheap, but for residents here, unlimited plans seems pretty expensive compared to what we paid in US. Well I have to agree that internet is like having a TV in US, but in India, in a good locality, I think there would be 3/10 ratio of internet wired homes.

Here is a table which shows the bird’s eye comparison between these fuckin ISP’s.


  TATA Reliance BSNL
Price 1000 799 + 50(phone needed) 750(phone needed)
Customer Service Best Ok (Until now) Sucks rat’s ass
Speed (Kbps) 256 300 256
Time to get the service in days 2-4 1 week > 1 month

Please do not draw conclusions just by looking at the figures.

BSNL is a government service, and for those who do not know, in general, a government service in India is dreaded by everyone unless you have someone high up the ladder to pull some strings in their office. For BSNL, you need to apply for a landline phone, it took me almost a month to get that. Once that is in place and working, we need to apply for broadband which might take another month who knows.

I have chosed Reliance for now, its been almost a week and I do not have a connection yet. There is wiring being done in my house today and hopefully Ill be surfing 2 days from now. I always smell something fishy with Reliance since their service is much cheaper than TATA and the speed they promise to give is 300 Kbps. Lets see how that goes in the coming days. Please let me know if you need more information about any of the above mentioned services since I spent some time researching on them.

Finally a special note for those planning to come back after a long time or those who are coming for the first time and need a broadband connection.

Getting a connection is the easier part of the equation, but getting good service once you have the connection is really important. I would recommend TATA Indicom for all of you since they really take customer service seriously, atleast that was my experience with TATA sky which is their cable TV service. Although their service is a little on the higher price side but I am sure you won’t mind that :).

Happy Programming!

Typed Datasets vs Normal Datasets

I know there are gazillions of posts explaining about the difference between these 2 data interaction approaches in .NET, but I still would like to contribute a bit. I spent couple of days analyzing the performance of typed vs normal datasets using ASP.NET and SQL Server 2005. Since typed datasets gives so much ease of development and of course, compile time type safety, it is pretty obvious that there is a performance price. I wanted to observe the one to one comparison of these 2 candidates.

Following is the environment in which I did this analysis –:

Database – AdventureWorks in SQL Server 2005

Dev environment – Visual Studio 2008, ASP.NET Web Application

Profiler – Redgate ANTS profiler.

I created a data access layer for each type of dataset, so for typed dataset it consisted of the xml schema and other designer files generated and for the normal dataset, I created classes which essentially did the same thing as some of the classes generated by typed datasets, but with less code. (By less I means the designer generated code has lots of things which are unnecessary for simple operations but nevertheless they are good programming practices, I omitted them). I created a simple, complex and very complex queries in the database so that I see their performance at different levels. Also I analyzed the results for small number of rows, medium and large number of rows in the each of the query result. To explain the kind of queries I wrote, simple query was just a normal select statement, complex query had couple of joins and very complex query had couple of inserts and then a select with couple of joins.

Following are the results of the experiment –:

Small data set (about 100 rows in final result set)

Type of query

Normal Dataset


Typed Dataset


Simple Query/Procedure



Complex Query/procedure



Very Complex Procedure



Medium data set (about 7000 rows in final result set)

Type of query

Normal Dataset


Typed Dataset


Simple Query/Procedure



Complex Query/procedure



Very Complex Procedure



Large Data set (> 500000 rows in final result set)

Type of query

Normal Dataset


Typed Dataset


Simple Query/procedure



Complex Query/procedure



Very Complex Query/procedure



From the data collected, it is not surprising that typed datasets take a performance hit compared to normal datasets. As you can observe, for simple queries, typed datasets create quite a bit of overhead. The major reason is, in this case, the table which was used for this simple query was pretty big (about 30 columns) hence the typed data table created was a large object.

Although typed datasets cannot outperform normal datasets in terms of execution time, they were introduced for a reason right! That reason is to reduce the development time and generate good quality code. Following table shows the development time needed to build the same functionality with these 2 approaches.

Development Time (same for all size of datasets)

These values show the coding time required to create the actual functions which retrieve values from the database and return to the calling client.

Type of query

Normal Dataset

Typed Dataset

Simple Query/Procedure

2.8/2.5 min

2/1.5 min

Complex Query/procedure (not parameters for the procedure)

3.5/2.5 min

2.4/1.5 min

Very Complex Procedure (About 30 parameters)

14.5 min

4 min


To sum up this discussion, following are the pros and cons of Typed Datasets. Since Typed Datasets are just wrapper classes over normal datasets, their pros and cons are pretty much the same.


· Visual Studio intellisense available to access the individual table fields. Compared to normal dataset code, typed dataset code is shorter making it more readable, maintainable and more intuitive.

· Compile time type checking is achieved for individual fields for tables. Since the columns of a typed dataset are strongly typed, there is no explicit casting required while retrieving the values from the dataset unlike in normal dataset.

· The dataset provides a replica of the underlying database including the relationships between the tables and their indices. This gives the developer the ability to check constraints within the code itself.


· In order to achieve the type safety, typed datasets need to have the underlying information of the table schema. Creating a typed dataset or a typed DataTable is an expensive operation. For simple operations, you might end up having lots of unnecessary code in the designer file of the typed dataset. For example, to perform a simple read of say 3 columns from a table with 30 columns, the designer would still create a DataTable consisting of 30 properties and 30 type safe columns. One can certainly delete unwanted columns but that becomes an extra task as schema changes frequently.

Although one can store this datatable in a Session or some other place where he could just do DataTable.Clear() and return it after it has been created once. I implemented this method and saw about 40 – 50% improvement. Please visit this link to read more about it.

· Every time the database schema changes, one has to refresh the .xsd file to generate the class again.

· Using the typed adapter could be an overhead for simple operations. The typed adapter consists of table mappings, transaction support which might not be what you want for a simple operation like select.

Happy Programming!