Sunday, December 21, 2014

'Make for India' makes more sense than 'Make in India'

Recently, the current RBI governor Raghuram Rajan (, made a somewhat controversial statement saying that 'Make for India' makes better sense than 'Make in India'. Initially, I did not pay a lot of attention to this. But after thinking a bit I think Raghuram Rajan has a point here, particularly when you think in longer terms.

To be at the top of the economy, or as a driving force, I believe, one needs to be a 'innovation driven' economy. To be an innovation driven economy, we need to solve local problems, and then scale them up globally. If you look at all the startups in the US, they all start locally, solve local problems, and then find a global audience. They drive the world, they drive the money. Where as if you look at what happens in China - they are primarily manufacturing hub, which is quite akin to 'Make in India' campaign. The problem with this is that, at the end of the day, you don't have the clout - over platforms and standards - that define next wave of development. You end up being just a 'worker' in the whole scheme of things - not the one who solves problems. This is what make me support 'Make for India' idea, than the other more funded and visible campaign.

A totally different context, but I think there are some parallels in this video:

Sunday, November 16, 2014

Few time lapse trials

I am just learning here. So go easy on judging! The first three are taken using the Hyperlapse app. While the last one is taken using iPod + iPhone camera's time lapse feature and then edited using iMovie.

The Alleppey Bridge, Alleppey Beach

In a flight, near Bengaluru

 A top a rooftop restaurant (Post 91) in Baner, Pune

'The Purple Flower', my garden

Saturday, November 01, 2014

Algorithmic discovery of One Pot reactions

I am always interested in research and technology development that challenges the status quo, and gives an alternative way to do things, preferably using a computer algorithm. The paper by Bartosz Grzybowski and co-workers is one of these (see One Pot reactions is currently more of an individual skill rather than a rigorous process that can be implemented in a computer algorithm. The paper published in Angewandte Chemie in 2012, address this exact issue. I am sure that this is a solvable problem, and when it does get mass acceptance, a lot of cost savings may be achieved.

Wednesday, September 10, 2014

One more thing...

... Is the Apple Watch. It is easily the best pieces of wrist watches that I have seen recently. It has most of things that I would want of a wearable device (, with one glaring exception: battery life. Looks like it is not going to be great ( 

Sunday, September 07, 2014

Social Bus Spotter (Alpha) : crowd sourced bus running status

Usually public bus timetables in India are quite unpredictable. Most of the times you do no know when to expect a bus. Social Bus Spotter (alpha release), is the first step I am taking to make this information available in a easier way. The idea is to rely on all of you who travel daily via buses. Typically many of you have a smartphone. All you have to do is register a bus when you travel in one of the buses. This information is collected in the back end and then presented to others.

The app, in its alpha version is now published on the Google Play Store ( Use it, be responsible, spread the word about the app with hash tag #SocialBusSpotter on Twitter.

(Note 1: As the app is in early stages of development, expect frequent updates).
(Note 2: The app is currently only published in India and Israel Play stores, I will push to other markets as I keep improving the app).

Saturday, September 06, 2014

Saturday, August 30, 2014

Samsung Gear S : Almost everything I need from a smart watch

Samsung just announced Gear S (based on Tizen OS, not the Android Wear - which I consider to be merely a glorified notification center), and the specs are almost what I would want out of a smart watch (see here: Further it can be used without a phone, which is added benefit. The only issue I see is the battery. Although suggested battery life is 2 days, I am not very sure how practical is that in daily usage.

Next up: What is in store for September 9?

Monday, August 11, 2014

A remote I would like to see

Some time ago I was wondering if there could be a 'simplified universal remote, with a child mode function'. I don't think I have seen such a product in the market. So I went out with my usual powerpoint and came up with the following (putting it under CC license so if you would like to build one I would be happy to see it) ..

Friday, August 08, 2014

Opinion: A reminder on why using closed systems is bad

I use a lot of closed systems. In fact, I rely on many of them. To name a few Skype, Windows and now an iPhone. I also use a lot of opensource (including developing my own opensource projects). With open systems (as in with availability of source code), you are always in control and not at the mercy of the initial company that developed it.

So when I heard of Skype discontinuing support for WP7 devices (, it was a reminder how bad this could turn up to be. I had been using a Lumia 800 device for quite some time and actually had no plans to switch until Septemeber, when the official support for WP7 ended. But I switched to another closed system, and iPhone because of a number of reasons: primary one being I just wanted the device to work for me without me tinkering a lot. This is the same reason I use Windows on my home machine. I just have no time to do the tweaking required for open systems to work for me always. But this comes with one major issue such as the one exhibited by the dropping of Skype  on WP7. When I bought into WP7 from Nokia (as they never released the N9 in India), I was quite aware that I was going into a totally closed system, but just ignored it. Lumia 800, started its life without Skype, it came a few months after wards, and now even if the device is in great shape, Skype is altogether dropping support for the device.
I presume that about 2 years down the lane it will be the same issue with my current iPhone: Apple will drop support and force me to upgrade to a new device, even if the device may be in good shape.

That brings me to other question: should I switch to more open systems like Jolla? Probably I should, but then I won't be able to do a tonnes of things that I so easily accomplish on my current iPhone. There is probably a fine balance between open and closed systems. One can't probably choose completely over the other. What is probably still in your hands is that you still have complete control over the data that you store in these devices.

Update: The reactions here (, pretty much sum up my feeling towards how MS has handled its mobile OS strategy. They have simply screwed up.

Saturday, July 12, 2014

A quick and dirty algorithm for Maximum Common Substructure

While there is vast amount of literature dedicated to algorithms for Maximum Common Substructure (MCS) search, particularly with respect to molecular graph (see for instance:, I wanted to quickly write an algorithm without reading any literature on the subject. And thus this algorithm was written, typically over the weekend.

First consider finding an MCS between two molecular graphs:

1. Convert the molecule into a bit representation. This is akin to generating fingerprint of the molecule, but in this case a fingerprint is generated for each Atom in the following way:

  • Each Atom is represented as a bit-set of 64 bits, that will be able to capture a maximum of seven bonds that are connected to the atom under consideration.
  • Each set of 9-bits represents a connection: 7 bits for storing atomic number of connected atom type, 2 bits for bond type (0-single, 1-double, 2-triple, 3-aromatic).  
  • The order in which the bits are stored in the bit-set is always in sorted order: first sorted on atomic number and then on the bond type.
2. Match the corresponding bit atom representations (generated above)  among the two molecular graphs, and build a pair list. This matching is done in two stage: the first stage involves exact bit pattern match, where as the second stage involves partial match. When doing the partial match, the atom pair match that has the maximum bit matches is taken. The pair list thus generated becomes the seed for 'growing' the graph that would hopefully be the maximum common substructure.

3. For each of the pair list generated in step 2, start growing the graph using a breadth first traversal method, at each stage checking if the corresponding expansion in the paired molecule is also possible. The pair stops growing, when no such expansion is possible. And the algorithm stops when there is no growth for any of the pairs in the list. The pair with the maximum number of elements then forms the maximum common substructure. Use this pair to next generate the template molecular sub-graph representing MCS.  

For finding MCS among a set of molecules: 

4. Find the molecule with least number of atoms from the set, and mark it as reference molecule. Follow steps 1 to 3 for the pair of reference molecule and every other molecule in the set. Instead of just picking the pair with maximum elements in step 3, save the complete list (L). Next, pick the pair list that has least number of elements as reference (Lp). For a member in this list (iLp), search the complete list (L), to see if every list has the member iLp, if yes add it to a new list (Lnew). Repeat this procedure for every member of list Lp. Finally, the list with maximum number of elements in Lnew is the MCS for the set of molecules. 

That is it. I have tested the algorithm on different sets of congeneric series of molecules, and it pretty much works for all. For non-congeneric set however, one needs to build a cluster algorithm to find the MCS in sub group of molecules, that is work for some other weekend. 

For now, an implementation of this is available as a scripting function within VLifeMDS (, visit to buy a license). I will also hopefully make an implementation available with MeTA Studio soon.


Thursday, July 10, 2014

How to solve the 'phone' part of the wearable device?

That image above pretty much explains what I have in mind. Most of the wearable we have seen so far are mostly glorified notification system. While I don't really think this is the right way, see my earlier post on smartwatches here:

The problem with all the existing wearable tech is that you still need to carry around your phone. That essentially means you have to carry more devices when you are taking a wearable with you. What if the wearable device replaces your smartphone as well? With the phones getting bigger and bigger, I would like that to happen. The most difficult part, I think is to get the 'phone' part done correct (there is of-course the batter issue, but that is a different aspect altogether). And I think the perfect way to do this is to build a ring that can act as an earpiece. In fact, for most part the wrist and fingers for most of us perfectly fit in place to be near the mouth and the ears when you place your hand as shown above. I know this looks a little bit crazy. But if this done right, there is actually a revolution waiting to happen. I am particularly interested in the application and UI side of the smartwatch, it is probably the next wave of apps - should we call them wapps?

What do you thing?

Tuesday, June 10, 2014

Why so insensitive?

Two incidences that happened in last 48 hours near my house made me write this post.

The movie shooting 
So early in the morning of 9th June (may be around 7am), I heard some one yelling 1, 2, 3 .. start and then there was a roar of cars and again someone yelling ... Cut! I didn't pay attention. I am generally too busy early in the morning. Then came the kids flocking and shouting and then I came to notice that they were actually shooting a movie - some Hindi movie. So far so good. The problem started when people actually wanted to go out, including me - mostly to work. And these people who were field guys behaved somewhat curtly telling people they should not go out now and wait for some time. At first, I had an instinct to call local police station and complain. But then I realized that they had taken some 'police permission' and I could see some guy in uniform. You can easily see the problem. These guys come from outside and behave curtly, something that is obviously going to raise some temperature. But that is not the point. The thing is if people in the area were informed before hand (say the earlier day), that there would be general inconvenience to people going out of their home due to some movie shooting, it would have gone a long way in the right direction. But that simply doesn't happen. People are simply insensitive towards others. In this case the whole crew who were shooting the movie as well as the police. In fact, even putting a mere "Sorry, inconvenience is regretted" by either the police or the crew would have done a good job. But hey why should I care about you? and how does it matter? It matters. And it matters a lot when a citizen looks upon the people in the society. Hence forth, I will always have a skeptical look at any crew people from Bollywood, just because of this one incidence. With police it is a different matter, I always had a good experience with police (and Pune police in particular), with the exception of what I would have expected from them yesterday.

The marriage party
That day did not end there. There were more mysteries at hand. When I came back from work that day, I could hear some dancing and fireworks going on near a prominent hotel in the area. That was around 8pm. Thought that was some regular marriage function. But then this 'band-baja' and fireworks escalated to a height around 9:30 pm and continued  probably till 10:30 pm near the Zircon housing complex near my home. This 'band-baja' was so loud that lots of things were vibrating in the cacophony, and there were so many loud sounding fire crackers that there was a think smoke. Of course, you guys are happy about the marriage, and so must every one in the human society be. But to create a cacophony and genuinely trouble people around is a big sign of being totally insensitive.

"I don't care about what others have to say"
"I don't care about what others have to say about me"

Is being insensitive good? Probably, to some extent. And probably only when the in-sensitiveness only affects you not the people around you, not the society you live in. And it is definitely a no when that in-sensitiveness is harming others, and is doing ill in the society in which you live in.
Being sensitive to others in society starts in small ways: help otherwise-able to cross roads or politely give seats to seniors in public transport. I do so. But I also feel immense joy when I see others do it. Being sensitive, is what makes us a society, without which we do not exists.

Saturday, June 07, 2014

Inconsistent pinning behaviors in WP 8

While I have moved to an iPhone as my daily driver device, I keep hopping to my WP device; I just like the live tiles concept.

One of the great advantages of the live tiles is the ability to deep pin in an application. For instance one may pin a ticket that was booked via an app to the home screen. The concept is nice, but the issue is that even system apps do not support it properly or consistently and I have always wondered why. One typical use case is messaging application, where I would like to have the ability to pin a conversation thread directly to home screen. This is very useful especially for a SMS thread or a single SMS from say IRCTC that gives ticketing information. Currently it is very messy to search for that one particular SMS. It would be very handy to just pin that SMS thread or a particular SMS to home screen.

The same applies for the email client was well. These are some simple things that would bring more consistency to the OS. For for those who are overjoyed with the introduction of notification center in WP 8.1, no notification centers do not solve every problem on earth.

Monday, June 02, 2014

OS X Yosemite : it has got really more advanced than Windows

I love staying up late to watch the tech events live. And the latest one is that of Apple: the yearly WWDC.

Of all the presentations I watched this year, the one by Apple yesterday was simply in a whole new league. It was pretty long, but not a bit boring. In fact it was more entertaining than a long spidy movie I had watched recently. It was that good. The best part of the presentation for me was the continuity feature demonstration on OX Yosemite and iOS 8. People who remember the Nokia Symbian may say that similar phone and message integration was provided on Windows back in 2006. That is true, idea is not new, but Apple has nailed the implementation ( search for my own app, btsms, to see how arcane was this back then, and then have a look at the Apple implementation - similar idea, miles apart in implementation ). But that is what Apple does, and known to do it extremely well, so well that all the 'credit' goes to them for inventing something that was already there. OK not really. But you get the point. Others are simply not able to take an idea and execute it in the best possible way, the Apple way.

After the demo by Craig Federighi, I can safely say that Yosemite blows Windows 8 in terms of usability, to the level that I am seriously thinking of shifting my home PC to a Mac (already use a Mac at office). By focusing on touch screens, Microsoft has lost all the time and energy to bring real usability to it's desktop. The thing is so bad right now that your desktop apps are called legacy apps. And that too when they are the most usable and productive of the apps. By focusing on touch first in Windows, Microsoft brought down the learning curve for a new user, but completely alienated an experienced and power user.

With continuity, Apple has shown how desktop and the mobile device can work in harmony, something that Microsoft has been trying to do, but never made it (may be 8.1 fixes some issues and probably 9 will be a lot better, but then precious time was lost). OSX usability does not stop at this feature, it goes on to everything from spotlight search to notifications to improvements in the mail and photos apps, all of which are simply quite superior to what is there on Windows 8.

The story on the developer side is an equal mess for Windows, but seems to be  quite a harmony for OSX and iOS. And with the introduction of a new programming language, Swift, Apple has not only made programming a joy for existing developers, but is sure to attract a lot of new learners to the platform.

PS :
// has become hit, I think it will over take printf("Hello, world!"); -)

Friday, March 28, 2014

Office finally comes to other platforms - and is probably a hit

When I bought a WP device more than two years ago (the Lumia 800), my primary use apart from other smartphone capability was the Office integration. Of course my like for the live tile interface, and a year of bad experience of using an Android device also came in support of a WP device. At that time I never considered an iOS device, primarily for two reasons : it was way to expensive for me that time, and I really (really) wanted Nokia to survive. (I think apart from Apple and Nokia, only HTC makes some solid devices which are widely available, and my first phone was also a Nokia).

Things have changed a lot since. WP by far has taken number 3 in the over all mobile OS share, overtaking Blackberry. Nokia hardware division goes to Microsoft by the end of next month. iOS is still super good in terms of apps, and even if Android has overwhelming share in the OS market, no one has yet come out with that fabled 'iPhone killer'. And I think that's not going to change, for a long time to come. Essentially, for me the mobile (or to put is specifically, smartphone) game is kind of done: iPhone / iOS is the overall winner, and Android is simply too high in adoption rates to be overtaken by any other player for foreseeable future. The only thing that can change all of these, is a new product category. And no one has yet shown what it is, or to put it the other way, no one has yet met with any success.

Microsoft knows this, and to this very realization of reality, the company released Office for multiple platforms, including the iPad, which competes with Surface. It is strange to see MSFT release a product on a competitor device, when until recently the mere availability of Office was touted as the reason to choose a Surface over an iPad. But people do not want Surface, they want iPad, and they want Office. And MSFT read it clearly, and delivered. It will be a hit, even if some may say it is late. People do not realize that how hard it is to write a piece of software that was initially designed for desktop paradigm. Even the Office available on Surface is just the desktop version, and not as touch optimized as the iPad version.

Recently, for a number of reasons (including app quality and easy availably of superior Google and Microsoft services) I made a switch to iPhone. Ever since, I have been eagerly waiting an Office suite from MSFT.  Although Apple offers its own full suits Pages, Numbers and Keynote, its is not Office. So when Office Mobile was made free on iPhone, I was pretty much excited. I must say I am not quite disappointed. But at the same time I will still keep the Pages, Numbers and Keynote; currently on the iPhone they are much more feature rich than what Office Mobile has to provide. And there is no way I am subscribing to Office 365 until MSFT drastically reduces the prices, more so because I have no inclination to pay for a software subscription that I very rarely use, something like say once in a month.

Office is consumer facing as well as heavily entrenched in businesses around the world. The 'new office' is being run on cloud using the Azure services. Office backend, is probably the largest, and most complex Azure app. MSFT, has made a well calculated move with the wider introduction of Office apps, so that its subscription service can boom.  I just want them to lower that subscription cost for infrequent users like me, or better still introduce 'pay-as-you-use' model.


Monday, January 06, 2014

C++ unsigned arithmetic gotcha

Recently I came across a piece of code that looked similar to the following:


int main() {
  unsigned int a, b;

  a = 20;
  b = 30;

  double c = double(a - b);

  printf("%lf\n", c);


One may, at first glance assume that this would spit out the required -10.0, however this is not the case. It will print out a huge number something like 4294967286.0 !

The reason for this is that the datatype of a and b are unsigned types. And at least with the GCC compiler (or for that matter, I assume any compiler), the intermediate variable that is generated would be an unsigned type, resulting in "mis-interpretation" of the sign bit when the casting operation is performed. 

In other words, when a subtraction is performed on unsigned quantities, you should better be careful to see what actually is happening! 

Sunday, January 05, 2014

This year : an experiment with an iOS device

I have used a number of iOS devices, but have never owned one, and never used one on a daily basis.

Enter iPod touch 5g (16gb model).

Lumia 800 and iPod Touch: going to use both on daily basis.

Now along with my two year old Lumia 800, the iPod will be my companion daily driver device. Being only 86 grams this is a sweet little pocket friendly device and compliments my Lumia in every way.

Let us see how this combination goes :)