Thursday, May 2, 2013

Politics, Lies and HTML-5- Part I



"Three Rings for the Elven-kings under the sky,
Seven for the Dwarf-lords in their halls of stone,
Nine for Mortal Men doomed to die,
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them"
- Lord of the Rings

This poem typically describes the "promise" of HTML-5. HTML-5 has been touted as the "Holy Grail" of development. A language that finally delivers what Java Applets could not, a way to write applications once and make them work on all platforms Web/Mobile any OS anywhere. Managers(especially high-level CTO's) are typically taken in by this and dictate that instead of writing everything multiple times we shall write it once in HTML-5 and use it across. 

However, the recent "Facebook" volte face on HTML-5 and my own experiences as an HTML-5/CSS programmer has shown that managers must choose extremely carefully if they want to tread the path of HTML-5. If you go on the internet, there are people opinionated on both sides. There are ardent HTML-5 Fans and ardent HTML-5 haters. 

In a series of post's I will like to talk about HTML-5, broadly as follows:

Part-1 :The politics and history behind HTML
Part-2: The contemporary state and when to and when not to use HTML-5
Part-3: Evaluation of the best JavaScript frameworks for mobile development


History Lesson: The Making of HTML-5
So what is HTML-5 ? Where did it come from ? And what happened (or might have happened) behind the scenes to suddenly make it such a marketable term.

Let's look at the computing scenario a few years ago(say 2005):
1.) Dominant Consumer Operating System(Mainly PC's and Laptops): Windows (>90%)
2.) Dominant Browser: Internet Explorer(>90%)
3.) Dominant Server Platforms: Fragmented

Whenever a platform is fragmented, there is always a push to try and make "Cross-Platform" code. Most of the code written in the world is not rocket-science and so it is a pain for small startups and shops to write code for every platform. It is this "fragmentation" that was exploited by SUN/Java to make J2EE a dominant enterprise software platform. However, as most people from the early 2000's know, J2EE is and was very slow. Writing, anything cross-platform reduces  performance.

Something happened around this time, we call this the Web 2.0 phenomenon. Computing started moving towards the web and away from the PC. The logical culmination of this is the cloud. Thus PC's began to transform into nothing but portals for the web.

This was fueled by two things:-

1.) Better User-Interfaces using ActiveX, Flash, SilverLight...
2.) Better(But not as great as Point 1) User-Interfaces using Web 2.0 technologies.

The best UI's were written in Flash(or ActiveX for enterprisy programs like Test Director). Web 2.0(AJAX) improved the Ux, but nothing could match Flash. 

Why was the famed- "Web 2.0" not able to replace Flash:- Because they could not hook into native os code, like the way flash did in a manner consistent on all platforms.

Flash became the JVM that never was. You program to flash and flash would ensure it would work cross-platform. It was a great deal.

If you have to program in "Web 2.0" you needed to take care of a multitude of things:-
1.) Will it work in IE 6,7,..
2.) Will it work in Firefox
3.) It might be right code, but oops..IE has a bug in rendering it that way
4.) Did you know there are 2 different Ajax objects....
etc..etc..etc...

Add to that the following:-

5.) JavaScript rendering was slow
6.) No way to do Video, Audio, Animations, etc...
7.) Very little tooling support(Firebug was not invented yet)
8.) No standardized way to integrate.

In other words writing a serious Web 2.0 app was a major challenge. On the other hand Flash had a drag-and-drop IDE with full tooling support. 
Flash promised the one thing Web 2.0 couldn't- Predictability.




The Empire Strikes Back- The politics and rise of HTML-5

So when did we move Web 2.0 to HTML-5 and what problems does it solve. Well HTML-5 attempts to solve some of the problems above, but does not manage to solve any of them completely.

Let us consider the thinking behing HTML-5 and why it was being developed by the major software platform vendors:-

1.) Microsoft had no interest in developing HTML-5. They were pushing for Silverlight and proprietary extensions. A lof of what you can do in HTML-5 could be done using Active-X.

2.) Google(Pre Android Acquisition) had the most stake in developing HTML-5. Google, wanted the "Web" to be the OS and wanted to control it via "Chrome"(Browser) and later "Chrome OS". Hence. it needed a new platform- HTML-5.

3.) Firefox(Mozilla) wanted to beat IE, and hence bet on HTML-5.

and then it happened: then came the iPhone and the mobile 'revolution'

The entry of Apple

So Apple in 2007 unveiled the iPhone and iOS. The device took the mobile world, by storm and it became the dominant computing platform for mobile phones. This was followed by the iPad another revolutionary device.

But it was more than that, it was an "Eco-system". Apple earned on app-store submissions and via native apps.

So what did Apple want:"They wanted developers to develop native apps and stick to their platform".

This sparked the whole question:- "Mobile Apps or Mobile Web". 

A enemy of an enemy is a friend 


The question that Apple asked is:- "Who is the biggest competitor to my user-experience?". The answer was not HTML or Web 2.0 , it was Flash.  Had Apple, allowed Flash to run on iOS people would have programmed even more in Flash as now they could do complete cross-platform using it.

So what did Apple do:- "They promoted HTML-5 by attacking flash". All the comments about Flash being unusable and a battery hog, were only partially true. Apple wanted to kill Flash/Silverlight etc and replace it with a puppet ruler: HTML-5, which they know isn't strong enough to challenge native authority.

And to ensure that it cannot: "Apps developed using HTML-5 do not have access to the Nitro JavaScript engine in mobile safari thus being even slower than a mobile web".

This was simple old-school colonialism:- Replace the current king who can resist, with a weaker puppet and further diminish his powers all the time .

Apple single handedly made  HTML-5 Cool....so that any user-experience other than native could not dominate.

Meanwhile...back in Google Land
Google suddenly found that their dreams of the web being the true platform were being overtaken by the mobile revolution. What do they do? They acquire Android.

Now, one must remember this: Android and Google were different companies and this still reflects.


Android was the answer the to the iPhone and became more mass-market. But Android, had the same aim as iPhone:- "Make native apps cool".

Google still had the aim to make the web-cool, so they continued investing in Chrome, however Android did not catch-up.

Android's default browser did not catch-up with Chrome and hence it continues to have a horribly bad performance vis-a-vis chrome.  The team put HTML-5 as a "lower priority".

How to make HTML-5 Cool?

So how did Apple and Google make a sub-standard or not ready platform - "Cool" for everyone to use.

Let us first understand what makes a platform cool. It can be bought down to just one word-  "Animations".

Try this out, open an iPhone and Android and play with it, then open the mobile website and play with it. Everything in iPhone and Android animates  smoothly.  Whether it is going from the homescreen to the apps or vice-versa.

To make HTML-5 Cool, it was critical that we had "animation" built into the browser.

Enter the Vikings- WebKit

So what really made HTML-5 cooler than Web 2.0. The answer surprisingly  lies in a software developed by a company which is widely considered dead in innovation:- Nokia.

Nokia, developed the "Webkit" engine which is the "rendering" engine that  powers a host of browsers. It all started with an effort to make a desktop UI for Linux(KDE) and then a "cross-platform" framework for native development(QT). The Webkit project was collaborated on by devs from Apple, Google and Nokia to define a system to make great UI's, great transitions etc.

Later it formed from KDE to develop into a rendering engine, and this was the rendering engine that powers Chrome and Safari.

So how to make it cool:- "Add webkit specific properties to do things like animations etc."
Webkit, allowed rounded corners, animations , video and a host of other features that meant you could make a UI that would look just liked the native animated cousins.

On top of that Apple added a bunch of tags to make it look like you can make great apps by wrapping webkit inside an app and could make great web-sites etc. by adding hardware acceleration etc.

However, there was a catch. "Android" did not implement all the features fast-enough and Apple made sure the WebKit experience was great in "mobile safari" but always lower than native apps. For example till iOS 6, you could not do file uploads in mobile safari and with iOS 6 you can only do this for Photos and the Gallery.

What about the other kings...


1.) Mozilla reacted to the growing increase in Chrome usage and in mobile safari by adding some of the same effects(using -moz tags). Later, everyone agreed to make them a standard in HTML-5.

2.) Microsoft, was loosing out big time. Neither was their browser king anymore nor their mobile platform and the OS was well only being used because it was legacy. It needed, do something fast. It did the stupidest thing imaginable. It removed support for Silverlight and joined the HTML-5 bandwagon with IE 10.

3.) Blackberry(Previously RIM) and other mobile vendors like HP realized that they needed to get WebKit on their side. So, they re-wrote their browsers by even buying companies, so they could get WebKit and hence "HTML Developers" to write code for them.

and hence was bor HTML-5, the true cross-platform language.

What's the current state


So, is HTML-5 really a puppet king, really sub-standard. Well, as the Americans learnt about the Taliban and Dr. Frankenstein about his monster, be careful who you make a puppet king, he may just come back and rebel...in the next post we will see where HTML-5 is and what can be done with it....












Sunday, November 25, 2012

Scrum and outsourcing

I was recently in a project that was based on the "Scrum Methodology" of working. I like Scrum and general Agile principles. I think when applied within a co-located team working to create a product it's a really good thing. However, I primarily work for an Indian IT Services Firm a.k.a- "Outsourcing". Things get very complicated in using such a methodology when it comes to outsourcing or working with teams which are in different companies.

A small history of software development models

In the early part of the new century CMMI was the "in-thing". The CMMI model primarily employed by offshoring companies was a way to assure customers who were wary of outsourcing their work that Indian companies who would be polar opposites culturally and time zone wise, could carry out the tasks given. It is a highly formal model very well-suited for Indian IT of that time which tended to hire low-wage and low-talent workers, put a process around them and get work done. This worked exceedingly well for repetitive boring work and with companies that had tons of money to spend, especially since Indian Outsourcing was cheap. It gave the statisticians and the QA guys great insight and software was reduced to a commodity. However, the key thing is that this only works in low value software tasks where everything is highly structured and certain. 

The problems with the waterfall approach and CMMI are apparent to any company trying to build a new product or idea, it is just too structured and life can't follow that. Silicon Valley, and contemporary software went to the other end XP , Agile, Scrum and Kanban became buzz words for software development. I find these models much more suitable for working in situations where things are not so certain and structured like building a new product.

The outsourcing problem

Another change that has happened in the past 4-5 years is that offshoring and outsourcing to India has gone from just grunt work to a lot of high value work. People, are not just looking for vendors but partners. It was obvious that Indian companies would cash in on such buzzwords like XP, Agile, Scrum etc. to further show that they too can follow innovative processes and work in an unstructured manner. 

Meanwhile, a lot of work went from Time and Materials to Fixed Bid. Outsourcing companies get typically  higher margins on Fixed Bid work and customers get to control their costs. 

The problem in my opinion with Agile Processes is two-folds:-

1.) There is no mention of the "Bid" or Proposal Stage. In this stage typically a vendor is supposed to bid for a project at a fixed price. Vendors, have to "estimate" the requirement and give a quote for the same.  This very process is the root of all problems. To "Estimate" a requirement there needs to be clarity of the requirement, but the whole reason for the XP/Agile methodologies is because the requirements are complex and not clear.

2.) Consider the Product Manager role and the Product Backlog. If this is done by a client, he will ensure that even if it does not make sense the vendor delivers all the features mentioned in the proposal.

I have seen this play-out in funny ways. A project I was working with, we had defined a feature 'X' in the system during the requirements stage. However, 3-4 months into development, the team which consisted of the vendor product manager and us both concluded that feature 'X' did not make much sense. However, the 'Management' still forced us to do something to do feature 'X' even though it made absolutely no sense. 

On the flip side the Product Manager's role can be given to the vendor. However, this is counter-productive as well. This first of all would need the Product Manager to sit in the client side and do all the business meetings required by "Stakeholders". This is generally hard to do especially in a vendor-client relationship. 

Also a vendor PM in a fixed bid project has a different agenda- "deliver fast" than the business. Once again, he faces the problem that he cannot re-define scope on his own.

Thus both methods suffer in a fixed bid agile process based project. In a time and materials model this would work but then that is no different for a company to hire contractors.

The point I am trying to make is that a lot of the so called "Software Development" models do not take into account commercial considerations when multiple companies work together to make software. Their assumption of co-located teams working in synchronization and harmony breaks down in many such scenarios.

What  I think is needed is that newer models that take into account - "Commercials" and "Organizational Boundaries" need to be developed to increase the success rates of IT Projects around the world.












Tuesday, November 20, 2012

The horrible lack of customer centricity in enterprise software

I have been working with enterprise software for a while now. At first, I liked this world, it seemed to be doing good things. However, recently I have come to appreciate how really bad some of the customer facing software actually is.  Most enterprises, don't really care about their customers. They have  a "Business Process" that they want to automate and guide without fully understanding if this is the way their customers think. This is especially true in financial services. 

I read a blog by Joel  on mental models. He talked about how if a software or hardware matches the mental model a user has it will be a hit. This fact is so totally ignored in enterprise software and I am surprised many companies get away with it. The surprising bit is, some companies actually want this to confuse their users more. 

As technologists, we need to take spread the revolution to make simple and easy to use software that customers can instantly relate to. I am sure the first company to do that will achieve the same kind of dizzy success Apple has had in the telecom/devices arena.

Friday, September 23, 2011

Why Microsoft is abandoning the PC and Android Tablets are so expensive



There has been tremendous hype about Tablet and Mobile Computing. However, I often get doubters, in fact myself doubted whether this was just a "Fad" which would dissipate in a few years or was there something concrete. The utility of tablets vs. PCs have been debated endlessly and this blog is not about the technical merits of one or the other.

A few recent trends in the PC world has convinced me that PC computing as we know it is going to be "abandoned" by major manufactures. PCs might not die easily(Hell, even mainframes are not dead, with a major competitor of my client still selling new AS/400 based systems), but it will easily loose prominence and support and cede the way for the tablet and this has nothing to do with technology.

To understand this phenomenon we have to understand the eco-system that supports the PC world. In the PC world "Wintel"(Windows+Intel) was king. People, wanted a Windows PC running the latest Intel X86 Processor(486, Pentium, i3,i7...the list is endless). Everything, else was just pricing. Windows and Intel were making most of the money and here is the key point:
Hardware Manufacturers had profit margins in single figures or lower double figures.

Indeed, it was this lack of profit margins that made IBM , the inventor of PCs to sell of it's PC business to Lenovo!!. IBM(wisely) decided to concentrate on the much higher margin software business. HPs recent declaration to do the same citing profit margins further corroborates this. HP(since it consumed Compaq) is the largest seller of PCs in the world and wants to sell this off. The problem for hardware manufacturers is that margins are razor thin at 6%-11% for American companies. The problem is even worse for Asian companies with some selling at margins of nearly 2%. The eco-system is shown in the figure below:

Source: DataInsights

Why do hardware manufacturers still make PC's if the margins are so low. The answer, is simple: Volumes!!! HP's 5% margin on it's PC business still contributes to half it's revenues and profits of nearly a 9 Billion Dollars.

So clearly in the PC world Intel and Windows were king having profit margins in the 30-40% level while PC manufacturers were to use the economic term: commoditized.
But what about Apple you may ask!! Apple being in control of their entire chain always maintained high profit margins even for Macs. Apple gets more profit from the sale of 1 Mac as compared to 7 PCs by HP. Apple however did not get the volumes in the Mac as compared to HP and Dell and Pcs and such were things until something disruptive happened: The tablet was born(re?) with the iPad.

It is clear from all market data that the iPad and tablets are cutting into PC sale volumes. The figure below shows the trend of notebook sales(Source: OnlineMarketingTrends)


Indeed IDC PC Watch has shown that overall Year-on-year in 2010 and 2011 PC/Netbook shipments have fallen by about 4.2% with the only silver lining being a bullish sales of MacBooks and Lenovo in the US..

Compare all this doom and gloom with the tablet market. Apple's Profit Margins on the iPad is rumored to be at: 42%.

But here is the real deal: When you go and buy a tablet you buy an Acer, a Playbook, A Samsung Galaxy not Android+ (Whatever Processor) or iOS.

This means that once again hardware manufacturers are free and the wide range in specs for the tablets means that they can get much higher profit margins with high volumes(oh joy!!).
Add to this the fact that Android is free(Google makes no money in it) and you can see why all hardware manufacturers are moving like droves to the tablet market.

And this is why non-iOS tablets are so expensive. In trying to keep their margins high, manufacturers like HP, BlackBerry and the rest are trying to sell it at prices comparable to the iPad but not having the same features.

The aim is simple, to quickly become a market leader in this area. This is no different from IBM who in the first few years of the PC era was making profits at 40% before being beaten down by nimbler competitors like Dell, Compaq and subsequently HP.

But what about "WinTel". Both companies have missed the bus. Intel lost to ARM and NVIDIA as most tablets are powered by these processors and Microsoft is increasingly seeing the carefully built OEM eco-system being completely taken apart.


But more surprising are Microsoft's moves, however logical considering the big picture:
  • Partner with Nokia(another struggler) to get the hardware edge
  • Reveal "Metro" UI as default UI for Windows 8. The "Metro" UI is more optimized for touch rather than click.
  • Make Windows 8 work on ARM without support for older Intel Based Apps!!!
  • Remove Plug-ins from Windows 10 "Metro Browser"
  • Make the Programming for Metro as HTML+JavaScript in preference over .NET
In other words Microsoft has relegated the "Desktop" to second place. Though, it will still support the desktop, it is clear that the desktop will in a few years be what Win 95 is to us. A relic of times past.

Even their Server strategy has taken a major change. Windows 8 Server beats the pants out of cloud computing technology like Citrix and other major cloud systems. Gone are it's emphasis on .NET servers alone.

Clearly in the long-term(3-5 years?) MS is betting that the changed economic systems means that PCs and Netbooks are relegated to ancient technology pieces with hardware manufacturers literally forcing the tablets down the throats of users.

We live in interesting times and the chess game has just begun as the industry sorts itself out. This entire situation is an ode to the man who started the PC revolution, lost, started the animation revolution , the mobile apps revolution and finally the tablet revolution: Steve Jobs!!!. Let the chess game begin



Saturday, July 10, 2010

Status Updates

It has been a long time since I blogged about anything. I have had a great number of ideas, but got busy with doing a lot of things at the same time. I will blog about some of those ideas later.

A colleague of mine, suggested I start a pure technical blog to document my work with technology for the technology geeks. I was reluctant in starting a pure technical blog since I believe there are too many of those out there anyway. But, I have increasingly noticed my habit of forgetting, important things, especially when I do some analysis years ago and try and remember what it was that I did.

Hence, the technical blog is more like a research journal and is actually for me to document my work. I will feel great if someone actually benefits from it.

You can access the blog at http://vikrantresearch.blogspot.com. It is aptly labelled Memoirs of a Certified Geek.

Friday, February 5, 2010

Are the IIT's obsolete?

I have had a recent animated debate with a close friend DP on a topic after watching the movie '3 Idiots'. This debate is neither new nor original. It was the standard, what can we do to improve research in India. (Inspired ofcourse from watching '3 Idiots').

Did you know that we do not have a SINGLE nobel prize winner from free India? Don't believe me check out http://en.wikipedia.org/wiki/Nobel_laureates_of_India)? Ofcourse, Mother Terresa and Amratya Sen are the only Indian "Citizens" to have won the nobel prize. The former came from Yugoslavia and the later actually stays in London. But in Science and Tech, we have had people of "Indian Origin" getting the nobel prizes, but not one true Indian making it till now. It is a strange statistic after so many years of independence. (Funny, we had nobel prize winners before independence).

On a related note, I was just checking out a video on TED about Pranav Mistry's Sixth Sense technology. Amazing, Pranav is surely one of the foremost inventors of the world. I checked his profile on Linked-In. B.E Gujrat Uni, M.Tech (Desg) IIT Mumbai and then MIT. Again, MIT takes credit for his inventions.

These observations beg the question, when will India become truly innovative and when can our own people(who clearly have the talent) have the platform to showcase their inventions and bring them to the world, independently of the Americas?
Again, none of these questions are new and have been discussed to death before in casual talks. DP and I had opposite views on this topic.

I am of the opinion, that the very "pride" of our countries the IIT's have lead to a class based system in our education that is actually hampering research and original thinking. According, to me we need an overhaul of the higher education system, making it more in line with the way the west works.

Here is an example, the US awards an "MS" (Master of Science) degree and the UK an "MSc." (Master of Science Degree). In India, if you have an MSc. you are looked down upon as it is considered an inferior degree. AFAIK(though DP disagrees) there is no equivalent to our B.Tech or B.E Degrees in the West.

To understand this further, one needs to look at the history of the IIT's. They were formed when independent India desperately needed native engineers to work on it's infrastructure projects in the 1950's-60's. Setup, by foreign hands(America, Russia, Germany, UK) their curriculum was/is designed to promote top-quality engineers and they have been more than successful in that. However, there is a catch- their curriculum was not designed for "Original Thinking" or "Mixed Thinking". Worse, by making them exclusively engineering colleges there is no concept of courses outside engineering. One cannot major in Mech. Engineering and Minor in History or Music at the IIT's. Somehow, I believe that this is an essential spark for a creative environment.

Secondly, the govt. still grants a disproportionate amount of money into the IIT's at the costs of other universities creating a deliberate class system. This has the impact that actual universities(The IIT's are not universities) are less funded and hence are less research oriented than the IIT's.

This is not to say, the IITs have not produced good stuff. They have produced great things. However, they seem to be more a training ground for people to go to the US and produce the final product rather than producing it themselves. The IIT-JEE Entrance exam, the toughest in the world is an example of what is wrong. The exam makes people miss the best 2 years of their lives (high-school) cramming theoretical Physics, Maths etc. This is good as it produces great engineers. It is bad, since those years could lead to great inventions, but no one has time to do these as they have to study. (Steve Wozniak who started Apple, made the PC when he was 16-17 and in high-school. Imagine, if he had to study for the IIT-JEE exam, what would have happened).

The main reason why this may be, is because we in India join colleges for "jobs". I remember my final year, when people went into great depression when they did not get "jobs". As Nandan Nilekani says, we have had a lot of ideas that have come of age like those of "entrepreneurs","demographic dividend" but the idea that "research" is something fundamental has not yet sinked in. Hence, our industries have mostly been service oriented, clever use of economic imbalances and yet we do not have the kind of hi-tech research that can propel a country to new heights.

We now face a peculiar problem in our higher-education. We need the millions of trained engineers to feed our service industries, and yet we need to start producing great researchers. My verdict is that we should probably disband the class based system of the IIT's and concentrate on holistic university environments throughout the country. People, should be admitted as in the west based on their overall performance in school(Class XII in India is a joke right now) with the first two years letting them explore their talents. The last two years can decide what they actually want to do. This is to a certain extent impractical in India, simply due to the sheer competition that India has. But, I am sure we can construe a practical solution to the problem. Hence, I say convert the IIT's to regular universities(albeit top ones) and regularize the degrees. So, everyone can be a B.S(or BSc.) with a specialization in a certain type of engineering. Let the actual branch be decided on the first year of campus, rather than preselecting it during the entrance itself and for god-sakes pour money into research. If nothing else, it is worth noting that now we have 10-12 IIT's but the only institutes that are well-known for their research is the IISc and the ISI we only have 2.

However, my friend DP believes that it is better to re-structure the IIT's courses albeit, maintaining the class system that has generated because of it. He thinks, if the IIT's change course the others will follow.

What say the rest of you?