There are times when I fling out my Windows Phone 8 device out of my pocket, few of my friends and colleagues go… why? Why Windows Phone 8? Why not Android? To all of them, my standard response is that I do not want to become a part of the "Borg Collective". Well, that is the short answer. Here goes the long one…
Please understand that as a company, Google creates excellent services like Google Search, Mail, YouTube, Maps etc. However, in my opinion, Android and Chrome OS are not one of them. They are just a bloody mess with sugar coating on top. I am not against the open source community either. I love and use Ubuntu. I even test Haiku OS and ReactOS on my machines. My primary machine runs Windows 8. Let's face it. 91.56% of our computer using population runs Windows on their machines and I am no different. I am not a Microsoft fan boy either. I do understand where they came from and what they are doing. However, simply dismissing their product on their previous reputation and not being open source is stupidity. Open Source operating system has been with us for a long time now and they have really done wonders in the enterprise world. However, in the consumer world, Windows became a hit for a reason. It makes your system more usable and allows a variety of standard ways for a developer to leverage the hardware for his or her applications. Yes, there are plenty of ways to screw up Windows. You could install anything from the internet that flashes and is free. And for people who do that, we have something called as "Tech Support". Microsoft is trying to change all that with Windows Store apps like Apple with its App Store and Google with Google Play.
First of all, the "Windows" the general public knows is actually just one part of the modern Windows NT operating system. They usually mean the Win32 subsystem, a layer that sits upon the NT kernel, providing the user and application interface. NT is still around, known as XP, Vista, 7 and 8. Most people think of "NT" as "WinNT 4", while in reality the term NT refers to the NT series, which ranges from version 3 over NT5 (2000, XP, 2003) to NT6 (Vista, 2008, 7, 8). The NT architecture was designed by a team lead by David Cutler, a former lead developer of VMS. It took them more than 4 years to combine the best of UNIX, VMS and OS/2 and create the NT architecture.
The ReactOS team has been around for ages trying to clone the Windows NT architecture. However, reverse engineering anything for which you do not have the source code is hard and time consuming. Still, ReactOS is in beta; 0.3.15 as of this date and is fairly useable most of the time. I for one what to see this project succeed so that the world gets an open source replacement for Windows. The ReactOS project re-implements a state-of-the-art and open NT-like operating system based on the NT architecture. It comes with a WIN32 subsystem, NT driver compatibility and a handful of useful applications and tools. ReactOS combines the power and strengths of the NT kernel - which is well known for its extensibility, portability, reliability, robustness, performance and compatibility - with Win32 compatibility.
Mac OS X, Linux, BSD and other UNIX derivate share a common heritage based on a more than three decades old design of a simple basic operating system, which has evolved over time into a complex structure. Modern incarnations like Mac OS X put a fancy graphical user interface on top of UNIX/Linux, to hide system details, but focus mainly on beginners, and many advanced users are left out in the rain, as most advanced features cannot be accessed from the graphical user interface. Almost all UNIX flavors retain some of the original design flaws and binary compatibility between various versions is usually non-existent. In theory there are a few UNIX standards like POSIX but in practice the standards are old and cover only the basic operating system and the terminal environment. Other standards such as the Linux Standard Base are often not implemented faithfully. As there is no user interface standard or a standard API, most people still have to use command line applications or fight through the GUI mess. Many UNIX derivate uses the de-facto standard X-Window system for graphical output, which might well possess one of the worst designs in software history. Still, modern UNIX derivate are trying to catch up with recent innovations and some of them already possess important features like access control list support.
What about Android?
Android is a Linux-based operating system designed primarily for touchscreen mobile devices such as smartphones and tablet computers. Google uses a modified Linux kernel for Android. In the recent past Google has not played fair with the open source community. Read this and this. However, Google has since learnt that you must give back from where you once took.
Apart from the Linux kernel and few libraries and tools, there is nothing that is same with Android and other Linux distributions. Almost all Linux distributions uses X as the software system and network protocol that provides a basis for graphical user interfaces (GUIs). Android does not do that like iOS and MacOS X. This, by the way, completely thrills me. Both Apple and Google realize that X can be a real bitch to deal with. Ubuntu has already announced that they will move away from X gradually and most probably embrace the Wayland display server.
Google (Android Inc.) did all the right things when it came to taking the best of all open source technologies and putting it together. But, the choices that it made while deciding the application runtime layer is what ticks me off. Dalvik VM and Java! Java bytecode running in the Dalvik VM. Are you FKM? Now, I understand why Google did it. Even if Android where to be re-compiled for a different architecture, your apps would still run because the Dalvik VM will take care of the translation. And if you wrote a pure Java app, Android will take care of the Java bindings automatically. This is a big plus. But what about performance? Simply put, it sucks! Yes, I already hear people screaming that Dalvik has JIT and you can do JNI. More on that later. Dalvik is a register-based VM. The relative merits of stack machines versus register-based approaches are a subject of ongoing debate. Read this. As of Android 2.2, Dalvik has a just-in-time compiler. However, tests performed on ARM devices by Oracle (owner of the Java technology) in 2010 with standard non-graphical Java benchmarks on both Android 2.2 (the initial release to include a just-in-time compiler) and Java SE embedded (both based on Java SE 6) seemed to show that Android 2.2 was 2 to 3 times slower than Java SE embedded. Java SE is a stack-based VM. Read this. In my opinion, Google should have never used Dalvik and the Java language from the start and thus could have avoided the litigation they have with Oracle.
What about JNI? WTF? People use native code for better performance or reusing existing code. And that is exactly my point. Why should I have to use C/C++ and Java for my project? That to me is just creating Frankenstein. Moreover, running native code is complicated by Android's use of a non-standard C library (libc, known as Bionic). And unlike the Java application development based on the Eclipse IDE, the NDK is based on command-line tools and requires invoking them manually to build, deploy and debug the apps. Yes. I know there are 3rd party solutions. But why 3rd party in the first place? If Google had made the Android runtime in native code, we could have all used a GCC based SDK (which does a brilliant job at generating optimized native code). Microsoft solved this problem for WinRT apps by allowing Visual Studio to generate different binaries for different platforms at the same time from the same source code. Google should have done the same. I think Java programmers are sloppy. No offence (if you are a Java programmer), but the language and the runtime will convert you to one. Imagine, allocating a big chunk of memory and not releasing it. A C/C++ programmer will shudder at that thought. The Java guy will just say - "The GC will take care of it!" What? Imagine playing a first-person multiplayer shooter game written in Java. Just when you are about to frag that guy for a win, the GC kicks in! Damn! This is exactly the reason why all big budget games are written in C/C++ by real programmers. Then again, Java programmer can be found at the drop of a hat. There are too many of them. The fact is Java programmers have no programming discipline. They are like drivers who have to be constantly monitored by a police (VM). A C/C++ programmer on the other hand knows what to do when he sees the traffic lights… he follows the rules! There are many things that you can do in Java and get away with it. I guess that is why you can ship your software faster. No wonder it is called RAD. But RAD is not a solution for everything. Windows Phone is not perfect either. I hated Microsoft when they said that all apps on Windows Phone 7 had to be written with Silverlight and .Net. That meant I had to use a managed runtime. However, at least on the Windows Phone 7 the CLR (read .Net VM) is a mature and optimized one. Then Windows Phone 8 came along and Microsoft did the right thing. They allowed apps to made using native code only and easily harness the power of DirectX. Something that most Windows programmers are aware of. Microsoft still retained the ability to run Windows Phone 7 apps on Windows Phone 8. Getting the hint Google? Heck even Apple knows this! All iOS apps are native code. No wonder all Apple devices feel so fast and fluid. The same can be said about Windows Phone. On two similar spec devices power by the Qualcomm Snapdragon S4, Windows Phone feels faster and works better.
There are people who say all devices in the world will start using Android. Seriously man? What are you smoking? If you say only tablets and smartphones, I might just believe you. But do you use a tablet or smartphone to finish that report for your boss? Can you run an office with Android laptops and desktop? I dare you. I recently had a chance to use an Android 4.2 based TV stick from Rikomagic. The setup experience was absolutely horrible to say the least. I had to go through multiple huddles to get my external hard drive working. Android does not make use of the external keyboard properly. For instance, there are almost zero keyboard shortcuts and tab key does not move the focus on the screen. There are almost no configurations options for an external mouse. My Microsoft LifeCam does not work at all. All these things worked beautifully right out of the box on an Ubuntu system. I am now considering putting Ubuntu on the device and using XBMC as a Media Center. As of now Android is only good on a smartphone or tablet and I am pretty sure that is where it is going to remain for the next 20 years unless Google starts doing things right. There are people who call Android a mature operating system. Mature? The only thing mature about it is the Linux kernel. Google, you still have lots of homework to do.
The next mistake Google did when it released the Android OS was to invite everyone to the party! I am taking about Google Play. Any Tom, Dick or Harry can be an Android developer and submit apps to Google Play. There are tons on apps on Google Play but more than half of it is junk. Even worse, some are malware. If you are using an Apple or Microsoft device (running Windows Phone/RT), you can be rest assured that you will not get any malware. Almost no anti-malware program exists for Apple and Windows Phone/RT devices. Now, can we say the same for an Android device? Only recently Google has started to be stricter about what a Google Play app can or cannot do. They should have done this from the beginning. And giving people access to install apps from "Unknown sources" is a bad idea Google! People say Android has many free apps. Oh yes. It does. But when you install and run those, half of the screen is filled with ads. Many times these are in-your-face types! This is exactly what you are good at Google. We all love your search engine, YouTube and Maps!
No two Android devices will work and feel the same. Take HTC and Samsung Android devices for instance. You are using an HTC phone and decide to buy a Samsung. If you have not used a Samsung phone before then get ready to spend your quality time with your phone for some time. On the other hand a Windows Phone user feels right at home even when the hardware manufacture changes. The worst part is that Google allows the hardware vendors to change/modify many parts of the Android UI which effectively kills the real Android experience. Most hardware vendor seldom updates these customized parts of the OS. You are at the mercy of the hardware vendor to get the next version of Android on your device. On Windows Phones, all OS updates are pushed directly by Microsoft.
Enough rants for today. I might update the blog with additional stuff as and when they cross my mind. In the meantime, you may put your comments below.