30 Dec 2014

Project Ara: Changing mobile computing as we know it.

Mobile Computing has come a long way since its conception in 1984 at Motorola. We’ve seen a plethora of game changing products and concepts in these 30 years. But in 2015, we encounter an idea that could impact every form of consumer computing, let alone smartphones and tablets. An idea that has been quintessential to the survival and recent resurgence of desktop computers. An idea that could revolutionize the mobile computing market. Modular smartphones, perusers, are a mere year away.

Forgive all the beating around the bush, but the fact remains that Project Ara’s immense potential is enchanting. Every smartphone/tablet user has, at some point, gazed longingly at the new flagship and felt angst at the computing behemoths that short changed them, even though they had laid down hefty sums for the incumbent flagship just months ago. Companies charging premiums for newer models every year (or in Sony’s case, 6 months) has never been a rational concept. Yes, technology grows exponentially. Yes, the competition is intense. But so is customer exploitation. Project Ara seems the panacea to this ravaging exploitation.

So, what is Project Ara? Here’s the official description, from the project’s official page. Excuse the sad attempt to mask my laziness. 
“Project Ara is a development effort to create a modular hardware ecosystem--rivaling mobile apps in the pace and level of innovation--around smartphones, with the goal of delivering the mobile internet to the next 5 billion people. Put another way, Project Ara aims to enable users to create a modular smartphone that is precisely tailored to their functional and aesthetic preferences.
It all starts with an endoskeleton, or “endo”, the structural frame and data backbone of the device. The user can populate the endo with “modules”, the building blocks that make up the vast majority of the phone’s functionality and features. The modules can be easily and safely inserted and removed at any time, even while the device is powered on. The modules also have user-replaceable covers or “shells,” which provide a creative canvas for users to make their phone look exactly as they wish. Ultimately, customers will be able to buy a complete Ara phone, configure one from scratch, or buy additional modules through the Ara Module Marketplace.”

In a nutshell, Project Ara smartphones would be just like desktop PCs. Pick your modules, slot them together and you're ready. Upgrade by simply swapping out modules. You could even by extra modules and swap them in or out as necessary.

The possibilities seem endless. Imagine how convenient it would be to carry around a space battery module in your bag on a particularly long journey, swapping it in as needed, eliminating all the fretting about battery life. Find the high megapixel camera on your current smartphone pointless? Fancy a larger speaker instead? Project Ara would allow you to swap out the camera for a larger speaker. Phone getting slower? Need more Storage? Desire a faster processor? Happiness is a swap of a module away.

If smartphones came about with the goal of making people’s lives easier and consequently empowering them, Project Ara would seem the enforcer of these ideals. Giving users complete power over their smartphones, allowing them to pick exactly what they want and what they don’t, sans compromise (in terms of hardware, at least), is what Project Ara would engender. For all of you who craved Samsung’s stunning AMOLED screens, Sony’s Exmor-R image sensors and HTC’s brilliant Boomsound speakers in one phone, your prayers are soon to be answered.

Prototype Render by Garrett Kinsman
Ultimately, Project Ara has profound implications not only for Smartphones and Tablets, but Laptops too. And quite a few other accessory markets, but more on those in a bit. Much like tablets (the iPad more like) in the early 2010s, Ultrabooks are the rage in the Laptop market right now. Beautiful, pixel-laden screens, Efficient, silent and quick processors, decent battery life and the ever important size-0 body, they’ve got them all. The catch? A motherboard with every component permanently soldered to it. Once you configure your ultrabook at a store or online, that’s it. You’re stuck with the same configuration until you deem a new laptop necessary. But if smartphones make the jump to Modular components, it can only be a matter of time before laptops do too. And I don’t mean the current icky struggle of pulling a laptop apart for a new stick of RAM. I mean complete modularity, like an Ara smartphone. The day an Ara-esque laptop is announced, Tech geeks, Designers and Macbook-toting Hipsters will sing the praises of the lord.

We’ve also got to consider accessory markets that have become so prominent over the last few years. External portable batteries, external storage for smartphones and tablets, external flashes and many more are in quite the parlous state with the advent of modular smartphones. Most of these accessories would be redundant, considering that users could very well invest in modules and swap the modules in or out as needed, rather than buy and lug around external accessories. 

While I have portrayed Project Ara as the messiah who can’t come soon enough, an ounce of pragmatism and patience is requisite, along with all the teeming optimism. 
Ara will face numerous challenges on its path. Getting established market giants to potentially give up enormous profits for consumer empowerment, gaining traction amongst the masses uninitiated in tech, ensuring that modular smartphones withstand rigors of everyday life, let alone waterproofing and dustproofing, are all said easier than done.

But after dreaming of modular smartphones ever since the greed of a faster processor befell me, I cannot wait for the day they become reality. It’ll be a golden day for technology.

26 Dec 2014

Web Crawler Primer

Search Engines! - For most people, this term immediatly translates to Google! 
But almost 60% of the people don’t know how it works. So I thought of making this document about the basics of a search engine…. A web crawler!

A Search Engine Spider (also known as a crawler, Robot, SearchBot or simply a Bot) is a program that most search engines use to find what’s new on the Internet. Google’s web crawler is known as GoogleBot. There are many types of web spiders in use, but for now, we’re only interested in the Bot that actually “crawls” the web and collects documents to build a searchable index for the different search engines. 

The program starts at a website and follows every hyperlink on each page. So we can say that everything on the web will eventually be found and spidered, as the so called “spider” crawls from one website to another. Search engines may run thousands of instances of their web crawling programs simultaneously, on multiple servers (like the one shown above). When a web crawler visits one of your pages, it loads the site’s content into a database. Once a page has been fetched, the text of your page is loaded into the search engine’s index, which is a massive database of words, and where they occur on different web pages. All of this may sound too technical for most people, but it’s important to understand the basics of how a Web Crawler works.

So there are basically three steps that are involved in the web crawling procedure. First, the search bot starts by crawling the pages of your site. Then it continues indexing the words and content of the site, and finally it visit the links (web page addresses or URLs) that are found in your site. When the spider doesn’t find a page, it will eventually be deleted from the index. However, some of the spiders will check again for a second time to verify that the page really is offline.


The first thing a spider is supposed to do when it visits your website is look for a file called “robots.txt”. This file contains instructions for the spider on which parts of the website to index, and which parts to ignore. The only way to control what a spider sees on your site is by using a robots.txt file. All spiders are supposed to follow some rules, and the major search engines do follow these rules for the most part. Fortunately, the major search engines like Google or Bing are finally working together on standards.

Here's a short video by Google explaining their search process

14 Dec 2014

The Future of Web Development

The stuff that dreams of are made of ” ~ The Maltese Falcon
Web Development is a fast paced, highly competitive and creative field. Commonly, there are two big parts to any web-based thingy. The front end, where the pretty stuff is. This falls under web design. Then we have the back end, where all the heavy machinery nestle. Technically only the back end falls under web development, but one cannot describe a house, without showing where the front door is. In this article I have tried to collect the views of the people working behind in the concepts discussed, from many web posts. At the bottom, are a few resources you can look at if you are interested.

Going a little into the annals of computer history, we find that the Internet, despite growing rapidly, did not grow in chaos. It was developed layer by layer, each step taken in a logical sequence. The development of the Internet, began with the creation of efficient data transfer systems. With the creation of the World Wide Web, came the key components of our present Internet - the web browser and the web page.

Sir Tim Berners Lee (All Hail!) also created the Hypertext Markup Language - HTML - along with the web. The first few versions of HTML were, to put it in a nice way, severely lacking. If it weren't for CSS, the Internet would be ugly.

Web Apps will dominate the market

Across the world, there is great belief that web based applications will be the future - of not just the web - but also smartphone and desktop apps. The arguments put forth for proclaiming web apps as the next conquerors are quite simple. Web-browser based applications are easy to create - they primarily use the languages and technologies used to build regular websites - and will run on a multitude of platforms with just some minor adjustments. Today, with the rise of several mobile and desktop operating systems, each with their own system type, each with their own specific set of programming languages to develop with, more and more people (developers to be precise) are clamoring for a unified technology that allows one to build an app once, and get it to work everywhere. Putting it all together, the general idea, is that why not make applications which are run by a web browser as opposed to them being run directly by an operating system - To create what is quintessentially an operating system which is run on top of another operating system.

Oh if it were only so simple ~ Aleksandr Solzhenitsyn

Unfortunately, the world functions in mysterious ways. Or in this case, in very clearly defined, but still mind-numbing ways. There are a host of problems in such a model. If one were to make a list, of all the hurdles we would need to cross to implement this idea fully, topping that list would be Performance.

Native apps (Normal apps run by the operating system directly) are able change a variety of system settings in order to fit in exactly, so as to utilise as less system resources as possible, and yet function smoothly and give a rich user experience. Currently while it is possible to some degree to create an app that can run on a particular browser, with some effort on all browsers, and maybe with a lot more effort on all browsers on all mobile and desktop OS’s (The time, human drudgery and expertise required will be high), such an app, will not be able to run nearly as well as a native app.

Google is spearheading the effort to integrate web and system apps, into a hybrid environment where BOTH native and web apps are treated on an equal level. It has designed an entire javascript based framework called Polymer (Explained later in this article) for the development of web apps, as well as another javascript based framework, Angular.js for the front end of web applications.

Here is a more detailed and well explained article regarding Google and Web applications : The future of the web according to Google

Flash of Death

RIP Flash

One thing anyone can say for sure, looking at the present scenario, is that Flash will be driven to extinction. In 2010, Apple sounded the death knell for Flash by making iPads and iPhones incompatible with Flash. Google followed, and all versions of Android past ICS, do not offer any native Flash support. However HTML 5 is not replacing Flash at a rate which would be expected. Presently most browsers offer only limited compatibility with HTML 5, despite it being having more performance benefits. The vast majority of video streaming sites use Flash player, rather than HTML5 based solutions. Even Youtube, still uses Flash Player, although it’s rapidly going HTML. It looks like Flash is not going to go down without a fight.

Javascript is the Future - JQuery, Node.js, Angular.js, Polymer.js

It looks like Javascript will be the Most-Wanted-Language of the next phase of the Internet. Javascript is currently the most used client-side scripting language. JQuery, a javascript library, is widely used for interaction and animation. Now, with the rise of several pioneer projects all based on javascript, javascript is set to be the true programming language of the web.

I will go a bit into scripting languages here. All interactive, motile parts of a website or web app (barring hyperlinks and css effects) are powered by scripts. There is more than one way to skin the proverbial cat, and web-developers use mainly two different techniques to run scripts.

<Warning> Textbook definitions up ahead!

Scripts can be run client-side, meaning your device takes instructions from a piece of code, and processes data accordingly. Client-side scripting languages mainly include javascript, VBscript, and flash - Honestly flash is just for games - a measly 12% according to w3techs. The other way of running scripts is from the server, where everything you feed to a website or app (location, clicks, hovers, text-entry) is sent to a server, where a server-side language, such as php or asp.net (by Microsoft) or python processes it, and sends data back to your device. The vast majority of websites use client-side and server-side scripts in tandem for maximum efficiency, security and speed.


In 2009, we witnessed the birth of Node.js, a server side scripting language based on Javascript. Node.js is being showcased as the successor the world’s most widely used server side language PHP. It is possible to dismiss this as an absurd notion if we consider the vastness of php in terms of market-share, but we must keep in mind that Node.js is a very new language, and very efficient and light as compared to php. Linkedin does the back end of it’s mobile apps using Node.js. Paypal (Gasp!) uses Node.js, and so do all these guys. What is most important of all, is that Node.js is getting developers hooked.



Let me start off the introduction to Angular.js with this picture :

That’s the story, in a nutshell. Angular is designed for dynamic views, the way HTML was designed for static pages. Angular is already insanely popular. Just head over to the homepage to start a simple tutorial right within your browser (Link below). Angular depends completely on your knowledge of javascript and HTML, and it allows for the creation of remarkable interfaces and functions for web apps. Angular provides pretty much the best framework for developing web apps right now, be it interfaces, services or communication with servers.


Polymer is another project by Google, and it is, I have mentioned before, made for building web aplication components. Polymer is a new language that is still very much in development - I forgot to mention earlier, that it was launched in 2013. Polymer basically helps in building components, which together work to form a web app, or can directly be used in websites as modules for extra functionality. While Polymer is a great concept, it is still looks like it’s way ahead of it’s time.
An article sounding alarm bells for Polymer : Is Polymer.js the future of web application development?

On a final note, I would like to remind you that Polymer’s dependencies, although non-existent in the present, are already being made and standardized. Polymer uses several powerful features of HTML5 not yet approved by the W3C, but hopefully, Polymer will succeed.

Back to Javascript

So I just listed three amazing javascript-based projects, all of which seem set to play a big part in next-gen web development. Now javascript-based here means a keen background knowldege of javascript, along with HTML and CSS will be required to do anything serious.
One last thing about javascript - Khan Academy’s programming tracks are largely javascript-centred too. The Hour of Code movement teaches js (A skinned version) along with a few other languages.

CMS (Content-Management Systems) on the rise

A rather small, but interesting thing to note is that the use of content management systems is on the rise. A CMS is generally used when there are large amounts of data to be posted on a website, or a large number of users post data to a website. Most blogging platforms like Wordpress, Weebly and Blogger use CMS, along with e-commerce sites which use specialized CMS’s such as Magento. If you want to use a CMS for your website (not one that is on a blogging platform) Drupal is highly recommended, as it is open source.


The Web is now a shining beacon for all other fields of computer technology. Some of the greatest people in the field of technology and programming are developing for the web. There is a lot of room for ideas, and is a great area to point one’s computer skills at. If you are interested web development, now is a great time to get creative. Check out the resources page of the KHMD blog for some general resources pertaining to web development. Below are some resources specifically regarding the technologies discussed in this article.

This article is crosspublished on my super-duper blog, The New Age Tech Connoisseur. Check it out for some more articles.

Thanks to Gautam Padiyar for all the ideas.


Before you start anything, head over to the homepages of these great projects. They give links to great learning resources, as well as lots of info concerning how why that project is really useful

Enlightening posts

  • Rey Bango’s Post on how to create basic elements in Polymer.
  • Angular and Polymer are very very similar. Here’s a post laying out the differences : Polymer vs. Angular

Here are a few links to detailed lists of great goodies

  • Node Cloud This website contains all the possible resources you will ever need to get started with Node.js, including details of different frameworks and IDE’s.
  • Github list of Angular JS Resources From what I infer after opening a fraction of the links to resources provided here - and they are great ones too - is if you want to begin with Angular Js, visit this page.

Design. Functionality at its best


It can mean a million things, but lets restrict ourselves to the more graphical oriented section. case in point, I would define design as the process through which a problem is solved efficiently, and in a simple manner

Dieter Rams (Google him. DO IT), a legendary designer, has explained good design in ten points:

All this seems to have gotten a bit deep, so here's some cake.

Again, DESIGN is applicable to anything. Wherever a problem exists, design solves. It could be designing a Crane, baking a cake (CAKE!), making a video, photography and logo's.

Take the KHMD logo for example. It was created to solve the problem of providing our community with a visual and brand identity, Something with which all of us can identify with. It's whole structure helps it to do just that:

It can be a compass, guiding us in the right direction. It can be infinity, for the infinite ideas inside our heads. It can also be unity, with the tightly knit structure symbolizing our community. And it doesn't hurt that it looks cool.

the color orange is said to stimulate creativity. Color is a very important part of design. Colors evoke feelings in the mind of the viewer. They place great power in the hands of the creator. Use responsibly.

So that's an introduction into design. 
A very helpful skill in this field of thought is drawing. The ability to draw can transform ideas into actual workable models, and is a wonderful medium for propagation of ideas. And again, everyone can draw.

I really don't understand people who say "I can't draw well".
Everyone. can. draw. Well. 
Start drawing things everyday, and you'll be surprised at yourself. Seriously.

On another note, A tool which I personally consider important in a designers arsenal is PhotoShop. or any substitute graphical editing software.
You can create ridiculously amazing things with just a computer in front of you. Everyone needs to know how to use it. it is an indispensable tool, which is ridiculously easy to learn and operate. Well, at least the basics. And that's all one needs.

So there it is. Let's fill the world with better design and cake, and live in a better place

The End.

10 Dec 2014


Thought you knew all there is to know about number systems? Well, here's something new to that list - Negabinary numbers. These are numbers that are written to the base -2 (negative two). What's so great about these numbers? There is no need to put any + or - to denote whether it is a positive number or not. Let's check these numbers out.

The normal way a number is defined, works here as well. There are "b" number of digits in a number system of base "b". Here, we just have to change the definition to: there are "|b|" number of digits in a number system of base "b". The definition works perfectly after that. Then, we can just use the following equation:

Using this we can thus generate the first few numbers (0, 1, 2, 3, 4, 5...) in negabinary: 0, 1, 110, 111, 100, 101... (Sequence A039724 on Online Encyclopedia of Integer Sequences (OEIS)) where 0 and 1 have usual face values.

How do we convert a number to this base then? Write the number down in binary first. Then, going from right to left, at every odd place (i.e. x1, x3, x5 ...), if the bit is one, propagate a carry to the next bit. Also, while moving from right to left, add all the carries.

For example:

To convert 15 to negabinary:
  1. Convert 15 to binary
    • 15decimal=1111binary
  2. Propagate from right to left
    • 1111
    • 1111
    • 1211
    • 2011
    • 2011
    • 10011
    • 10011
    • 10011negabinary
  3. Done! (This is correct since 16-0+0-2+1 = 15)
Conversion to decimal (or any other base) just uses the original formula.

Addition is kinda done the way conversion is done, except that carries are propagated (one bit extra to the left, since 2negabinary = 110).

We can similarly define the other operations as well.

Let's take this onto another level itself: how about a number system that takes care of complex numbers as well (as digit strings)? I leave that upto you to figure out and comment about.

PS: This post is cross published on my blog http://jaybosamiya.blogspot.in/2014/10/negabinary.html

7 Dec 2014

Android FAQ + Tips + Resource Guide (PART 2)

Continued from PART 1

This post can be read before, during and after getting started with Android Development. It is written as a ready reference. 

General Tips

  • Check only for Beta or Stable builds of Android Studio in the updates window. 
  • Do not start with Fragments until you have built a few small apps yourself. (Not by Copy-paste coding)
  • Forget sqlite databases in the beginning. The fact that you need to have 3 java classes for a single database can be a turnoff. Use alternatives like the Java collections framework till then. 
  • As I said before, do not quit whatever happens. It's only normal that you take time to get used to this.

Beginner Guides 

  • Vogella - Start with the basic tutorials and development starters. Reading only.
  • myBringBack - The videos may seem like a blast from the past, but that's just how quickly Android evolves.
  • slidenerd - Indian YouTuber. One of the best approaches to Android I have found. He stays up to date with all the latest Android developments and is currently bringing out a comprehensive series on Material Design.
  • Udacity - If you have enough time at hand (4-6 hours every week for 10 weeks). Taught by instructors at Google. But keep in mind that this one has a very steep learning curve and not the best suited for beginners.
  • Once you get a little comfortable, get into the habit of reading the documentation on developer.android.com . Soon this should become your bible. 

Random FAQ

Q)  Why doesn't my button do anything !!?
A)  You probably didn't program the button to do anything. This needs to be done in your activity.java file after defining in activity.xml. (Extremely silly but happens to first timers)

Q)  How do I avoid common Gradle build problems !!?
A)  Assuming your Gradle installations were done properly, Just restart Android Studio. If it doesn't go, update Android Studio. If there is no update available, You are stuck till you get the update. 

Q)  Why is my activity not starting !!? [Most important]
A)   You probably did not add the activity to the Android manifest. This step is very important.

As you saw most of the questions turned out to be silly. But these are exactly the kind of problems people face. All of these have been answered on StackOverflow . So I will not continue this further.

A more comprehensive guide for troubleshooting IDE related Problems can also be found here.

Intermediate Level Resources

p.s. I just realized that I emulated something called as "Externalizing resources" that is used in development. I'm sure you'll hear it when you start Android Development.

Please '+1' if you liked it, comment if you want to point out a mistake.

Getting Started With Android Development (PART 1)

This was intended to be a very long post. Deal with it.

Still Waiting for Lollipop? 

Crazy about Android, Rooting your phone and pushing your Android to its limits? No? That's fine. That was just how I got started off with Android Development. Believe it or not, I started programming only because of my passion towards Android and XDA. Allow me to take a small detour before getting to Android Development.

I started exploring and researching about android devices just as I was finishing my 8th std. For about one solid year it was just getting to know about android and the devices on the market. You could literally ask me anything about android devices and I would know. I still remember that epic MWC 2012 where the HTC One X and the Xperia S were unveiled along with their smaller brothers. .... You get my point.

Around that time I got my own Android device. It opened up infinite opportunities for me to try new stuff and I did exactly that. One month after getting it, I rooted it and for almost the next 6 months , I was flashing a Custom ROM once every 2 days. Very soon I was a senior member on XDA .... Again, you get my point.

Along the way, I was fascinated at how these developer-legends were taking time off their busy schedules and writing code to support a device they truly loved. I decided that I too wanted to build a Custom Rom and post it on XDA. Tried and failed (obviously). Advised to start with writing Android apps, thus I began my journey. My objective has changed since then.

OK That's enough. Let's get down to business

There is one fundamental thing you need to ask yourself - Do I want to start Android development because I want to learn it or because I want to build an app as soon as possible. These may seem to be the same but believe me. They're not. The difference also lies in whether you are willing to compromise on the quality of your apps.

If you want to build an app as soon as possible, You should probably stop reading this and read Aniruddha's post on the Future of Web Development (Coming soon) (Since it never came - Google Phonegap or "Android Apps using Javascript").

Traditional Android development is what you should start with if you don't want to compromise on quality and/or are learning for the long term experience. Read on.


Your first hurdle is to learn a new language : Java. It's not the easiest language to learn, but then it's not the toughest one to learn too. If you do know Java, good for you. But you may ask , how much Java is enough. Valid question.

You don't need to go too deep into Java. Let me just list the most important concepts. You can learn the rest as you need them.

  • Basic Syntax (obviously!)
  • Writing your own methods (aka functions)
  • Object Oriented Concepts of Java (It does vary a little by language)
  • Creating Your own Classes , Interfaces , Abstract Classes , Objects 
  • Extending / Implementing these
  • Generics and Collections Classes   
Hands down the best Java video tutorials I have found.

NOTE : If you are completely new to programming, Pay special attention to the syntax part and give enough time for each of these topics.


Now You have a choice. No actually you don't. This is 2016 and you have no reason to not use Android Studio. You can follow any other guide on the internet to set up Android studio and its dependencies. 

Take your time and understand how the process of writing an android app works. If you don't understand something, just skip it. If you don't understand anything at all (It can happen in the start), ask around in the community or contact me personally. Some beginner questions may be 
  • Why are there so many different folders and files ?
  • Why doesn't my button do anything ?
  • How do I avoid common Gradle build problems ?
  • Why is my activity not starting ?
Don't pull your hair out. There's always help around. I'll answer these and a few more in the FAQ post.

PLEASE NOTE : Patience is key here. Android Development is not easy to learn without any decent programming experience. It will take time. Now Go have fun with Android.

BTW You can still find me on XDA . Though not active anymore, Waiting for an opportunity to be back. Please '+1' if you liked it, comment if you want to point out a mistake.

Continued in PART 2